Browse Source

Fix bugs

1. 修复组件缓存无效.
2. 修复Table设置点击无效.
pull/784/head
cKey 3 years ago
parent
commit
40c2870d76
  1. 2
      apps/vue/src/components/Table/src/components/settings/ColumnSetting.vue
  2. 4
      apps/vue/src/layouts/page/index.vue
  3. 3
      apps/vue/src/utils/helper/treeHelper.ts

2
apps/vue/src/components/Table/src/components/settings/ColumnSetting.vue

@ -145,6 +145,7 @@
const emits = defineEmits(['columns-change']);
const { t } = useI18n();
const attrs = useAttrs();
const table = useTableContext();
const defaultRowSelection = omit(table.getRowSelection(), 'selectedRowKeys');
@ -379,7 +380,6 @@
}
function getPopupContainer() {
const attrs = useAttrs();
return isFunction(attrs.getPopupContainer)
? attrs.getPopupContainer()
: getParentContainer();

4
apps/vue/src/layouts/page/index.vue

@ -15,9 +15,7 @@
appear
>
<keep-alive v-if="openCache" :include="getCaches">
<div :key="route.name!">
<component :is="Component" :key="route.fullPath" />
</div>
<component :is="Component" :key="route.fullPath" />
</keep-alive>
<div v-else :key="route.name!">
<component :is="Component" :key="route.fullPath" />

3
apps/vue/src/utils/helper/treeHelper.ts

@ -25,6 +25,9 @@ export function listToTree<T = any>(list: any[], config: Partial<TreeHelperConfi
for (const node of list) {
const parent = nodeMap.get(node[pid]);
(parent ? parent[children] : result).push(node);
if (parent) {
parent.hasChildren = true;
}
}
return result;
}

Loading…
Cancel
Save