111
This commit is contained in:
13
Web/src/components/Abar.vue
Normal file
13
Web/src/components/Abar.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<router-link :to="url" :class="_class" >
|
||||||
|
<slot></slot>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
// 1. 定义接收父组件传来的参数 props
|
||||||
|
const props = defineProps({
|
||||||
|
// 字段名、类型、默认值
|
||||||
|
url: String,
|
||||||
|
_class:String,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<slot />
|
<slot />
|
||||||
|
<div class="footer">
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-empty">
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -9,9 +7,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.layout-empty {
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -85,6 +85,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
definePageMeta({
|
||||||
|
layout: layout.empty
|
||||||
|
})
|
||||||
|
showNotify({ message: '提示' });
|
||||||
// await navigateTo('/auth/login', { replace: true })
|
// await navigateTo('/auth/login', { replace: true })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user