fix: vue received a Component that was made a reactive object (#4367)

This commit is contained in:
Li Kui
2024-09-11 22:56:01 +08:00
committed by GitHub
parent 8f6bf6add3
commit 61faa1895a
9 changed files with 507 additions and 233 deletions

View File

@@ -40,6 +40,7 @@
"@vben-core/composables": "workspace:*",
"@vben-core/icons": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*",
"@vben-core/shared": "workspace:*",
"@vben-core/typings": "workspace:*",
"@vueuse/core": "^11.0.3",
"vue": "^3.5.4"

View File

@@ -7,6 +7,7 @@ import { computed, ref } from 'vue';
import { Pin, X } from '@vben-core/icons';
import { VbenContextMenu, VbenIcon } from '@vben-core/shadcn-ui';
import { deepToRaw } from '@vben-core/shared/utils';
interface Props extends TabsProps {}
@@ -40,7 +41,8 @@ const style = computed(() => {
});
const tabsView = computed((): TabConfig[] => {
return props.tabs.map((tab) => {
return props.tabs.map((_tab) => {
const tab = deepToRaw(_tab);
return {
...tab,
affixTab: !!tab.meta?.affixTab,

View File

@@ -7,6 +7,7 @@ import { computed } from 'vue';
import { Pin, X } from '@vben-core/icons';
import { VbenContextMenu, VbenIcon } from '@vben-core/shadcn-ui';
import { deepToRaw } from '@vben-core/shared/utils';
interface Props extends TabsProps {}
@@ -46,7 +47,8 @@ const typeWithClass = computed(() => {
});
const tabsView = computed((): TabConfig[] => {
return props.tabs.map((tab) => {
return props.tabs.map((_tab) => {
const tab = deepToRaw(_tab);
return {
...tab,
affixTab: !!tab.meta?.affixTab,