表格模版修改

This commit is contained in:
仲么了
2024-02-26 20:36:18 +08:00
parent c5d953ba49
commit ed90f125be
3 changed files with 12 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import PopupEdit from './dialog.vue'
import { mainHeight } from '@/utils/layout'
// 注意名字不要重复若要保持页面存活名字需要和路由admin后面的字符保持一致
defineOptions({
@@ -37,6 +38,8 @@ defineOptions({
})
const popupEdit = ref()
const tableStore = new TableStore({
// 若页面表格高度需要调整请修改publicHeight(内容区域除表格外其他内容的高度)
// publicHeight: 60,
url: '/user-boot/user/list',
method: 'POST',
column: [
@@ -153,8 +156,9 @@ const tableStore = new TableStore({
})
}
})
// 注入到子组件
provide('tableStore', tableStore)
// 默认参数 参数多的话可以使用Object.assign方法
tableStore.table.params.searchState = 1
tableStore.table.params.searchValue = ''
tableStore.table.params.casualUser = -1
@@ -164,6 +168,7 @@ onMounted(() => {
tableStore.index()
})
// 弹框
const addUser = () => {
popupEdit.value.open('新增用户')
}