From 77bdc091259ef8fbc546acce92ac0c9837ab9e8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Tue, 12 Nov 2024 11:46:08 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E6=92=AD=E9=97=AE=E9=A2=98=E5=92=8C?=
=?UTF-8?q?=E5=A4=B4=E9=83=A8=E5=8A=A0=E7=B2=97=E9=97=AE=E9=A2=98=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/css/page.css | 3 +++
components/diy/carousel.vue | 10 ++++++----
components/diy/header.vue | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/common/css/page.css b/common/css/page.css
index 470c8542..d99fa69a 100644
--- a/common/css/page.css
+++ b/common/css/page.css
@@ -275,6 +275,9 @@ button:before {
.fw-b {
font-weight: 500;
}
+.fw-n {
+ font-weight: 400;
+}
.auto {
margin: 0 auto;
}
diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue
index 66372f6d..1335031a 100644
--- a/components/diy/carousel.vue
+++ b/components/diy/carousel.vue
@@ -1,6 +1,6 @@
-
+
@@ -156,7 +156,9 @@
} else if (new_form.img_fit == 'cover') {
fit = 'aspectFill';
}
-
+ const { margin_left, margin_right, padding_left, padding_right } = new_style.common_style;
+ const width = sys_width - margin_left - margin_right - padding_left - padding_right;
+ const scale = width / 390;
this.setData({
form: this.propValue.content,
new_style: this.propValue.style,
@@ -168,10 +170,10 @@
style_img_container: this.propIsCommon ? common_img_computer(common_style, this.propIndex) : '', // 公共样式显示
img_style: radius_computer(new_style), // 图片的设置
indicator_style: this.get_indicator_style(new_style), // 指示器的样式
- dot_style: `bottom: ${ (new_style.indicator_bottom + common_style.margin_bottom + common_style.padding_bottom) * (sys_width / 390) * 2 }rpx;`, // 指示器位置
+ dot_style: `bottom: ${ new_style.indicator_bottom * scale * 2 }rpx;`, // 指示器位置
img_fit: fit, // 图片风格
video_style: this.get_video_style(new_style), // 视频播放按钮显示逻辑
- swiper_height: new_form.height * (sys_width / 390) * 2 + 'rpx', // 轮播图高度
+ swiper_height: new_form.height * scale * 2 + 'rpx', // 轮播图高度
});
// 风格二显示逻辑
if (new_form.carousel_type == 'card') {
diff --git a/components/diy/header.vue b/components/diy/header.vue
index ab318739..782a0232 100644
--- a/components/diy/header.vue
+++ b/components/diy/header.vue
@@ -42,7 +42,7 @@
{{ form.content.title }}
-
+