uViewUI轮播图u-swiper去掉标题背景灰黑色的方法:其实uViewUI作者已经在Props属性里有说明了,小白看不懂,不知道怎么操作而已。就是给u-swiper绑定一个自定义标题样式属性:title-style=abc,给这个属性传递对象(Object)类型的数据(值)即可。上代码:
<template>
<view>
<u-swiper :list=banner title=true :title-style=abc></u-swiper>
</view>
</template>
<script>
export default {
data() {
return {
abc:{
'background-color':'rgba(0, 0, 0, 0)',
},
}
}
}
</script>
<style>
</style>
uniapp获取当前页面传递的参数及路由的方法
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let curRoute = routes[routes.length - 1].route //获取当前页面路由 // pages/webview/webviewlet curParam = routes[routes.length - 1].options; //获取路由参数 // {userId:1000007}let prevRoute = routes[routes.length - 2].route //获取上一页页面路由 // pages/index/index// 拼接参数let param = ''for (let key in curParam) {param += '&' + key + '=' + curParam[key]}注意:prevRoute上一页获取到的路由是:pages/index/index,如果要跳转到这个页面,一定要在前面加一个‘/’,即:/pages/index/index猜你喜欢