From a30315cca82660233feebc6233ffbdde4135e2a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Fri, 5 Sep 2025 10:04:16 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/diy/components/diy/ask.vue | 2 -
pages/diy/components/diy/binding.vue | 4 +-
.../diy/modules/img-or-icon-or-text.vue | 42 ++++++++++---------
3 files changed, 25 insertions(+), 23 deletions(-)
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`,
+ })
+ }
},
},
};