Commit 2e7e8d3a authored by 北桥's avatar 北桥

bugfix: dropdown not found

parent 66a7013c
...@@ -663,6 +663,13 @@ ...@@ -663,6 +663,13 @@
{ {
"root": "pages/componentsB", "root": "pages/componentsB",
"pages": [ "pages": [
// dropdown-下拉菜单
{
"path": "dropdown/index",
"style": {
"navigationBarTitleText": "dropdown-下拉菜单"
}
},
// tabbar-底部导航栏 // tabbar-底部导航栏
{ {
"path": "tabbar/index", "path": "tabbar/index",
......
<template> <template>
<view class=""> <view class="">
<view class="u-demo"> <view class="u-demo">
<view class="u-config-wrap"> <view class="u-config-wrap">
<view class="u-config-title u-border-bottom"> <view class="u-config-title u-border-bottom">
参数配置 参数配置
</view> </view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">状态</view> <view class="u-item-title">状态</view>
<u-subsection :list="['显示', '隐藏']" @change="showChange"></u-subsection> <u-subsection :list="['显示', '隐藏']" @change="showChange"></u-subsection>
</view> </view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">凸起按钮</view> <view class="u-item-title">凸起按钮</view>
<u-subsection :list="['显示', '隐藏']" @change="minButtonChange"></u-subsection> <u-subsection :list="['显示', '隐藏']" @change="minButtonChange"></u-subsection>
</view> </view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">背景色</view> <view class="u-item-title">背景色</view>
<u-subsection :list="['#ffffff', '#1f1f1d']" @change="bgColorChange"></u-subsection> <u-subsection :list="['#ffffff', '#1f1f1d']" @change="bgColorChange"></u-subsection>
</view> </view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">顶部边框</view> <view class="u-item-title">顶部边框</view>
<u-subsection :list="['显示', '隐藏']" @change="borderTopChange"></u-subsection> <u-subsection :list="['显示', '隐藏']" @change="borderTopChange"></u-subsection>
</view> </view>
<view class="u-config-item"> <view class="u-config-item">
<view class="u-item-title">提示角标</view> <view class="u-item-title">提示角标</view>
<u-subsection :list="['显示', '隐藏']" @change="badgeChange"></u-subsection> <u-subsection :list="['显示', '隐藏']" @change="badgeChange"></u-subsection>
</view> </view>
</view> </view>
</view> </view>
<u-tabbar <u-tabbar
v-model="current" v-model="current"
:show="show" :show="show"
:bg-color="bgColor" :bg-color="bgColor"
:border-top="borderTop" :border-top="borderTop"
:list="list" :list="list"
:mid-button="midButton" :mid-button="midButton"
:inactive-color="inactiveColor" :inactive-color="inactiveColor"
:activeColor="activeColor" :activeColor="activeColor"
></u-tabbar> :hideTabBar="false"
</view> ></u-tabbar>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
current: 0, current: 0,
show: true, show: true,
bgColor: '#ffffff', bgColor: '#ffffff',
borderTop: true, borderTop: true,
list: [{ list: [{
iconPath: "home", iconPath: "home",
selectedIconPath: "home-fill", selectedIconPath: "home-fill",
text: '首页', text: '首页',
count: 2, count: 2,
isDot: true, isDot: true,
customIcon: false, customIcon: false,
}, },
{ {
iconPath: "photo", iconPath: "photo",
selectedIconPath: "photo-fill", selectedIconPath: "photo-fill",
text: '放映厅', text: '放映厅',
customIcon: false, customIcon: false,
}, },
{ {
iconPath: "/static/uview/example/min_button.png", iconPath: "/static/uview/example/min_button.png",
selectedIconPath: "/static/uview/example/min_button_select.png", selectedIconPath: "/static/uview/example/min_button_select.png",
text: '发布', text: '发布',
midButton: true, midButton: true,
customIcon: false, customIcon: false,
}, },
{ {
iconPath: "play-right", iconPath: "play-right",
selectedIconPath: "play-right-fill", selectedIconPath: "play-right-fill",
text: '直播', text: '直播',
customIcon: false, customIcon: false,
}, },
{ {
iconPath: "account", iconPath: "account",
selectedIconPath: "account-fill", selectedIconPath: "account-fill",
text: '我的', text: '我的',
count: 23, count: 23,
isDot: false, isDot: false,
customIcon: false, customIcon: false,
}, },
], ],
midButton: true, midButton: true,
inactiveColor: '#909399', inactiveColor: '#909399',
activeColor: '#5098FF' activeColor: '#5098FF'
} }
}, },
methods: { methods: {
beforeSwitch(index) { beforeSwitch(index) {
return true; return true;
}, },
showChange(index) { showChange(index) {
this.show = !index; this.show = !index;
}, },
bgColorChange(index) { bgColorChange(index) {
if(index == 0) { if(index == 0) {
this.activeColor = '#5098FF'; this.activeColor = '#5098FF';
this.inactiveColor = '#909399'; this.inactiveColor = '#909399';
} }
if(index == 1) { if(index == 1) {
this.activeColor = '#D0D0D0'; this.activeColor = '#D0D0D0';
this.inactiveColor = '#5A5A5A'; this.inactiveColor = '#5A5A5A';
} }
this.bgColor = ['#ffffff', '#1f1f1d'][index]; this.bgColor = ['#ffffff', '#1f1f1d'][index];
}, },
borderTopChange(index) { borderTopChange(index) {
this.borderTop = !index; this.borderTop = !index;
}, },
badgeChange(index) { badgeChange(index) {
if (index == 1) { if (index == 1) {
this.list[0].count = 0; this.list[0].count = 0;
this.list[4].count = 0; this.list[4].count = 0;
} else { } else {
this.list[0].count = 2; this.list[0].count = 2;
this.list[4].count = 23; this.list[4].count = 23;
} }
}, },
minButtonChange(index) { minButtonChange(index) {
this.midButton = !index; this.midButton = !index;
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.u-demo-area { .u-demo-area {
margin: 0 -40rpx; margin: 0 -40rpx;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment