vben
authored
|
1
|
<template>
|
vben
authored
|
2
|
<PageWrapper title="带参数标签页" content="支持带参数多tab缓存">
|
vben
authored
|
3
|
Current Param : {{ params }}
|
vben
authored
|
4
5
|
<br />
Keep Alive
|
Vben
authored
|
6
|
<Input />
|
vben
authored
|
7
|
</PageWrapper>
|
vben
authored
|
8
9
10
11
|
</template>
<script lang="ts">
import { computed, defineComponent, unref } from 'vue';
import { useRouter } from 'vue-router';
|
vben
authored
|
12
|
import { PageWrapper } from '/@/components/Page';
|
Vben
authored
|
13
|
import { Input } from 'ant-design-vue';
|
vben
authored
|
14
|
|
vben
authored
|
15
|
export default defineComponent({
|
vben
authored
|
16
|
name: 'TestTab',
|
Vben
authored
|
17
|
components: { PageWrapper, Input },
|
vben
authored
|
18
19
20
21
22
23
24
25
26
27
|
setup() {
const { currentRoute } = useRouter();
return {
params: computed(() => {
return unref(currentRoute).params;
}),
};
},
});
</script>
|