Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
cc92aef1
Commit
cc92aef1
authored
Sep 16, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改pageWrapperSearch.vue 自定义按钮
使用方法参考project/Project/QueryForm
parent
d27e1f15
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
79 行增加
和
6 行删除
+79
-6
src/components/Search/PageWrapperSearch.vue
+36
-5
src/views/project/Project/QueryForm.vue
+43
-1
没有找到文件。
src/components/Search/PageWrapperSearch.vue
View file @
cc92aef1
...
@@ -9,8 +9,10 @@ import {
...
@@ -9,8 +9,10 @@ import {
useSlots
,
useSlots
,
withModifiers
,
withModifiers
,
onMounted
,
onMounted
,
onBeforeUnmount
onBeforeUnmount
,
PropType
}
from
'vue'
}
from
'vue'
import
type
{
Component
}
from
'vue'
import
{
import
{
ElRow
,
ElRow
,
...
@@ -67,7 +69,18 @@ export default defineComponent({
...
@@ -67,7 +69,18 @@ export default defineComponent({
type
:
Number
,
type
:
Number
,
default
:
6
default
:
6
},
},
labelWidth
:
[
Number
,
String
]
labelWidth
:
[
Number
,
String
],
extraButtons
:
{
type
:
Array
as
PropType
<
Array
<
{
text
:
string
type
?:
'primary'
|
'success'
|
'warning'
|
'danger'
|
'info'
|
'text'
plain
?:
boolean
round
?:
boolean
icon
?:
Component
onClick
:
()
=>
void
}
>>
,
default
:
()
=>
[]
}
},
},
setup
(
props
,
{
emit
,
attrs
,
slots
})
{
setup
(
props
,
{
emit
,
attrs
,
slots
})
{
let
observer
let
observer
...
@@ -145,7 +158,19 @@ export default defineComponent({
...
@@ -145,7 +158,19 @@ export default defineComponent({
class
:
'buttons-space'
class
:
'buttons-space'
},
},
()
=>
[
()
=>
[
...
props
.
extraButtons
.
map
(
btn
=>
h
(
ElButton
,
{
type
:
btn
.
type
,
plain
:
btn
.
plain
,
round
:
btn
.
round
,
onClick
:
btn
.
onClick
},
()
=>
[
btn
.
icon
?
h
(
ElIcon
,
null
,
()
=>
[
h
(
btn
.
icon
as
Component
)])
:
null
,
btn
.
text
]
)),
h
(
h
(
ElButton
,
ElButton
,
{
{
...
@@ -155,7 +180,10 @@ export default defineComponent({
...
@@ -155,7 +180,10 @@ export default defineComponent({
emit
(
'reset'
,
ElFormRef
.
value
)
emit
(
'reset'
,
ElFormRef
.
value
)
}
}
},
},
()
=>
'重置'
()
=>
[
h
(
ElIcon
,
null
,
()
=>
h
(
Refresh
)),
'重置'
]
),
),
h
(
h
(
ElButton
,
ElButton
,
...
@@ -166,7 +194,10 @@ export default defineComponent({
...
@@ -166,7 +194,10 @@ export default defineComponent({
emit
(
'search'
)
emit
(
'search'
)
}
}
},
},
()
=>
'查询'
()
=>
[
h
(
ElIcon
,
null
,
()
=>
h
(
Search
)),
'搜索'
]
),
),
cols
.
length
>
max
.
value
?
h
(
cols
.
length
>
max
.
value
?
h
(
'div'
,
'div'
,
...
...
src/views/project/Project/QueryForm.vue
View file @
cc92aef1
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
computed
,
ref
,
watch
}
from
'vue'
import
type
{
FormInstance
}
from
'element-plus'
import
type
{
FormInstance
}
from
'element-plus'
import
PageWrapperSearch
from
'@/components/search/PageWrapperSearch.vue'
import
PageWrapperSearch
from
'@/components/search/PageWrapperSearch.vue'
import
{
Check
,
Delete
,
Edit
,
Message
,
Search
,
Star
,
}
from
'@element-plus/icons-vue'
// import { useDict } from '@/utils/dict'
// import { useDict } from '@/utils/dict'
// import { listDept } from '@/api/system/dept'// 部门
// import { listDept } from '@/api/system/dept'// 部门
...
@@ -40,7 +48,6 @@ function onReset(formRef: FormInstance) {
...
@@ -40,7 +48,6 @@ function onReset(formRef: FormInstance) {
emit
(
'reset'
,
formRef
)
emit
(
'reset'
,
formRef
)
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -64,6 +71,41 @@ function onReset(formRef: FormInstance) {
...
@@ -64,6 +71,41 @@ function onReset(formRef: FormInstance) {
/>
/>
</el-form-item>
</el-form-item>
</page-wrapper-search>
</page-wrapper-search>
<!--
<page-wrapper-search
:model=
"queryForm"
:extraButtons=
"[
{
text: '导出',
icon: Edit,
type: 'success',
onClick: handleExport
},
{
text: '打印',
type: 'warning',
onClick: handlePrint
}
]"
@search="onSearch"
@reset="onReset">
<el-form-item
label=
"项目名称"
prop=
"proName"
>
<el-input
v-model=
"queryForm.proName"
placeholder=
"请输入项目名称"
clearable
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"note"
>
<el-input
v-model=
"queryForm.note"
placeholder=
"请输入备注"
clearable
/>
</el-form-item>
</page-wrapper-search>
-->
</
template
>
</
template
>
<
style
scoped
>
<
style
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论