监测点评估添加字段
This commit is contained in:
@@ -11,7 +11,7 @@ export const defaultAttribute: VxeTableProps = {
|
||||
scrollX: { scrollToLeftOnChange: true },
|
||||
scrollY: { enabled: false },
|
||||
// 注意:全局不要默认开启 treeConfig,会与 stripe 冲突;树表在页面自行配置
|
||||
customConfig: { enabled: true, allowFixed: true, storage: true, showFooter: false, immediate: true ,mode:'default'},
|
||||
customConfig: { enabled: true, allowFixed: true, storage: false, showFooter: false, immediate: true ,mode:'default'},
|
||||
showOverflow: 'tooltip',
|
||||
showHeaderOverflow: false
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
ref="tableRef"
|
||||
height="auto"
|
||||
:key="key"
|
||||
:id="getTableId()"
|
||||
:data="tableStore.table.data"
|
||||
v-loading="tableStore.table.loading"
|
||||
v-bind="tableBindProps"
|
||||
:id="getTableId()"
|
||||
@checkbox-all="selectChangeEvent"
|
||||
@checkbox-change="selectChangeEvent"
|
||||
@cell-click="onCellClick"
|
||||
@@ -105,9 +105,17 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
})
|
||||
const attrs = useAttrs()
|
||||
const tableBindProps = computed(() => {
|
||||
const enableStorage = props.showCustomColumn || !!tableStore?.table?.customColumnInHeader
|
||||
const baseCustomConfig = (defaultAttribute.customConfig || {}) as Record<string, any>
|
||||
const attrsCustomConfig = ((attrs.customConfig as Record<string, any>) || {}) as Record<string, any>
|
||||
return Object.assign({}, defaultAttribute, attrs, {
|
||||
showOverflow: props.showOverflow,
|
||||
showHeaderOverflow: false
|
||||
showHeaderOverflow: false,
|
||||
customConfig: {
|
||||
...baseCustomConfig,
|
||||
...attrsCustomConfig,
|
||||
storage: enableStorage ? true : !!attrsCustomConfig.storage
|
||||
}
|
||||
})
|
||||
})
|
||||
const onCellClick: VxeTableEvents.CellClick<any> = params => {
|
||||
|
||||
Reference in New Issue
Block a user