From 01087ac61aa813109cd8d7a8b224bb31c0382e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Sat, 12 Oct 2024 17:21:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 8 ++++---- components/diy/modules/custom/model-icon.vue | 9 +++++++-- components/diy/modules/custom/model-image.vue | 9 +++++++-- components/diy/modules/custom/model-lines.vue | 9 +++++++-- components/diy/modules/custom/model-panel.vue | 9 +++++++-- components/diy/modules/custom/model-text.vue | 11 ++++++++--- 6 files changed, 40 insertions(+), 15 deletions(-) diff --git a/App.vue b/App.vue index 55925134..842b8af5 100644 --- a/App.vue +++ b/App.vue @@ -7,12 +7,12 @@ data: { // 基础配置 // 数据接口请求地址 - // request_url: 'http://shopxo.com/', - request_url:'https://new.shopxo.vip/', + request_url: 'http://shopxo.com/', + // request_url:'https://new.shopxo.vip/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) - // static_url: 'http://shopxo.com/', - static_url:'https://new.shopxo.vip/', + static_url: 'http://shopxo.com/', + // static_url:'https://new.shopxo.vip/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', diff --git a/components/diy/modules/custom/model-icon.vue b/components/diy/modules/custom/model-icon.vue index 37e4f87b..b7d8c184 100644 --- a/components/diy/modules/custom/model-icon.vue +++ b/components/diy/modules/custom/model-icon.vue @@ -34,9 +34,14 @@ return { form: {}, com_style: '', + scale: 1, }; }, watch: { + propScale(val) { + this.scale = val; + this.init(); + }, propkey(val) { this.init(); } @@ -52,9 +57,9 @@ }); }, get_com_style(form) { - let style = `${ gradient_handle(form.color_list, form.direction) } ${ radius_computer(form.bg_radius, this.propScale) };transform: rotate(${form.icon_rotate}deg);${ padding_computer(form.icon_padding, this.propScale) };`; + let style = `${ gradient_handle(form.color_list, form.direction) } ${ radius_computer(form.bg_radius, this.scale) };transform: rotate(${form.icon_rotate}deg);${ padding_computer(form.icon_padding, this.scale) };`; if (form.border_show == '1') { - style += `border: ${form.border_size * this.propScale * 2 }rpx ${form.border_style} ${form.border_color};box-sizing: border-box;`; + style += `border: ${form.border_size * this.scale * 2 }rpx ${form.border_style} ${form.border_color};box-sizing: border-box;`; } if (form.icon_location == 'center') { style += `justify-content: center;`; diff --git a/components/diy/modules/custom/model-image.vue b/components/diy/modules/custom/model-image.vue index 68a71db1..6c716e40 100644 --- a/components/diy/modules/custom/model-image.vue +++ b/components/diy/modules/custom/model-image.vue @@ -39,9 +39,14 @@ img: '', image_style: '', border_style: '', + scale: 1, }; }, watch: { + propScale(val) { + this.scale = val; + this.init(); + }, propkey(val) { this.init(); } @@ -70,12 +75,12 @@ } }, get_image_style(form) { - return `width: ${percentage_count(form.img_width, form.com_width)}; height: ${percentage_count(form.img_height, form.com_height)};transform: rotate(${form.img_rotate}deg); ${radius_computer(form.img_radius, this.propScale)};`; + return `width: ${percentage_count(form.img_width, form.com_width)}; height: ${percentage_count(form.img_height, form.com_height)};transform: rotate(${form.img_rotate}deg); ${radius_computer(form.img_radius, this.scale)};`; }, get_border_style(form) { let style = ``; if (form.border_show == '1') { - style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color}; ${radius_computer(form.border_radius, this.propScale)};box-sizing: border-box;`; + style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color}; ${radius_computer(form.border_radius, this.scale)};box-sizing: border-box;`; } return style; }, diff --git a/components/diy/modules/custom/model-lines.vue b/components/diy/modules/custom/model-lines.vue index 0184b8b8..2917110f 100644 --- a/components/diy/modules/custom/model-lines.vue +++ b/components/diy/modules/custom/model-lines.vue @@ -24,9 +24,14 @@ return { form: {}, border_style: '', + scale: 1, }; }, watch: { + propScale(val) { + this.scale = val; + this.init(); + }, propkey(val) { this.init(); } @@ -43,9 +48,9 @@ }, get_border_style(form) { if (form.line_settings === 'horizontal') { - return `margin: 10rpx 0;border-bottom: ${form.line_size * this.propScale * 2}rpx ${form.line_style} ${form.line_color};`; + return `margin: 10rpx 0;border-bottom: ${form.line_size * this.scale * 2}rpx ${form.line_style} ${form.line_color};`; } else { - return `margin: 0 10rpx;border-right: ${form.line_size * this.propScale * 2}rpx ${form.line_style} ${form.line_color};`; + return `margin: 0 10rpx;border-right: ${form.line_size * this.scale * 2}rpx ${form.line_style} ${form.line_color};`; } } }, diff --git a/components/diy/modules/custom/model-panel.vue b/components/diy/modules/custom/model-panel.vue index e0539bd5..537d359d 100644 --- a/components/diy/modules/custom/model-panel.vue +++ b/components/diy/modules/custom/model-panel.vue @@ -36,9 +36,14 @@ text_title: '', text_style: '', com_style: '', + scale: 1, }; }, watch: { + propScale(val) { + this.scale = val; + this.init(); + }, propkey(val) { this.init(); } @@ -55,9 +60,9 @@ }); }, get_com_style(form) { - let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.propScale)}; transform: rotate(${form.panel_rotate}deg);`; + let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.scale)}; transform: rotate(${form.panel_rotate}deg);`; if (form.border_show == '1') { - style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color};`; + style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color};`; } return style; }, diff --git a/components/diy/modules/custom/model-text.vue b/components/diy/modules/custom/model-text.vue index be90090d..d8defe3b 100644 --- a/components/diy/modules/custom/model-text.vue +++ b/components/diy/modules/custom/model-text.vue @@ -43,9 +43,14 @@ text_title: '', text_style: '', com_style: '', + scale: 1, }; }, watch: { + propScale(val) { + this.scale = val; + this.init(); + }, propkey(val) { this.init(); } @@ -72,7 +77,7 @@ return text; }, get_text_style(form) { - let style = `font-size: ${form.text_size * this.propScale * 2}rpx;line-height: ${form.text_size * this.propScale * 2}rpx;color: ${form.text_color}; text-align: ${form.text_location}; transform: rotate(${form.text_rotate}deg);text-decoration: ${form.text_option};${padding_computer(form.text_padding, this.propScale)};box-sizing: border-box;`; + let style = `font-size: ${form.text_size * this.scale * 2}rpx;line-height: ${form.text_size * this.scale * 2}rpx;color: ${form.text_color}; text-align: ${form.text_location}; transform: rotate(${form.text_rotate}deg);text-decoration: ${form.text_option};${padding_computer(form.text_padding, this.scale)};box-sizing: border-box;`; if (form.text_weight == 'italic') { style += `font-style: italic`; } else if (form.text_weight == '500') { @@ -81,9 +86,9 @@ return style; }, get_com_style(form) { - let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.propScale)}`; + let style = `${ gradient_handle(form.color_list, form.direction) } ${radius_computer(form.bg_radius, this.scale)}`; if (form.border_show == '1') { - style += `border: ${form.border_size * this.propScale * 2}rpx ${form.border_style} ${form.border_color};`; + style += `border: ${form.border_size * this.scale * 2}rpx ${form.border_style} ${form.border_color};`; } // 是富文本并且开启了上下滚动的开关 if (form.is_rich_text == '1' && form.is_up_down == '1') {