表格优化
This commit is contained in:
@@ -1,53 +1,24 @@
|
||||
<template>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity name">
|
||||
<el-input />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary">新增</el-button>
|
||||
<el-button type='primary' @click='addMenu'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :pagination="false" />
|
||||
<Table ref='tableRef' :pagination='false' />
|
||||
<popupForm ref='popupRef'></popupForm>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import popupForm from './popupForm.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'auth/menu'
|
||||
})
|
||||
const tableRef = ref()
|
||||
const popupRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/user-boot/function/functionTree',
|
||||
column: [
|
||||
@@ -71,7 +42,26 @@ const tableStore = new TableStore({
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'tipButton'
|
||||
render: 'tipButton',
|
||||
click: (row) => {
|
||||
popupRef.value.open('编辑菜单', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText:'确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除该菜单吗?',
|
||||
},
|
||||
click: (row) => {
|
||||
popupRef.value.open('编辑菜单', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -83,4 +73,8 @@ onMounted(() => {
|
||||
tableStore.table.ref = tableRef.value
|
||||
tableStore.index()
|
||||
})
|
||||
const addMenu = () => {
|
||||
console.log(popupRef)
|
||||
popupRef.value.open('新增菜单')
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user