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
8e8d97fe
Commit
8e8d97fe
authored
Oct 10, 2020
by
TtTao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增:tabs标签卡增加badge徽标数设置
parent
6a276a4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
index.vue
pages/componentsA/tabs/index.vue
+13
-6
index.vue
pages/template/order/index.vue
+2
-1
No files found.
pages/componentsA/tabs/index.vue
View file @
8e8d97fe
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<view
class=
"u-demo-title"
>
演示效果
</view>
<view
class=
"u-demo-title"
>
演示效果
</view>
<view
class=
"u-demo-area"
>
<view
class=
"u-demo-area"
>
<u-toast
ref=
"uToast"
></u-toast>
<u-toast
ref=
"uToast"
></u-toast>
<u-tabs
v-if=
"control"
bg-color=
"#fafafa"
:bold=
"bold"
:active-color=
"activeColor"
:list=
"list"
<u-tabs
v-if=
"control"
bg-color=
"#fafafa"
:bold=
"bold"
:active-color=
"activeColor"
:list=
"list"
@
change=
"change"
:current=
"current"
:is-scroll=
"isScroll"
></u-tabs>
@
change=
"change"
:current=
"current"
:is-scroll=
"isScroll"
:offset=
"offset"
></u-tabs>
</view>
</view>
</view>
</view>
<view
class=
"u-config-wrap"
>
<view
class=
"u-config-wrap"
>
...
@@ -38,9 +38,11 @@
...
@@ -38,9 +38,11 @@
return
{
return
{
list
:
[],
list
:
[],
data
:
[{
data
:
[{
name
:
'
关注
'
name
:
'
关注
'
,
count
:
100
},
{
},
{
name
:
'
推荐
'
name
:
'
推荐
'
,
count
:
7
},
{
},
{
name
:
'
电影
'
name
:
'
电影
'
},{
},{
...
@@ -62,7 +64,8 @@
...
@@ -62,7 +64,8 @@
tabCountIndex
:
0
,
tabCountIndex
:
0
,
activeColor
:
this
.
$u
.
color
[
'
primary
'
],
activeColor
:
this
.
$u
.
color
[
'
primary
'
],
bold
:
true
,
bold
:
true
,
control
:
true
control
:
true
,
offset
:
[
5
,
-
5
]
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -75,17 +78,20 @@
...
@@ -75,17 +78,20 @@
this
.
list
=
[];
this
.
list
=
[];
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
offset
=
[
5
,
60
]
}
else
if
(
index
==
1
)
{
}
else
if
(
index
==
1
)
{
this
.
list
=
[];
this
.
list
=
[];
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
list
.
push
(
this
.
data
[
2
]);
this
.
list
.
push
(
this
.
data
[
2
]);
this
.
offset
=
[
5
,
20
]
}
else
{
}
else
{
this
.
list
=
[];
this
.
list
=
[];
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
0
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
list
.
push
(
this
.
data
[
1
]);
this
.
list
.
push
(
this
.
data
[
2
]);
this
.
list
.
push
(
this
.
data
[
2
]);
this
.
list
.
push
(
this
.
data
[
3
]);
this
.
list
.
push
(
this
.
data
[
3
]);
this
.
offset
=
[
5
,
5
]
}
}
this
.
tabCountIndex
=
index
;
this
.
tabCountIndex
=
index
;
this
.
isScroll
=
false
;
this
.
isScroll
=
false
;
...
@@ -99,6 +105,7 @@
...
@@ -99,6 +105,7 @@
if
(
index
==
0
)
{
if
(
index
==
0
)
{
this
.
isScroll
=
true
;
this
.
isScroll
=
true
;
this
.
list
=
this
.
data
;
this
.
list
=
this
.
data
;
this
.
offset
=
[
5
,
-
5
]
}
else
{
}
else
{
this
.
isScroll
=
false
;
this
.
isScroll
=
false
;
this
.
countChange
(
this
.
tabCountIndex
);
this
.
countChange
(
this
.
tabCountIndex
);
...
@@ -135,6 +142,6 @@
...
@@ -135,6 +142,6 @@
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.u-config-wrap
{
.u-config-wrap
{
}
}
</
style
>
</
style
>
pages/template/order/index.vue
View file @
8e8d97fe
...
@@ -278,7 +278,8 @@ export default {
...
@@ -278,7 +278,8 @@ export default {
name
:
'
待收货
'
name
:
'
待收货
'
},
},
{
{
name
:
'
待评价
'
name
:
'
待评价
'
,
count
:
12
}
}
],
],
current
:
0
,
current
:
0
,
...
...
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