From 3ebcd0b8823e541c680149623088c1c36854647e Mon Sep 17 00:00:00 2001 From: zhangli <2235006734@qq.com> Date: Wed, 11 Oct 2023 13:50:11 +0800 Subject: [PATCH] tabs --- src/components/Tabs/src/Tabs.vue | 7 ++----- src/utils/disposition/tabsList.ts | 1 - src/views/wms/itembasic/ItembasicDetail.vue | 7 ++++++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Tabs/src/Tabs.vue b/src/components/Tabs/src/Tabs.vue index 51b09088b..8d23db972 100644 --- a/src/components/Tabs/src/Tabs.vue +++ b/src/components/Tabs/src/Tabs.vue @@ -26,11 +26,8 @@ const props = defineProps({ default: 0 }, }) -const tabsList = ref(JSON.parse(JSON.stringify(props.tabsList))) -tabsList.value.unshift({ - label: '详情', - prop:'Detail' -}) +const tabsList = props.tabsList + const current = ref(props.current); const change = (item, index) => { current.value = index diff --git a/src/utils/disposition/tabsList.ts b/src/utils/disposition/tabsList.ts index 6100821c3..f9415ba9c 100644 --- a/src/utils/disposition/tabsList.ts +++ b/src/utils/disposition/tabsList.ts @@ -1,5 +1,4 @@ // 页面tabs标签 - export const ItemBasicTabsList = [{ label: "供应商物品", prop: 'SupplierItems', diff --git a/src/views/wms/itembasic/ItembasicDetail.vue b/src/views/wms/itembasic/ItembasicDetail.vue index 535389e14..6ee9d5264 100644 --- a/src/views/wms/itembasic/ItembasicDetail.vue +++ b/src/views/wms/itembasic/ItembasicDetail.vue @@ -4,7 +4,7 @@ {{ detailData.code }} {{ detailData.name }} - +
@@ -43,6 +43,11 @@ const { query } = useRoute() // 路由的查询 import * as ItembasicApi from '@/api/wms/itembasic' import * as UserApi from '@/api/system/user' +const tabsList = ref(JSON.parse(JSON.stringify(ItemBasicTabsList))) +tabsList.value.unshift({ + label: '详情', + prop: 'Detail' +}) // 搜索参数 const queryParams = reactive({ title: '',