Commit 04c6f943 authored by zhengke's avatar zhengke

增加组件

parent 8efaa50d
<style>
.diy-image-text {
width: 100%;
height: 500px;
overflow:hidden;
overflow-y: auto;
}
.bb{
visibility: hidden;
}
.classA{
visibility: visible;
}
</style>
<template>
<div :class="{'active':imageData.isCked}">
<div class="diy-component-options" v-if="imageData.isCked">
<el-button type="primary" icon="el-icon-delete" style="left: -25px; top: 0px;" @click="delPlugin()"></el-button>
<el-button type="primary" icon="el-icon-document-copy" style="left: -25px; top: 30px;"></el-button>
<el-button type="primary" icon="el-icon-arrow-up" v-if="index>0" @click="resetSord(0)"
style="right: -25px; top: 0;"></el-button>
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)"
style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-modal">
<div class="diy-component-preview">
<div class="diy-image-text">
<div v-if="data.content" v-html="jiance"></div>
<div v-else flex="main:center" style="line-height: 500px;color: rgb(173, 177, 184);">图文详情</div>
</div>
</div>
<div class="diy-component-edit bb" :class="{'classA':imageData.isCked}">
<UE :defaultMsg=defaultMsg :config=config ref="ue"></UE>
</div>
</div>
</div>
</template>
<script>
import UE from '@/components/global/UE.vue'
export default {
props: ["imageData", "index", "dataLeng"],
components: {
UE
},
data() {
return {
data: this.imageData.data,
defaultMsg: '',
config: {
initialFrameWidth: null,
initialFrameHeight: 350,
},
content:''
};
},
created() {
},
methods: {
//向父组件传值 并调用排序
resetSord(IsUp) {
this.$emit('getSord', this.index, IsUp);
},
//点击触发父组件删除
delPlugin() {
this.$emit('comDelPlugin', this.index);
},
},
computed: {
},
mounted() {
this.$refs.ue.InitData();
},
watch:{
}
};
</script>
......@@ -262,6 +262,8 @@
:index="index" :dataLeng="dataList.length"></modal>
<quickNav v-if="item.Id=='quick-nav'" :quickData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></quickNav>
<imageText v-if="item.Id=='image-text'" :imageData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></imageText>
</div>
</div>
</div>
......@@ -303,6 +305,7 @@
import advert from "../sallCenter/plugin/advert.vue"
import modal from "../sallCenter/plugin/modal.vue"
import quickNav from "../sallCenter/plugin/quick-nav.vue"
import imageText from "../sallCenter/plugin/image-text.vue"
export default {
data() {
return {
......@@ -344,7 +347,8 @@
empty,
advert,
modal,
quickNav
quickNav,
imageText
},
methods: {
//获取左侧菜单
......@@ -667,7 +671,7 @@
Id: 'image-text',
isCked: false,
data: {
position: 'auto'
content: '',
}
}
this.dataList.push(tuwenObj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment