Commit 0d827096 authored by 黄奎's avatar 黄奎

页面修改

parent 52bd5f1f
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<div class="WebSite_right"> <div class="WebSite_right">
<div class="WebSite_right_preview"> <div class="WebSite_right_preview">
<div v-for="(item,index) in dataList" :key="index"> <div v-for="(item,index) in dataList" :key="index">
<plugvideo v-if="item.Id=='white_label_video'" :plugData="item.plugData"></plugvideo> <plugvideo v-if="item.Id=='white_label_video'" :plugData="item.plugData" :currentIndex="index"></plugvideo>
<plugpicture v-if="item.Id=='white_label_slider'" :plugData="item.plugData"></plugpicture> <plugpicture v-if="item.Id=='white_label_slider'" :plugData="item.plugData"></plugpicture>
</div> </div>
</div> </div>
...@@ -121,15 +121,17 @@ ...@@ -121,15 +121,17 @@
plugpicture plugpicture
}, },
methods: { methods: {
//获取数据
getsubplugdata(index, obj) {
this.dataList[index].plugData = obj;
},
//添加数据到组件列表 //添加数据到组件列表
AddData(item) { AddData(item) {
var obj = { var obj = {
Id: item.TemplateKey, Id: item.TemplateKey,
plugData: item.TemplateData plugData: item.TemplateData
}; };
console.log(item);
this.dataList.push(obj); this.dataList.push(obj);
console.log(this.dataList,'datalist');
}, },
//获取下拉框 //获取下拉框
getTemplate() { getTemplate() {
......
...@@ -98,11 +98,11 @@ ...@@ -98,11 +98,11 @@
<script> <script>
import plugvideodialog from "../plug-in/video_dialog.vue" import plugvideodialog from "../plug-in/video_dialog.vue"
export default { export default {
props: ["plugData"], props: ["plugData", "currentIndex"],
data() { data() {
return { return {
isShowDialog:false, isShowDialog: false,
dialogData:{} dialogData: JSON.parse(JSON.stringify(this.plugData)),
}; };
}, },
created() {}, created() {},
...@@ -110,21 +110,12 @@ ...@@ -110,21 +110,12 @@
plugvideodialog plugvideodialog
}, },
methods: { methods: {
//向父组件传值 并调用排序 setVideoInfo() {
// resetSord(IsUp) { this.$parent.getsubplugdata(this.currentIndex, this.dialogData);
// this.$emit('getSord', this.index, IsUp); this.isShowDialog = false;
// }, },
// //点击触发父组件删除
// delPlugin() {
// this.$emit('comDelPlugin', this.index);
// },
setVideoInfo(){
this.plugData=JSON.parse(JSON.stringify(this.dialogData));
this.isShowDialog=false;
},
}, },
mounted() { mounted() {}
this.dialogData=JSON.parse(JSON.stringify(this.plugData));
}
}; };
</script>
\ No newline at end of file </script>
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