增加自适应组件

This commit is contained in:
aixianling
2023-10-11 18:21:40 +08:00
parent 7be1dfd235
commit 6b7ff8e58c
7 changed files with 238 additions and 3 deletions

View File

@@ -2,7 +2,9 @@
<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}" v-model="active" @fullscreen="handleFullScreen" @setting="e=>dialog=e"
<slot v-if="$scopedSlots.head" name="head" v-bind="{...$props,...$data}"/>
<component v-else :is="headerComponent" v-bind="{...$props,...$data}" v-model="active"
@fullscreen="handleFullScreen" @setting="e=>dialog=e"
@change="e=>$emit('change',e)"/>
<div class="fill">
<slot/>
@@ -43,7 +45,7 @@ export default {
},
value: {default: ''},
/**
* 布局方案:black,classic
* 布局方案:black,classic,fengdu
*/
type: {default: "black"},
background: {default: ""}
@@ -59,7 +61,7 @@ export default {
},
headerComponent: v => ({
classic: Classic,
black: Primary
black: Primary,
}[v.type])
},
watch: {
@@ -92,6 +94,7 @@ export default {
el.mozCancelFullScreen || el.exitFullScreen;
cfs.call(el)
}
return this.fullscreen
},
handleSetting() {
if (this.setting.timer) clearInterval(this.setting.timer)