菜单管理

This commit is contained in:
仲么了
2024-01-18 18:19:59 +08:00
parent 466d377b87
commit d9f5112f81
12 changed files with 479 additions and 802 deletions

View File

@@ -89,8 +89,9 @@
</template>
<script setup lang="ts">
import { ref, nextTick, inject, computed } from 'vue'
import type { ElTable, TableInstance } from 'element-plus'
import { ref, nextTick, inject, computed, onMounted } from 'vue'
import type { ElTable } from 'element-plus'
import { VxeTableInstance } from 'vxe-table'
import FieldRender from '@/components/table/fieldRender/index.vue'
import Column from '@/components/table/column/index.vue'
import { useConfig } from '@/stores/config'
@@ -98,7 +99,7 @@ import type TableStoreClass from '@/utils/tableStore'
import { defaultAttribute } from '@/components/table/defaultAttribute'
const config = useConfig()
const tableRef = ref<TableInstance>()
const tableRef = ref<VxeTableInstance>()
const tableStore = inject('tableStore') as TableStoreClass
interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>> {
@@ -108,6 +109,9 @@ interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>>
const props = withDefaults(defineProps<Props>(), {
isGroup: false
})
onMounted(() => {
tableStore.table.ref = tableRef.value as VxeTableInstance
})
console.log(props)
const onTableSizeChange = (val: number) => {
tableStore.onTableAction('page-size-change', { size: val })