Commit e7076f82 by hank

解析group 类型

parent 83c3a523
......@@ -30,11 +30,33 @@
class="edit-input"
type="text"
@blur="onBlur"
@change="valueChange2()"
v-model="schemaData[item.dataKey].value"
@keyup="valueChange2()"
/>
<textarea
v-if="item.type === 'textarea'"
class="edit-input-area"
@blur="onBlur"
v-model="schemaData[item.dataKey].value"
@keyup="valueChange2()"
@input="valueChange2()"
cols="30"
rows="5"
></textarea>
</div>
<div v-if="item.type === 'group'">
<div v-for="(children, index) in item.itemList" :key="index">
<editMenu
:isIos="isIos"
:itemList="item.itemList"
:item="children"
:schemaData="schemaData"
:frameUrl="frameUrl"
@setList="setList"
></editMenu>
</div>
</div>
<div class="list-container" v-if="item.type === 'list'">
<div
class="create-btn-container"
......@@ -58,6 +80,17 @@
v-model="item2[index3]"
@keyup="valueChange2()"
/>
<textarea
cols="30"
rows="5"
v-if="item.modelSchema[isSchemaIndex(item2)][index3].type === 'textarea'"
:placeholder="item.modelSchema[isSchemaIndex(item2)][index3].description"
class="edit-input-area edit-input-list-item"
type="text"
@blur="onBlur"
v-model="item2[index3]"
@keyup="valueChange2()"
/>
<div>
<van-uploader
result-type="dataUrl"
......@@ -210,10 +243,22 @@ export default {
});
},
onBlur() {
var top = window.scrollY
console.log(top)
window.scrollTo(0, 0);
var time = setTimeout(() => {
window.scrollTo(0, top);
clearTimeout(time)
}, 100)
},
valueChange2() {
console.log(this.schemaData);
console.log(this.schemaData)
setTimeout(() => {
this.$emit("setList", this.schemaData);
}, 100)
this.$emit("setList", this.schemaData);
},
setList() {
this.$emit("setList", this.schemaData);
},
uploadItem(key) {
......@@ -477,6 +522,14 @@ export default {
color: rgba(51, 51, 51, 1);
margin-top: 0;
}
.edit-input-area {
width: 97%;
background: #f5f5f5;
border-radius: 6px;
font-size: 14px;
color: rgba(51, 51, 51, 1);
margin-top: 0;
}
}
</style>
......@@ -208,7 +208,7 @@
</div>
<div class="content-right">
<!-- <div class="title">编辑栏</div> -->
<div class="edit-area" :class="{'fixed-edit-area': clipimg}">
<div class="edit-area" :class="{'fixed-edit-area': clipImg}">
<div v-if="templateData.listData[currentPage]">
<editMenu
v-if="loaded "
......
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