修改菜单逻辑.

This commit is contained in:
lijiahang
2023-08-02 17:08:40 +08:00
parent 4322f01354
commit 7915198be4
16 changed files with 230 additions and 94 deletions

View File

@@ -81,7 +81,9 @@
if (!errors) {
setLoading(true);
try {
// 执行登陆
await userStore.login(values as LoginData);
// 跳转路由
const { redirect, ...othersQuery } = router.currentRoute.value.query;
router.push({
name: (redirect as string) || 'workplace',

View File

@@ -2,13 +2,16 @@
<div>
<p>UserChild 2</p>
<h1 v-permission="['admin']">123</h1>
<button @click="red">red</button>
</div>
</template>
<script>
export default {
name: 'UserChild2',
};
<script lang="ts" setup>
import router from '@/router';
function red() {
router.push({ name: 'workplace' });
}
</script>
<style scoped>