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
bf7ef4b7
Commit
bf7ef4b7
authored
Apr 23, 2020
by
王博文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除count对数组支持
parent
f8dde6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
u-badge.vue
uview/components/u-badge/u-badge.vue
+4
-8
No files found.
uview/components/u-badge/u-badge.vue
View file @
bf7ef4b7
...
...
@@ -34,7 +34,7 @@ export default {
},
// 显示的数值内容
count
:
{
type
:
[
Number
,
String
,
Array
]
type
:
[
Number
,
String
]
},
// 展示封顶的数字值
overflowCount
:
{
...
...
@@ -98,14 +98,10 @@ export default {
// isDot类型时,不显示文字
showText
()
{
if
(
this
.
isDot
)
return
""
;
if
(
Array
.
isArray
(
this
.
count
))
{
if
(
this
.
count
.
length
>
this
.
overflowCount
)
{
else
{
if
(
this
.
count
>
this
.
overflowCount
)
return
`
${
this
.
overflowCount
}
+`
;
}
else
return
this
.
count
.
length
;
}
else
{
if
(
this
.
count
>
this
.
overflowCount
)
{
return
`
${
this
.
overflowCount
}
+`
;
}
else
return
this
.
count
;
else
return
this
.
count
;
}
},
// 是否显示组件
...
...
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