Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
2e7e8d3a
Commit
2e7e8d3a
authored
Jul 24, 2023
by
北桥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: dropdown not found
parent
66a7013c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
125 deletions
+133
-125
pages.json
src/pages.json
+7
-0
index.vue
src/pages/componentsB/tabbar/index.vue
+126
-125
No files found.
src/pages.json
View file @
2e7e8d3a
...
@@ -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"
,
...
...
src/pages/componentsB/tabbar/index.vue
View file @
2e7e8d3a
<
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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment