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">
<dv-full-screen-container>
<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">
<slot/>
</div>

View File

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