refactor: 预览仪表板时点击过滤组件,视频不用刷新

This commit is contained in:
wangjiahao 2021-12-01 10:45:17 +08:00
parent 900cec8ccf
commit e139abdee5
2 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,7 @@
:element="config"
:search-count="searchCount"
:h="config.style.height"
:edit-mode="'preview'"
/>
</div>
</template>

View File

@ -4,7 +4,7 @@
<video-player
ref="videoPlayer"
class="vjs-custom-skin"
:options="playerOptions"
:options="editMode==='preview'?pOption:playerOptions"
:playsinline="true"
@play="onPlayerPlay($event)"
@pause="onPlayerPause($event)"
@ -45,7 +45,7 @@ export default {
editMode: {
type: String,
require: false,
default: 'preview'
default: 'edit'
},
active: {
type: Boolean,
@ -59,8 +59,13 @@ export default {
},
data() {
return {
pOption: {}
}
},
created() {
this.pOption = this.element.videoLinks[this.element.videoLinks.videoType]
this.pOption.height = this.h - (this.curGap * 2)
},
computed: {
moveFlag() {
return (this.element.optStatus.dragging || this.element.optStatus.resizing)