Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 372e5c40
authored
Jan 08, 2026
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 样式修改
1 parent
86aec38a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
6 deletions
pages/evaluationForm/components/TypeTabComponent.vue
pages/usedCar/reportManagement/index.vue
pages/evaluationForm/components/TypeTabComponent.vue
View file @
372e5c4
<
template
>
<
template
>
<view
class=
"type-tab"
>
<view
class=
"type-tab"
>
<scroll-view
class=
"type-box"
scroll-x=
"true"
show-scrollbar=
"false"
scroll-with-animation
>
<scroll-view
class=
"type-box"
scroll-x=
"true"
show-scrollbar=
"false"
scroll-with-animation
@
scroll=
"onScroll"
ref=
"scrollView"
>
<view
class=
"type-scroll-content"
>
<view
class=
"type-scroll-content"
>
<view
class=
"tab-item"
:class=
"[tabClass(index)]"
v-for=
"(i, index) in typeList"
:key=
"index"
@
click
.
stop=
"tabClick(index, i)"
>
<view
class=
"tab-item"
:class=
"[tabClass(index)]"
v-for=
"(i, index) in typeList"
:key=
"index"
@
click
.
stop=
"tabClick(index, i)"
>
<view
v-if=
"tabIndex == index && index == 0"
class=
"sprite-icon tab-first-left icon-first-left"
></view>
<view
v-if=
"tabIndex == index && index == 0"
class=
"sprite-icon tab-first-left icon-first-left"
></view>
<view
v-if=
"tabIndex == index && index == 0"
class=
"sprite-icon tab-first-right icon-first-right"
></view>
<view
v-if=
"tabIndex == index && index == 0"
class=
"sprite-icon tab-first-right icon-first-right"
></view>
<view
v-if=
"tabIndex == index && index != 0 &&
index != typeList.length - 1
"
class=
"sprite-icon tab-second-right icon-second-right"
></view>
<view
v-if=
"tabIndex == index && index != 0 &&
(index != typeList.length - 1 || (index == typeList.length - 1 && !isOverflow))
"
class=
"sprite-icon tab-second-right icon-second-right"
></view>
<view
v-if=
"tabIndex == index && index != 0 && index == typeList.length - 1"
class=
"sprite-icon tab-end-right icon-end-right"
></view>
<view
v-if=
"tabIndex == index && index != 0 && index == typeList.length - 1
&& isOverflow
"
class=
"sprite-icon tab-end-right icon-end-right"
></view>
<view
v-if=
"tabIndex == index && index != 0"
class=
"sprite-icon tab-second-left icon-second-left"
></view>
<view
v-if=
"tabIndex == index && index != 0"
class=
"sprite-icon tab-second-left icon-second-left"
></view>
<view
class=
"text flex justify-center align-center"
:class=
"[tabIndex == index ? `active` : '']"
>
<view
class=
"text flex justify-center align-center"
:class=
"[tabIndex == index ? `active` : '']"
>
<view>
{{
i
[
nameKey
]
}}
</view>
<view>
{{
i
[
nameKey
]
}}
</view>
...
@@ -39,6 +39,7 @@ export default {
...
@@ -39,6 +39,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
firstClass
:
Object
.
freeze
([
'first-nav'
,
'second-nav'
]),
firstClass
:
Object
.
freeze
([
'first-nav'
,
'second-nav'
]),
isOverflow
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -48,8 +49,67 @@ export default {
...
@@ -48,8 +49,67 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
// 延迟检测,确保 DOM 完全渲染
setTimeout
(()
=>
{
this
.
checkOverflow
()
},
300
)
},
updated
()
{
// 延迟检测,确保 DOM 完全渲染
setTimeout
(()
=>
{
this
.
checkOverflow
()
},
300
)
},
watch
:
{
typeList
:
{
handler
()
{
this
.
$nextTick
(()
=>
{
this
.
checkOverflow
()
})
},
deep
:
true
}
},
},
methods
:
{
methods
:
{
onScroll
(
e
)
{
// 通过滚动事件检测是否可以滚动
// 如果能滚动(scrollLeft > 0 或可以滚动到最右边),说明内容超出
const
scrollLeft
=
e
.
detail
.
scrollLeft
const
scrollWidth
=
e
.
detail
.
scrollWidth
// 如果 scrollLeft > 0,说明可以滚动,内容超出
// 或者如果 scrollWidth 存在且明显大于 0,也可能说明可以滚动
// 但为了更准确,我们还是使用 checkOverflow 方法
// 这里可以作为一个辅助检测
if
(
scrollLeft
>
0
&&
!
this
.
isOverflow
)
{
this
.
isOverflow
=
true
}
},
checkOverflow
()
{
this
.
$nextTick
(()
=>
{
// 增加延迟,确保 DOM 完全渲染
setTimeout
(()
=>
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
)
query
.
select
(
'.type-box'
).
boundingClientRect
()
query
.
select
(
'.type-scroll-content'
).
boundingClientRect
()
query
.
exec
((
res
)
=>
{
if
(
res
&&
res
[
0
]
&&
res
[
1
])
{
const
boxRect
=
res
[
0
]
const
contentRect
=
res
[
1
]
// 如果内容宽度大于容器宽度,说明可以滚动
// 添加一个小的容差值,避免因为像素精度问题导致判断错误
const
overflow
=
contentRect
.
width
>
boxRect
.
width
+
1
this
.
isOverflow
=
overflow
console
.
log
(
'检测溢出状态:'
,
{
boxWidth
:
boxRect
.
width
,
contentWidth
:
contentRect
.
width
,
isOverflow
:
this
.
isOverflow
,
typeListLength
:
this
.
typeList
.
length
})
}
})
},
300
)
})
},
tabClass
(
index
)
{
tabClass
(
index
)
{
let
className
=
''
let
className
=
''
if
(
this
.
tabIndex
==
index
)
{
if
(
this
.
tabIndex
==
index
)
{
...
...
pages/usedCar/reportManagement/index.vue
View file @
372e5c4
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
</
template
>
</
template
>
</view>
</view>
</view>
</view>
<view
class=
"flex align-center justify-between"
>
<view
class=
"flex align-center justify-between
mt-108
"
>
<checkbox-group
@
change=
"checkboxChange"
>
<checkbox-group
@
change=
"checkboxChange"
>
<label
class=
"flex"
>
<label
class=
"flex"
>
<checkbox
value=
"cb"
:checked=
"isConfirmChecked"
activeBackgroundColor=
"#4673FF"
iconColor=
"#fff"
style=
"transform: scale(0.6)"
/>
<checkbox
value=
"cb"
:checked=
"isConfirmChecked"
activeBackgroundColor=
"#4673FF"
iconColor=
"#fff"
style=
"transform: scale(0.6)"
/>
...
@@ -869,7 +869,7 @@ export default {
...
@@ -869,7 +869,7 @@ export default {
height
:
toRpx
(
672
);
height
:
toRpx
(
672
);
border-right
:
2px
solid
#f7f7f6
;
border-right
:
2px
solid
#f7f7f6
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding-right
:
toRpx
(
24
);
padding-right
:
toRpx
(
40
);
flex-shrink
:
0
;
flex-shrink
:
0
;
.tabItem
{
.tabItem
{
border-radius
:
toRpx
(
24
);
border-radius
:
toRpx
(
24
);
...
@@ -899,7 +899,7 @@ export default {
...
@@ -899,7 +899,7 @@ export default {
}
}
.desc
{
.desc
{
color
:
#666666
;
color
:
#666666
;
font-size
:
toRpx
(
2
8
);
font-size
:
toRpx
(
2
6
);
font-weight
:
400
;
font-weight
:
400
;
}
}
}
}
...
@@ -1008,6 +1008,9 @@ export default {
...
@@ -1008,6 +1008,9 @@ export default {
font-weight
:
500
;
font-weight
:
500
;
text-align
:
center
;
text-align
:
center
;
}
}
.mt-108
{
margin-top
:
toRpx
(
68
);
}
}
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment