fix: 使 Table 组件支持列宽和固定列配置
This commit is contained in:
parent
5064845d4e
commit
f3622d423a
@ -1,7 +1,7 @@
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { AxiosPromise } from 'axios'
|
import { AxiosPromise } from 'axios'
|
||||||
import { findIndex } from '@/utils'
|
import { findIndex } from '@/utils'
|
||||||
import { eachTree, treeMap, filter } from '@/utils/tree'
|
import { eachTree, filter, treeMap } from '@/utils/tree'
|
||||||
import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict'
|
import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
import { FormSchema } from '@/types/form'
|
import { FormSchema } from '@/types/form'
|
||||||
@ -36,8 +36,11 @@ type CrudSearchParams = {
|
|||||||
type CrudTableParams = {
|
type CrudTableParams = {
|
||||||
// 是否显示表头
|
// 是否显示表头
|
||||||
show?: boolean
|
show?: boolean
|
||||||
|
// 列宽配置
|
||||||
|
width?: number | string
|
||||||
|
// 列是否固定在左侧或者右侧
|
||||||
|
fixed?: 'left' | 'right'
|
||||||
} & Omit<FormSchema, 'field'>
|
} & Omit<FormSchema, 'field'>
|
||||||
|
|
||||||
type CrudFormParams = {
|
type CrudFormParams = {
|
||||||
// 是否显示表单项
|
// 是否显示表单项
|
||||||
show?: boolean
|
show?: boolean
|
||||||
|
2
src/types/table.d.ts
vendored
2
src/types/table.d.ts
vendored
@ -1,6 +1,8 @@
|
|||||||
export type TableColumn = {
|
export type TableColumn = {
|
||||||
field: string
|
field: string
|
||||||
label?: string
|
label?: string
|
||||||
|
width?: number | string
|
||||||
|
fixed?: 'left' | 'right'
|
||||||
children?: TableColumn[]
|
children?: TableColumn[]
|
||||||
} & Recordable
|
} & Recordable
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user