Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
a8a46e49
提交
a8a46e49
authored
1月 08, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(user.js): 重构-用户管理页面
同上
上级
c63df3f7
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
5 行删除
+46
-5
index.vue
src/components/CategoryTree/index.vue
+12
-5
index.vue
src/components/ToolTip/index.vue
+31
-0
main.js
src/main.js
+3
-0
index.vue
src/views/system/user/index.vue
+0
-0
没有找到文件。
src/components/CategoryTree/index.vue
浏览文件 @
a8a46e49
...
...
@@ -54,7 +54,7 @@
@
pagination=
"getPageList"
/>
<!-- 折叠分类侧边栏 -->
<div
class=
"arrow"
@
click=
"h
ideSideBar = true
"
>
@
click=
"h
andleClick
"
>
<svg-icon
icon-class=
"left-arrow"
/>
</div>
</div>
...
...
@@ -62,7 +62,7 @@
<!-- 展开分类侧边栏 -->
<div
class=
"arrow"
v-show=
"hideSideBar"
@
click=
"h
ideSideBar = !hideSideBar
"
>
@
click=
"h
andleClick
"
>
<svg-icon
icon-class=
"right-arrow"
/>
</div>
</el-col>
...
...
@@ -150,7 +150,7 @@ watch(searchValue, (val) => {
}
else
{
// 有分页,走外面接口搜索
queryParams
.
searchKey
=
val
emits
(
'search'
,
queryParams
)
//
emits('search', queryParams)
}
})
...
...
@@ -167,11 +167,12 @@ watch(() => props.modelValue, (val) => {
// 点击空白位置-取消选中效果
const
cancelSel
=
()
=>
{
// 刚才有过点击的某行
console
.
log
(
666
,
lastRow
.
value
)
if
(
lastRow
.
value
)
{
treeRef
.
value
.
setCurrentKey
(
null
)
lastRow
.
value
=
null
emits
(
'update:modelValue'
,
''
)
emits
(
'search'
)
emits
(
'search'
,
null
)
}
}
...
...
@@ -181,11 +182,13 @@ const handleNodeClick = (row) => {
if
(
lastRowId
.
value
===
row
[
props
.
nodeKey
])
{
treeRef
.
value
.
setCurrentKey
(
null
)
lastRowId
.
value
=
null
lastRow
.
value
=
null
}
else
{
lastRowId
.
value
=
row
[
props
.
nodeKey
]
lastRow
.
value
=
row
}
emits
(
'update:modelValue'
,
lastRowId
.
value
?
row
[
props
.
nodeKey
]
:
''
)
emits
(
'search'
)
emits
(
'search'
,
row
)
}
// tree 筛选节点
...
...
@@ -198,6 +201,10 @@ const filterNode = (value, data) => {
const
getPageList
=
()
=>
{
emits
(
'pageChange'
,
queryParams
)
}
const
handleClick
=
()
=>
{
hideSideBar
.
value
=!
hideSideBar
.
value
}
</
script
>
<
style
scoped
...
...
src/components/ToolTip/index.vue
0 → 100644
浏览文件 @
a8a46e49
<
template
>
<div
class=
"wrap"
>
<el-tooltip
v-if=
"show"
v-bind=
"$attrs"
>
<slot></slot>
</el-tooltip>
<div
@
mouseenter=
"show = true"
@
mouseleave=
"show = false"
v-else
>
<slot></slot>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'MouseToolTip'
,
data
()
{
return
{
show
:
false
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.wrap
{
display
:
inline-block
;
}
</
style
>
\ No newline at end of file
src/main.js
浏览文件 @
a8a46e49
...
...
@@ -48,6 +48,8 @@ import NoData from '@/components/NoData'
import
CategoryTree
from
'@/components/CategoryTree'
// 返回头部
import
BackToUp
from
'@/components/BackToUp'
// 自定义 toolTip
import
CustomToolTip
from
'@/components/ToolTip'
const
app
=
createApp
(
App
)
...
...
@@ -76,6 +78,7 @@ app.component('GroupLegend', GroupLegend)
app
.
component
(
'NoData'
,
NoData
)
app
.
component
(
'CategoryTree'
,
CategoryTree
)
app
.
component
(
'BackToUp'
,
BackToUp
)
app
.
component
(
'CustomToolTip'
,
CustomToolTip
)
// 全局插件
app
.
use
(
plugins
)
...
...
src/views/system/user/index.vue
浏览文件 @
a8a46e49
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论