表格模版修改
This commit is contained in:
@@ -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('新增用户')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user