perf: 调整
This commit is contained in:
@ -110,8 +110,8 @@ const props = defineProps({
|
||||
default: () => [],
|
||||
},
|
||||
rowSelection: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
selectedRowKeys: {
|
||||
type: Array,
|
||||
|
||||
@ -19,7 +19,7 @@ export default defineComponent({
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const activeKey = ref('1');
|
||||
const activeKey = ref('');
|
||||
|
||||
onMounted(() => {
|
||||
activeKey.value = TABS.find((item) => item.routeName === route.name)?.key;
|
||||
@ -34,7 +34,7 @@ export default defineComponent({
|
||||
item.key === activeKey.value ? '!color-#6D4CFE font-500' : ''
|
||||
}`}
|
||||
onClick={() => {
|
||||
activeKey.value = item.key;
|
||||
activeKey.value = '';
|
||||
router.push({ name: item.routeName });
|
||||
}}
|
||||
>
|
||||
@ -42,7 +42,11 @@ export default defineComponent({
|
||||
</p>
|
||||
))}
|
||||
</header>
|
||||
{activeKey.value === '1' ? <FinishedProducts /> : <RawMaterial />}
|
||||
{activeKey.value === '1' ? (
|
||||
<FinishedProducts />
|
||||
) : activeKey.value === '2' ? (
|
||||
<RawMaterial />
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user