From f66c607da42d35cea86c26b1e9fe5ac6ab1e65db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 20 Nov 2024 17:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=92=8C=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E7=AD=89=E7=9A=84=E8=A7=92=E6=A0=87=E5=92=8C=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 + common/css/page.css | 23 ++++ common/js/common/common.js | 33 +++++ components/diy/article-list.vue | 99 +++++++++----- components/diy/custom.vue | 67 ++------- components/diy/goods-list.vue | 102 +++++++++----- .../diy/modules/custom/data-rendering.vue | 85 ++++++++++++ components/diy/modules/custom/model-icon.vue | 3 +- .../diy/modules/data-magic/video/index.vue | 4 +- components/diy/modules/subscript/index.vue | 93 +++++++++++++ components/diy/nav-group.vue | 128 +++++++++++------- 11 files changed, 456 insertions(+), 183 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 components/diy/modules/custom/data-rendering.vue create mode 100644 components/diy/modules/subscript/index.vue diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/common/css/page.css b/common/css/page.css index d99fa69a..b8e9f6c3 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -1369,4 +1369,27 @@ button[disabled].bg-grey { word-break: break-all; overflow-wrap: break-word; word-wrap: break-word; +} +/* 指示器上下显示 */ +.indicator_up_down_location { + position: absolute; + z-index: 1; + padding-top: 10px; + padding-bottom: 10px; + display: flex; + flex-direction: column; +} +.indicator_up_down_location .dot-item { + margin: 0.3rem 0; +} +/* 指示器左右显示 */ +.indicator_about_location { + position: absolute; + z-index: 1; + padding-right: 10px; + padding-left: 10px; + display: flex; +} +.indicator_about_location .dot-item { + margin: 0 0.3rem; } \ No newline at end of file diff --git a/common/js/common/common.js b/common/js/common/common.js index 2cc9cd65..e1d602f5 100644 --- a/common/js/common/common.js +++ b/common/js/common/common.js @@ -12,6 +12,39 @@ const app = getApp(); export function is_obj_empty(obj) { return Object.keys(obj).length === 0; } + +/** + * 处理指示器的显示问题 + * + * @param style_object 样式对象 + * @returns 返回对应的值 + */ +export function get_indicator_style(style_object) { + const { indicator_radius, indicator_style, indicator_size, color, indicator_new_location } = style_object; + let styles = ''; + if (!isEmpty(indicator_radius)) { + styles += radius_computer(indicator_radius); + } + // 数字类型的指示器 + if (indicator_style == 'num') { + styles += `color: ${color || '#DDDDDD'};`; + styles += `font-size: ${indicator_size * 2}rpx;`; + } else if (indicator_style == 'elliptic') { + // 宽的指示器,按照宽高1:3 来计算 + styles += `background: ${color || '#DDDDDD'};`; + if (['left', 'right'].includes(indicator_new_location)) { + styles += `width: ${indicator_size * 2 }rpx; height: ${indicator_size * 6}rpx;`; + } else { + styles += `width: ${indicator_size * 6}rpx; height: ${indicator_size * 2}rpx;`; + } + } else { + // 圆点指示器 + styles += `background: ${color || '#DDDDDD'};`; + styles += `width: ${indicator_size * 2}rpx; height: ${indicator_size * 2}rpx;`; + } + return styles; +} + /** * 判断对象数组等是否为空。 */ diff --git a/components/diy/article-list.vue b/components/diy/article-list.vue index c571e58e..5ed022a4 100644 --- a/components/diy/article-list.vue +++ b/components/diy/article-list.vue @@ -7,12 +7,16 @@
@@ -33,17 +37,21 @@ - + - - - - - + + + + + + + + +
{{ item.new_title ? item.new_title : item.data.title }}
@@ -73,9 +81,13 @@ diff --git a/components/diy/modules/custom/model-icon.vue b/components/diy/modules/custom/model-icon.vue index ba0c1ab6..721a4b3e 100644 --- a/components/diy/modules/custom/model-icon.vue +++ b/components/diy/modules/custom/model-icon.vue @@ -4,8 +4,7 @@ + + diff --git a/components/diy/nav-group.vue b/components/diy/nav-group.vue index 441c36e7..ab520d62 100644 --- a/components/diy/nav-group.vue +++ b/components/diy/nav-group.vue @@ -1,23 +1,23 @@