模版更新

This commit is contained in:
仲么了
2024-02-26 19:58:36 +08:00
parent ab8b28ea22
commit c5d953ba49
2 changed files with 28 additions and 17 deletions

View File

@@ -1,10 +1,12 @@
<template>
<div class='default-main'>
<!-- 表头 -->
<TableHeader date-picker>
<template v-slot:operation>
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
</template>
</TableHeader>
<!-- 表格 -->
<Table ref='tableRef' />
</div>
</template>
@@ -15,12 +17,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import PopupEdit from './popupEdit.vue'
// 注意名字不要重复若要保持页面存活名字需要和路由admin后面的字符保持一致
defineOptions({
name: 'auth/userlist'
})
const tableStore = new TableStore({
url: '/user-boot/user/list',
method: 'POST',
@@ -88,7 +85,6 @@ const tableStore = new TableStore({
cancelButtonText: '取消',
inputType: 'password'
}).then(({ value }) => {
})
}
},
@@ -102,7 +98,6 @@ const tableStore = new TableStore({
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
},
click: row => {
}
},
{
@@ -115,7 +110,6 @@ const tableStore = new TableStore({
return row.state !== 1 && row.state !== 3
},
click: row => {
}
}
]
@@ -147,9 +141,11 @@ tableStore.table.params.searchState = 1
tableStore.table.params.casualUser = -1
tableStore.table.params.orderBy = ''
onMounted(() => {
// 加载数据
tableStore.index()
})
const addUser = () => {
popupEdit.value.open('新增用户')
}
</script>