mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 1.0 beta
This commit is contained in:
@ -1,27 +0,0 @@
|
||||
<template>
|
||||
<n-space :vertical="true" :size="16">
|
||||
<n-card title="Tab Detail" :bordered="false" size="small" class="rounded-8px shadow-sm">
|
||||
<n-space :vertical="true" :size="12">
|
||||
<div>当前路由的描述数据(meta):</div>
|
||||
<div>{{ route.meta }}</div>
|
||||
<n-button @click="handleToTab">返回Tab</n-button>
|
||||
</n-space>
|
||||
</n-card>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router';
|
||||
import { routeName } from '@/router';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
||||
const { routerPush } = useRouterPush();
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
function handleToTab() {
|
||||
routerPush({ name: routeName('function_tab') });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<n-space :vertical="true" :size="16">
|
||||
<n-card title="Tab Detail" :bordered="false" size="small" class="rounded-8px shadow-sm">
|
||||
<n-space :vertical="true" :size="12">
|
||||
<div>当前路由的描述数据(meta):</div>
|
||||
<div>{{ route.meta }}</div>
|
||||
<div>当前路由的查询数据(query):</div>
|
||||
<div>{{ route.query }}</div>
|
||||
<n-button @click="handleToTab">返回Tab</n-button>
|
||||
</n-space>
|
||||
</n-card>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router';
|
||||
import { routeName } from '@/router';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
||||
const route = useRoute();
|
||||
const { routerPush } = useRouterPush();
|
||||
|
||||
function handleToTab() {
|
||||
routerPush({ name: routeName('function_tab') });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
@ -1,44 +0,0 @@
|
||||
<template>
|
||||
<n-space :vertical="true" :size="16">
|
||||
<n-card title="Tab Home" :bordered="false" size="small" class="rounded-8px shadow-sm">
|
||||
<n-space :vertical="true" :size="12">
|
||||
<n-button @click="handleToTabDetail">跳转Tab Detail</n-button>
|
||||
<n-button @click="handleToTabMultiDetail(1)">跳转Tab Multi Detail 1</n-button>
|
||||
<n-button @click="handleToTabMultiDetail(2)">跳转Tab Multi Detail 2</n-button>
|
||||
<n-input-group>
|
||||
<n-input v-model:value="title" />
|
||||
<n-button type="primary" @click="handleSetTitle">设置当前Tab页标题</n-button>
|
||||
</n-input-group>
|
||||
</n-space>
|
||||
</n-card>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { routeName } from '@/router';
|
||||
import { useTabStore } from '@/store';
|
||||
import { useRouterPush } from '@/composables';
|
||||
|
||||
const { routerPush } = useRouterPush();
|
||||
const tabStore = useTabStore();
|
||||
const title = ref('');
|
||||
|
||||
function handleToTabDetail() {
|
||||
routerPush({ name: routeName('function_tab-detail'), query: { name: 'abc' }, hash: '#DEMO_HASH' });
|
||||
}
|
||||
|
||||
function handleToTabMultiDetail(num: number) {
|
||||
routerPush({ name: routeName('function_tab-multi-detail'), query: { name: 'abc', num }, hash: '#DEMO_HASH' });
|
||||
}
|
||||
|
||||
function handleSetTitle() {
|
||||
if (!title.value) {
|
||||
window.$message?.warning('请输入要设置的标题名称');
|
||||
} else {
|
||||
tabStore.setActiveTabTitle(title.value);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped></style>
|
Reference in New Issue
Block a user