This commit is contained in:
yanran200730
2023-03-15 11:02:27 +08:00
2 changed files with 10 additions and 4 deletions

View File

@@ -2,7 +2,8 @@
<section class="AiDvWrapper" :class="'AiDvWrapper' + theme"> <section class="AiDvWrapper" :class="'AiDvWrapper' + theme">
<dv-full-screen-container> <dv-full-screen-container>
<div class="viewPanel column" flex :style="{backgroundImage:`url('${background}')`}"> <div class="viewPanel column" flex :style="{backgroundImage:`url('${background}')`}">
<component :is="headerComponent" v-bind="{...$props,...$data}" @fullscreen="handleFullScreen" @setting="e=>dialog=e" @change="e=>$emit('change',e)"/> <component :is="headerComponent" v-bind="{...$props,...$data}" v-model="active" @fullscreen="handleFullScreen" @setting="e=>dialog=e"
@change="e=>$emit('change',e)"/>
<div class="fill"> <div class="fill">
<slot/> <slot/>
</div> </div>

View File

@@ -3,7 +3,7 @@
<div flex class="content"> <div flex class="content">
<b class="headerTitle" v-text="title"/> <b class="headerTitle" v-text="title"/>
<el-tabs class="fill" v-model="current" @tab-click="$emit('change', current)"> <el-tabs class="fill" v-model="current" @tab-click="$emit('change', current)">
<el-tab-pane v-for="tab in tabs" :key="tab.id" :label="tab.label" :name="tab.name"/> <el-tab-pane v-for="tab in tabs" :key="tab.id" :label="tab.label" :name="tab.id"/>
</el-tabs> </el-tabs>
<div class="rightPane" flex> <div class="rightPane" flex>
<div class="item" v-text="currentTime"/> <div class="item" v-text="currentTime"/>
@@ -17,6 +17,10 @@
<script> <script>
export default { export default {
name: "primary", name: "primary",
model: {
prop: "active",
event: "change"
},
props: { props: {
title: String, title: String,
views: {default: () => []}, views: {default: () => []},
@@ -53,6 +57,7 @@ export default {
} }
}, },
created() { created() {
this.current = this.$copy(this.active)
// this.getWeather() // this.getWeather()
} }
} }
@@ -157,11 +162,11 @@ export default {
background-position: left center; background-position: left center;
&.setting { &.setting {
background-image: url("../assets/settingIcon.png")!important; background-image: url("../assets/settingIcon.png") !important;
} }
&.fullscreen { &.fullscreen {
background-image: url("../assets/fullscreenIcon.png")!important; background-image: url("../assets/fullscreenIcon.png") !important;
} }
} }
} }