Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
3942d4f3
提交
3942d4f3
authored
4月 21, 2026
作者:
coderBryanFu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:修改自定排序组件逻辑
上级
27dad4d2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
30 行增加
和
14 行删除
+30
-14
index.vue
src/components/base/TimeSortSelectBox/index.vue
+26
-8
index.vue
src/styles/components/TimeSortSelectBox/index.vue
+4
-6
没有找到文件。
src/components/base/TimeSortSelectBox/index.vue
浏览文件 @
3942d4f3
<
template
>
<div
class=
"time-sort-select-box"
>
<el-select
v-model=
"isSort"
placeholder=
"
发布时间
"
style=
"width: 130px"
@
change=
"handlePxChange"
>
<el-select
v-model=
"isSort"
placeholder=
"
排序方式
"
style=
"width: 130px"
@
change=
"handlePxChange"
>
<template
#
prefix
>
<div
style=
"display: flex; align-items: center; height: 100%"
>
<img
v-if=
"isSort"
src=
"./down.svg"
style=
"width: 16px; height: 16px"
/>
<img
v-else
src=
"./up.svg"
style=
"width: 16px; height: 16px"
/>
</div>
</
template
>
<el-option
v-for=
"item in
time
List"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
<el-option
v-for=
"item in
sort
List"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</template>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
const
isSort
=
ref
(
true
)
const
props
=
defineProps
({
onlyTime
:
{
type
:
Boolean
,
default
:
true
}
})
const
timeList
=
ref
([
{
label
:
"时间倒序"
,
value
:
true
},
{
label
:
"时间正序"
,
value
:
false
}
])
const
isSort
=
ref
(
1
)
const
sortList
=
computed
(()
=>
{
if
(
props
.
onlyTime
)
{
return
[
{
label
:
"时间倒序"
,
value
:
1
},
{
label
:
"时间正序"
,
value
:
2
},
]
}
else
{
return
[
{
label
:
"时间倒序"
,
value
:
1
},
{
label
:
"时间正序"
,
value
:
2
},
{
label
:
"评分倒序"
,
value
:
3
},
{
label
:
"热度倒序"
,
value
:
4
},
]
}
})
const
emits
=
defineEmits
([
'handlePxChange'
])
...
...
src/styles/components/TimeSortSelectBox/index.vue
浏览文件 @
3942d4f3
...
...
@@ -5,20 +5,18 @@
{{
`
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue'
import HeatSortSelectBox from '@/components/base/HeatSortSelectBox/index.vue'
import GradeSortSelectBox from '@/components/base/GradeSortSelectBox/index.vue'
<div class="time-box">
<TimeSortSelectBox @handle-px-change="handleTimePx" />
<HeatSortSelectBox @handle-px-change="handleHeatPx" />
<GradeSortSelectBox @handle-px-change="handleGradePx" />
<TimeSortSelectBox :only-time="false" @handle-px-change="handleTimePx" />
</div>
`
}}
</pre>
<div
class=
"time-box"
>
<TimeSortSelectBox
@
handle-px-change=
"handleTimePx"
/>
<HeatSortSelectBox
@
handle-px-change=
"handleHeatPx"
/>
<GradeSortSelectBox
@
handle-px-change=
"handleGradePx"
/>
<TimeSortSelectBox
:only-time=
"false"
@
handle-px-change=
"handleTimePx"
/>
<!--
<HeatSortSelectBox
@
handle-px-change=
"handleHeatPx"
/>
<GradeSortSelectBox
@
handle-px-change=
"handleGradePx"
/>
-->
</div>
</el-col>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论