切换tab修复
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user