修改菜单逻辑.
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user