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