mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-28 05:03:31 +08:00
chore: detail optimization
This commit is contained in:
17
src/views/demo/feat/tab-params/index.vue
Normal file
17
src/views/demo/feat/tab-params/index.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div class="p-4"> Current Param : {{ params }} </div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, unref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const { currentRoute } = useRouter();
|
||||
return {
|
||||
params: computed(() => {
|
||||
return unref(currentRoute).params;
|
||||
}),
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user