Commit e9489f9a by hank

修改keppalive bug

parent b637e69d
<template>
<div id="app">
<keep-alive v-if="$route.meta.keepAlive">
<keep-alive >
<router-view class="child-view" />
</keep-alive>
<router-view class="child-view" v-if="!$route.meta.keepAlive" />
<!-- <router-view class="child-view" v-if="!$route.meta.keepAlive" /> -->
<!-- <transition :name="transitionName" >
</transition>-->
......
......@@ -264,22 +264,23 @@
<draggable
class="page-list-container"
:scroll="true"
:delay="0"
draggable=".page-item"
:delay="500"
group="listData"
@change="dragChange"
:list="templateData.listData"
>
<div class="page-item" v-for="(item, index) in templateData.listData" :key="index">
<div name="clear" class="delete-page" @click="deletePage(index)"></div>
<div
:src="item.thumb"
class="img"
:style="{'background': `url(${item.thumb}) no-repeat center` }"
alt
:class="{'page-item-thumb': templateData.templateShow !== 'HORIZONTAL'}"
></div>
<div class="name">{{item.name}}</div>
<div name="clear" class="delete-page" @click="deletePage(index)"></div>
<div class="page-item-item">
<div
:src="item.thumb"
class="img"
:style="{'background': `url(${item.thumb}) no-repeat center` }"
alt
:class="{'page-item-thumb': templateData.templateShow !== 'HORIZONTAL'}"
></div>
<div class="name">{{item.name}}</div>
</div>
</div>
</draggable>
</div>
......@@ -519,7 +520,7 @@ export default {
// 放页面拖拽发生时执行
this.message({
type: "setList",
pages: this.templateData.listData
pages: this.templateData.listData
});
},
setList() {
......@@ -647,7 +648,7 @@ export default {
this.loaded = true;
},
iframeLoad() {
this.$toast.clear()
this.$toast.clear();
this.gifloaded = true;
this.iframeLoaded = true;
this.setList();
......@@ -817,8 +818,8 @@ export default {
},
enterSubmit() {
if (Object.values(this.$store.getters.errorData).length) {
alert('当前编辑项数据不符合定义规则,请修改后发布!')
return
alert("当前编辑项数据不符合定义规则,请修改后发布!");
return;
}
this.$toast.loading({
overlay: true,
......
......@@ -4,7 +4,7 @@
<div class="content">
<div class="content-left">
<iframe
@load="getData"
@load="setDataList"
class="iframe preview-iframe"
v-if="loaded"
id="previewiframe"
......@@ -72,6 +72,7 @@ export default {
this.$router.back();
},
message(data) {
console.log(window.frames["previewiframe"], "12313132");
window.frames["previewiframe"].postMessage(
data,
"https://visual-clouds.bdideal.com"
......@@ -81,11 +82,12 @@ export default {
getData() {
this.templateData = JSON.parse(window.localStorage.getItem("preview"));
this.loaded = true;
},
setDataList() {
console.log('setDataList')
this.message({
type: "setList",
pages: this.templateData.listData,
list: this.templateData.listData
pages: JSON.parse(JSON.stringify(this.templateData.listData))
});
}
},
......
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 sign in to comment