Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
broadcast_cloud
/
web-live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
2
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e73d7072
authored
Dec 04, 2020
by
MichaelJier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
1. tab栏优化:标签不滚动时均匀分布
parent
d8e1f3b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
components/modules/menuBox/tab.vue
+9
-2
No files found.
components/modules/menuBox/tab.vue
View file @
e73d7072
...
@@ -66,8 +66,8 @@ export default {
...
@@ -66,8 +66,8 @@ export default {
});
});
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
wechatInfo
=
res
.
data
||
{};
this
.
wechatInfo
=
res
.
data
||
{};
this
.
isScroll
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
isScroll
()
this
.
listScroll
()
this
.
listScroll
()
this
.
boxScrollListener
()
this
.
boxScrollListener
()
})
})
...
@@ -94,11 +94,18 @@ export default {
...
@@ -94,11 +94,18 @@ export default {
isScroll
()
{
isScroll
()
{
const
boxScroll
=
this
.
$refs
.
boxScroll
const
boxScroll
=
this
.
$refs
.
boxScroll
const
fatherWidth
=
boxScroll
.
clientWidth
const
fatherWidth
=
boxScroll
.
clientWidth
const
childWidth
=
boxScroll
.
getElementsByClassName
(
'list'
)[
0
].
clientWidth
const
list
=
boxScroll
.
getElementsByClassName
(
'list'
)[
0
]
const
childWidth
=
list
.
clientWidth
if
(
fatherWidth
>
childWidth
)
{
if
(
fatherWidth
>
childWidth
)
{
for
(
const
item
of
boxScroll
.
getElementsByClassName
(
'item'
))
{
for
(
const
item
of
boxScroll
.
getElementsByClassName
(
'item'
))
{
item
.
style
[
'max-width'
]
=
'none'
item
.
style
[
'max-width'
]
=
'none'
}
}
list
.
style
.
width
=
'100%'
list
.
style
.
display
=
'flex'
list
.
style
[
'justify-content'
]
=
'space-around'
}
else
{
list
.
style
.
width
=
'fit-content'
list
.
style
.
display
=
'block'
}
}
},
},
boxScrollListener
()
{
boxScrollListener
()
{
...
...
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