添加全局容器组件
This commit is contained in:
32
src/components/Container.vue
Normal file
32
src/components/Container.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<script setup>
|
||||
import AppBackground from "@/components/AppBackground.vue";
|
||||
import Header from "@/components/Header.vue";
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
bgType: {
|
||||
type: String,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<AppBackground :bgType="bgType" />
|
||||
<Header :title="title" />
|
||||
<view class="content">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(100vh - 96px);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user