mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 14:57:14 +08:00
feat: 优化 GiTable(同步 GiDemo 更新)
This commit is contained in:
@@ -123,7 +123,6 @@ import { Message } from '@arco-design/web-vue'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis/code/generator'
|
||||
import type { LabelValueState } from '@/types/global'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { type ColumnItem, GiForm } from '@/components/GiForm'
|
||||
import { useResetReactive } from '@/hooks'
|
||||
import { useDict } from '@/hooks/app'
|
||||
@@ -222,7 +221,7 @@ const getDataList = async (tableName: string, requireSync: boolean) => {
|
||||
}
|
||||
|
||||
// Table 字段配置
|
||||
const columns: TableInstanceColumns[] = [
|
||||
const columns: TableInstance['columns'] = [
|
||||
{ title: '名称', slotName: 'fieldName' },
|
||||
{ title: '类型', slotName: 'fieldType' },
|
||||
{ title: '描述', slotName: 'comment', width: 170 },
|
||||
|
@@ -61,10 +61,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { TableInstance } from '@arco-design/web-vue'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import GenConfigDrawer from './GenConfigDrawer.vue'
|
||||
import { downloadCode, generateCode, listGenConfig } from '@/apis/code/generator'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { useTable } from '@/hooks'
|
||||
import { isMobile } from '@/utils'
|
||||
|
||||
@@ -84,7 +84,7 @@ const {
|
||||
selectAll,
|
||||
search,
|
||||
} = useTable((page) => listGenConfig({ ...queryForm, ...page }), { immediate: true, formatResult: (data) => data.map((i) => ({ ...i, disabled: !i.createTime })) })
|
||||
const columns: TableInstanceColumns[] = [
|
||||
const columns: TableInstance['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
width: 66,
|
||||
|
Reference in New Issue
Block a user