diff --git a/pages/diy/components/diy/ask.vue b/pages/diy/components/diy/ask.vue index 67632094..15677180 100644 --- a/pages/diy/components/diy/ask.vue +++ b/pages/diy/components/diy/ask.vue @@ -79,13 +79,11 @@ import { isEmpty, common_styles_computer, common_img_computer, gradient_handle, padding_computer, radius_computer, background_computer, border_computer, box_shadow_computer, gradient_computer, margin_computer, get_swiper_list } from '@/common/js/common/common.js'; import imageEmpty from '@/pages/diy/components/diy/modules/image-empty.vue'; import subscriptIndex from '@/pages/diy/components/diy/modules/subscript.vue'; - import imgOrIconOrText from '@/pages/diy/components/diy/modules/img-or-icon-or-text.vue'; var system = app.globalData.get_system_info(null, null, true); var sys_width = app.globalData.window_width_handle(system.windowWidth); export default { components: { imageEmpty, - imgOrIconOrText, subscriptIndex }, props: { diff --git a/pages/diy/components/diy/binding.vue b/pages/diy/components/diy/binding.vue index 753553a4..356706cf 100644 --- a/pages/diy/components/diy/binding.vue +++ b/pages/diy/components/diy/binding.vue @@ -38,7 +38,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/pages/diy/components/diy/modules/img-or-icon-or-text.vue b/pages/diy/components/diy/modules/img-or-icon-or-text.vue index e1297fd1..7a86810e 100644 --- a/pages/diy/components/diy/modules/img-or-icon-or-text.vue +++ b/pages/diy/components/diy/modules/img-or-icon-or-text.vue @@ -41,6 +41,8 @@ new_type_size: 0, new_type_color: '', img_style: '', + corner_marker: '', + corner_img_marker: '', }; }, watch: { @@ -54,25 +56,27 @@ methods: { isEmpty, init() { - const content = this.propValue.content || {}; - const new_style = this.propValue.style || {}; - // 取出某一个对应的数据信息 - const new_type_style = new_style[`${ this.propType }_style`] || {}; - this.setData({ - is_show: content[`is_${ this.propType }_show`] == '1', - type_boolean: content[`${ this.propType }_type`] == 'img-icon', - type_img: content[`${ this.propType }_img`] || [], - type_icon: content[`${ this.propType }_icon`] || '', - type_text: content[`${ this.propType }_text`] || '', - // 取出对应的大小显示 - new_type_size: new_type_style?.size || 0, - new_type_color: new_type_style?.color || '', - // 大小设置 - corner_marker: common_styles_computer(new_type_style), - corner_img_marker: padding_computer(new_type_style), - // 图片设置 - img_style: `height: ${ new_type_style.img_height }px; width: ${ new_type_style.img_width }px`, - }) + if (!isEmpty(this.propType)) { + const content = this.propValue.content || {}; + const new_style = this.propValue.style || {}; + // 取出某一个对应的数据信息 + const new_type_style = new_style[`${ this.propType }_style`] || {}; + this.setData({ + is_show: content[`is_${ this.propType }_show`] == '1', + type_boolean: content[`${ this.propType }_type`] == 'img-icon', + type_img: content[`${ this.propType }_img`] || [], + type_icon: content[`${ this.propType }_icon`] || '', + type_text: content[`${ this.propType }_text`] || '', + // 取出对应的大小显示 + new_type_size: new_type_style?.size || 0, + new_type_color: new_type_style?.color || '', + // 大小设置 + corner_marker: common_styles_computer(new_type_style), + corner_img_marker: padding_computer(new_type_style), + // 图片设置 + img_style: `height: ${ new_type_style.img_height }px; width: ${ new_type_style.img_width }px`, + }) + } }, }, };