修改自定义显示逻辑
parent
308dcd0b88
commit
fe4706710b
|
|
@ -3,16 +3,16 @@
|
|||
<view class="wh-auto ht-auto pr">
|
||||
<view v-for="item in form.custom_list" :key="item.id" class="main-content" :style="{ left: get_percentage_count(item.location.x, div_width), top: get_percentage_count(item.location.y, div_height), width: get_percentage_count(item.com_data.com_width, div_width), height: get_percentage_count(item.com_data.com_height, div_height) }">
|
||||
<template v-if="item.key == 'text'">
|
||||
<model-text :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-text>
|
||||
<model-text :propkey="propkey" :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-text>
|
||||
</template>
|
||||
<template v-else-if="item.key == 'img'">
|
||||
<model-image :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-image>
|
||||
<model-image :propkey="propkey" :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-image>
|
||||
</template>
|
||||
<template v-else-if="item.key == 'auxiliary-line'">
|
||||
<model-lines :propValue="item.com_data" :propSourceList="form.data_source_content"></model-lines>
|
||||
<model-lines :propkey="propkey" :propValue="item.com_data" :propSourceList="form.data_source_content"></model-lines>
|
||||
</template>
|
||||
<template v-else-if="item.key == 'icon'">
|
||||
<model-icon :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-icon>
|
||||
<model-icon :propkey="propkey" :propValue="item.com_data" :propSourceList="form.data_source_content" @url_event="url_event"></model-icon>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
propkey: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -28,6 +32,14 @@
|
|||
com_style: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propkey(val) {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
});
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@
|
|||
return {};
|
||||
},
|
||||
},
|
||||
propkey: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -33,6 +37,14 @@
|
|||
border_style: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propkey(val) {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
});
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
return {};
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
propkey: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -18,6 +22,14 @@
|
|||
border_style: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propkey(val) {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
});
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@
|
|||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
propkey: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -37,6 +41,14 @@
|
|||
com_style: '',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
propkey(val) {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
});
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({
|
||||
form: this.propValue,
|
||||
|
|
|
|||
Loading…
Reference in New Issue