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 @@