refactor: 优化 GiTable 列类型使用

This commit is contained in:
2024-04-16 20:20:57 +08:00
parent 2e2927a189
commit 35c59e219e
11 changed files with 32 additions and 28 deletions

View File

@@ -94,15 +94,16 @@
<script setup lang="ts">
import { listMenu, deleteMenu, type MenuResp, type MenuQuery } from '@/apis'
import { Message, type TableInstance } from '@arco-design/web-vue'
import { Message } from '@arco-design/web-vue'
import type GiTable from '@/components/GiTable/index.vue'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import AddMenuModal from './AddMenuModal.vue'
import { DisEnableStatusList } from '@/constant/common'
import { isMobile } from '@/utils'
defineOptions({ name: 'Menu' })
const columns: TableInstance['columns'] = [
const columns: TableInstanceColumns[] = [
{ title: '菜单标题', dataIndex: 'title', slotName: 'title', width: 170, fixed: !isMobile() ? 'left' : undefined },
{ title: '类型', slotName: 'type', align: 'center' },
{ title: '状态', slotName: 'status', align: 'center' },