mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 12:59:24 +08:00
fix: 临时修复 GiTable 升级后代码生成配置页面卡死问题
This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
:scrollbar="true"
|
:scrollbar="true"
|
||||||
:data="data"
|
:data="data"
|
||||||
column-resizable
|
column-resizable
|
||||||
|
@change="handleTableChange"
|
||||||
>
|
>
|
||||||
<template v-for="key in Object.keys(slots)" :key="key" #[key]="scope">
|
<template v-for="key in Object.keys(slots)" :key="key" #[key]="scope">
|
||||||
<slot :key="key" :name="key" v-bind="scope" />
|
<slot :key="key" :name="key" v-bind="scope" />
|
||||||
@@ -97,6 +98,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'refresh'): void
|
(e: 'refresh'): void
|
||||||
(e: 'update:columns', columns: TableColumnData[]): void
|
(e: 'update:columns', columns: TableColumnData[]): void
|
||||||
|
(e: 'change', ...args: any[]): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
/** Slots 类型定义 */
|
/** Slots 类型定义 */
|
||||||
@@ -217,6 +219,12 @@ const visibleColumns = computed(() => {
|
|||||||
return props.columns?.filter((col) => col.show !== false) || []
|
return props.columns?.filter((col) => col.show !== false) || []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 处理表格变化的函数
|
||||||
|
const handleTableChange = (...args: any[]) => {
|
||||||
|
// 将接收到的参数传递给父组件
|
||||||
|
emit('change', ...args)
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
tableRef,
|
tableRef,
|
||||||
resetColumns: () => columnSettingRef.value?.resetColumns?.(),
|
resetColumns: () => columnSettingRef.value?.resetColumns?.(),
|
||||||
|
Reference in New Issue
Block a user