|
@@ -19,13 +19,16 @@
|
|
<div class="action-part-title"><h2>编辑结构</h2></div>
|
|
<div class="action-part-title"><h2>编辑结构</h2></div>
|
|
<div class="action-part-body">
|
|
<div class="action-part-body">
|
|
<div class="type-list">
|
|
<div class="type-list">
|
|
- <div class="type-item">
|
|
|
|
- <el-button @click="addNewTopic('PANE_BOX')"
|
|
|
|
- ><i class="el-icon-plus"></i>编辑框</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in TOPIC_LIST"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="type-item"
|
|
|
|
+ @click="addNewTopic(item.type)"
|
|
|
|
+ >
|
|
|
|
+ <el-button><i class="el-icon-plus"></i>{{ item.name }}</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <p class="tips-info">提示:点击创建编辑框</p>
|
|
|
|
|
|
+ <p class="tips-info">提示:点击创建编辑结构</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="action-part">
|
|
<div class="action-part">
|
|
@@ -179,7 +182,12 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapState, mapMutations, mapActions } from "vuex";
|
|
import { mapState, mapMutations, mapActions } from "vuex";
|
|
-import { getElementModel, ELEMENT_LIST, PAGE_CONFIG } from "../elementModel";
|
|
|
|
|
|
+import {
|
|
|
|
+ getElementModel,
|
|
|
|
+ ELEMENT_LIST,
|
|
|
|
+ TOPIC_LIST,
|
|
|
|
+ PAGE_CONFIG,
|
|
|
|
+} from "../elementModel";
|
|
import { getModel as getPageModel, PAGE_TYPE } from "../elements/page/model";
|
|
import { getModel as getPageModel, PAGE_TYPE } from "../elements/page/model";
|
|
|
|
|
|
import PagePropEdit from "./PagePropEdit";
|
|
import PagePropEdit from "./PagePropEdit";
|
|
@@ -214,6 +222,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
ELEMENT_LIST,
|
|
ELEMENT_LIST,
|
|
|
|
+ TOPIC_LIST,
|
|
PAGE_TYPE,
|
|
PAGE_TYPE,
|
|
isSubmit: false,
|
|
isSubmit: false,
|
|
};
|
|
};
|
|
@@ -294,6 +303,7 @@ export default {
|
|
this.changePage(0);
|
|
this.changePage(0);
|
|
},
|
|
},
|
|
addNewTopic(type) {
|
|
addNewTopic(type) {
|
|
|
|
+ // if (type === 'PAGE')
|
|
let element = getElementModel(type);
|
|
let element = getElementModel(type);
|
|
element.w = document.getElementById("topic-column").offsetWidth;
|
|
element.w = document.getElementById("topic-column").offsetWidth;
|
|
this.addElement(element);
|
|
this.addElement(element);
|