Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kadycui
game-admin
提交
b773ac1f
game-admin
项目概览
kadycui
/
game-admin
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
game-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b773ac1f
编写于
9月 20, 2023
作者:
kadycui
💻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ADD: 高级搜索控制
上级
98ee8763
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
46 deletion
+37
-46
src/components/Search.vue
src/components/Search.vue
+10
-4
src/pages/goods/list.vue
src/pages/goods/list.vue
+1
-2
src/pages/manager/list.vue
src/pages/manager/list.vue
+26
-40
未找到文件。
src/components/Search.vue
浏览文件 @
b773ac1f
<
template
>
<el-form
:model=
"
searchForm
"
label-width=
"80px"
class=
"mb-3"
size=
"small"
>
<el-form
:model=
"
model
"
label-width=
"80px"
class=
"mb-3"
size=
"small"
>
<el-row
:gutter=
"20"
>
<slot/>
...
...
@@ -11,7 +11,7 @@
<div
class=
"flex items-center justify-end"
>
<el-button
type=
"primary"
@
click=
"$emit('search')"
>
搜索
</el-button>
<el-button
@
click=
"$emit('reset')"
>
重置
</el-button>
<el-button
type=
"primary"
text
@
click=
" showSearch = !showSearch"
>
<el-button
type=
"primary"
text
@
click=
" showSearch = !showSearch"
v-if=
"hasShowSearch"
>
{{ showSearch ? '收起' : '展开' }}
<el-icon>
<ArrowUp
v-if=
"showSearch"
/>
...
...
@@ -25,11 +25,17 @@
</template>
<
script
setup
>
import
{
ref
}
from
'
vue
'
import
{
ref
,
useSlots
}
from
'
vue
'
defineProps
({
model
:
Object
})
const
showSearch
=
ref
(
false
)
defineEmits
(
"
search
"
,
"
reset
"
)
const
slots
=
useSlots
()
const
hasShowSearch
=
ref
(
!!
slots
.
show
)
</
script
>
\ No newline at end of file
src/pages/goods/list.vue
浏览文件 @
b773ac1f
...
...
@@ -7,7 +7,7 @@
</el-tabs>
<el-card
shadow=
"never"
class=
"border-0"
>
<!-- 搜索 -->
<Search
@
search=
"getData"
@
reset=
"resetSearchForm"
>
<Search
:model=
"searchForm"
@
search=
"getData"
@
reset=
"resetSearchForm"
>
<SearchItem
label=
"关键词"
>
<el-input
v-model=
"searchForm.title"
placeholder=
"商品名称"
clearable
></el-input>
</SearchItem>
...
...
@@ -25,7 +25,6 @@
<!-- 新增 | 刷新 -->
<ListHeader
@
create=
"handleCreate"
@
refresh=
"getData"
/>
<el-table
v-loading=
"loading"
element-loading-text=
"加载中..."
element-loading-spinner=
"el-icon-loading"
:data=
"tableData"
stripe
style=
"width: 300%"
>
<el-table-column
label=
"商品"
width=
"300"
>
...
...
src/pages/manager/list.vue
浏览文件 @
b773ac1f
<
template
>
<el-card
shadow=
"never"
class=
"border-0"
>
<el-form
:model=
"searchForm"
label-width=
"80px"
class=
"mb-3"
size=
"small"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
:offset=
"0"
>
<el-form-item
label=
"关键词"
>
<el-input
v-model=
"searchForm.keyword"
placeholder=
"管理员昵称"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
:offset=
"8"
>
<div
class=
"flex items-center justify-end"
>
<el-button
type=
"primary"
@
click=
"getData"
>
搜索
</el-button>
<el-button
@
click=
"resetSearchForm"
>
重置
</el-button>
</div>
</el-col>
</el-row>
</el-form>
<!-- 搜索 -->
<!-- 搜索 -->
<Search
:model=
"searchForm"
@
search=
"getData"
@
reset=
"resetSearchForm"
>
<SearchItem
label=
"关键词"
>
<el-input
v-model=
"searchForm.keyword"
placeholder=
"管理员昵称"
clearable
></el-input>
</SearchItem>
</Search>
<!-- 新增 | 刷新 -->
<ListHeader
@
create=
"handleCreate"
@
refresh=
"getData"
/>
<el-table
v-loading=
"loading"
element-loading-text=
"加载中..."
element-loading-spinner=
"el-icon-loading"
:data=
"tableData"
stripe
style=
"width: 100%"
>
<ListHeader
@
create=
"handleCreate"
@
refresh=
"getData"
/>
<el-table
v-loading=
"loading"
element-loading-text=
"加载中..."
element-loading-spinner=
"el-icon-loading"
:data=
"tableData"
stripe
style=
"width: 100%"
>
<el-table-column
label=
"管理员"
width=
"200"
>
<template
#default
="
{ row }">
<div
class=
"flex items-center"
>
...
...
@@ -118,6 +102,8 @@ import {
import
FormDrawer
from
"
@/components/FormDrawer.vue
"
import
ListHeader
from
"
@/components/ListHeader.vue
"
import
ChooseImage
from
"
@/components/ChooseImage.vue
"
import
Search
from
"
@/components/Search.vue
"
import
SearchItem
from
"
@/components/SearchItem.vue
"
import
{
useInitTable
,
useInitForm
}
from
"
@/composables/useCommon.js
"
...
...
@@ -148,7 +134,7 @@ const {
total
.
value
=
res
.
totalCount
roles
.
value
=
res
.
roles
},
delete
:
deleteManager
,
delete
:
deleteManager
,
updateStatus
:
updateManagerStatus
})
...
...
@@ -166,19 +152,19 @@ const {
handleEdit
,
}
=
useInitForm
(
{
form
:
{
username
:
""
,
password
:
""
,
role_id
:
null
,
status
:
1
,
avatar
:
""
},
getData
,
update
:
updateManager
,
create
:
createManager
,
})
{
form
:
{
username
:
""
,
password
:
""
,
role_id
:
null
,
status
:
1
,
avatar
:
""
},
getData
,
update
:
updateManager
,
create
:
createManager
,
})
</
script
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录