diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e01e48e1fab1a27bad60071bb7e81bb6afec1d..98a5c6b6e6658477048ddd519e64e38ad58657a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,13 @@ ### Change +- 优化日历,标题栏,数据看板,分割容器样式,规范其样式变量, - 优化drbar、drtab部件样式,规范其样式变量 - 优化搜索栏、工具栏、分页导航面板、向导面板部件样式,规范其样式变量 ### Fixed +- 修复视图消息滚动模式下消息过长时自动换行展示的问题 - 修复数组编辑器、富文本编辑器、滑动输入框、文件上传响应式样式异常 - 修复数据选择(下拉)点击取消按钮未清空数据 diff --git a/src/common/split-trigger/split-trigger.scss b/src/common/split-trigger/split-trigger.scss index f71009cef9dce3a585e87f436c51490131bda1bb..a93d09d3079706385abfe98bbaee4f544e71652d 100644 --- a/src/common/split-trigger/split-trigger.scss +++ b/src/common/split-trigger/split-trigger.scss @@ -4,14 +4,8 @@ $split-trigger: ( width-trigger-bar-width: rem(4px), height-split-trigger-bar: rem(1px), width-split-trigger-bar: rem(1px), - trigger-bar-offset: calc( - var(width-trigger-width) - var(width-trigger-bar-width) / 2 - ), spacing-trigger-bar-interval: rem(3px), spacing-trigger-bar-weight: rem(1px), - height-trigger-bar-con-height: calc( - var(spacing-trigger-bar-weight) + var(spacing-trigger-bar-interval) * 8 - ), border-split-trigger: rem(1px) solid getCssVar(color, border), ); @@ -42,6 +36,7 @@ $split-trigger: ( cursor: row-resize; border-right: none; border-left: none; + display: flex; @include b(split-trigger-bar) { float: left; @@ -54,20 +49,14 @@ $split-trigger: ( } @include b(split-trigger-bar-con) { - position: absolute; overflow: hidden; + display: flex; + height: 100%; + width: 100%; + justify-content: center; + align-items: center; @include m(vertical) { - top: 50%; - left: getCssVar(split-trigger, trigger-bar-offset); - height: getCssVar(split-trigger, height-trigger-bar-con-height); - transform: translate(0, -50%); - } - - @include m(horizontal) { - top: getCssVar(split-trigger, trigger-bar-offset); - left: 50%; - width: getCssVar(split-trigger, height-trigger-bar-con-height); - transform: translate(-50%, 0); + flex-direction: column; } } diff --git a/src/common/split/split.scss b/src/common/split/split.scss index 37388f6bf5191e6858bb8efe93c651118b80b5d5..278539c20e0bfe9e5ad85da038bf4cf985ffeea7 100644 --- a/src/common/split/split.scss +++ b/src/common/split/split.scss @@ -55,7 +55,7 @@ $split-wrapper:( z-index: 10; width: getCssVar('split-wrapper','width-trigger-width'); transform: translate(-50%, -50%); - touch-action: 'none'; + touch-action: none; } @mixin horizontal-trigger-con-and-pane { diff --git a/src/common/view-message/view-message.tsx b/src/common/view-message/view-message.tsx index 00cd1ff93bc33fdda834d837f49160cfaf2f9fde..eab01ea0b07e25864a803de43fb41567dfdab873 100644 --- a/src/common/view-message/view-message.tsx +++ b/src/common/view-message/view-message.tsx @@ -137,7 +137,7 @@ export const ViewMessage = defineComponent({ span { @include utils-ellipsis; @@ -58,8 +58,8 @@ $control-captionbar: ( @include b(icon) { flex-shrink: 0; - width: getCssVar('control-captionbar', 'font-icon-width'); - font-size: getCssVar('control-captionbar', 'font-icon-width'); + width: getCssVar('control-captionbar', 'font-icon-width-fontSize'); + font-size: getCssVar('control-captionbar', 'font-icon-width-fontSize'); } } @@ -72,7 +72,7 @@ $control-captionbar: ( justify-content: center; width: 100%; height: 100%; - font-size: getCssVar('control-captionbar', 'font-sub-caption'); + font-size: getCssVar('control-captionbar', 'font-sub-caption-fontSize'); color: getCssVar('control-captionbar', 'color-sub-caption'); text-align: getCssVar('control-captionbar', 'font-text-align'); } diff --git a/src/control/dashboard/custom-dashboard-design/custom-dashboard-design.scss b/src/control/dashboard/custom-dashboard-design/custom-dashboard-design.scss index c00e65907417c8d31ad7d9e802fcee96a12702d1..7a87ecc9518763a37d69389fa15aafc761dab149 100644 --- a/src/control/dashboard/custom-dashboard-design/custom-dashboard-design.scss +++ b/src/control/dashboard/custom-dashboard-design/custom-dashboard-design.scss @@ -1,29 +1,28 @@ $custom-dashboard-design: ( // 颜色 - save-btn-color: getCssVar(color, primary), - item-bg-color: getCssVar(color, bg, 0), + color-save-btn-color: getCssVar(color, primary), + color-item-bg-color: getCssVar(color, bg, 0), // 高度 - item-height: getCssVar(height-control, large), + height-item-height: getCssVar(height-control, large), // 间距 - padding: getCssVar(spacing, base), - header-padding: 0 0 getCssVar(spacing, tight), - item-padding: 0 getCssVar(spacing, base), - item-margin: getCssVar(spacing, tight) 0, - item-icon-margin-right: getCssVar(spacing, extra-tight), - item-checkbox-margin-left: getCssVar(spacing, extra-tight), + spacing-padding: getCssVar(spacing, base), + spacing-header-padding: 0 0 getCssVar(spacing, tight), + spacing-item-padding: 0 getCssVar(spacing, base), + spacing-item-margin: getCssVar(spacing, tight) 0, + spacing-item-icon-margin-right: getCssVar(spacing, extra-tight), + spacing-item-checkbox-margin-left: getCssVar(spacing, extra-tight), // 圆角 - item-border-radius: getCssVar(border, radius, medium), + radius-item-border-radius: getCssVar(border, radius, medium), // 字体大小 - header-font-size: getCssVar(font-size, header-5), - close-btn-font-size: getCssVar(font-size, header-3), - item-font-size: getCssVar(font-size, header-6), + font-header-fontSize: getCssVar(font-size, header-5), + font-close-btn-fontSize: getCssVar(font-size, header-3), + font-item-fontSize: getCssVar(font-size, header-6), + font-header-title-fontWeight: getCssVar(font-weight, bold), - // 字体粗细 - header-title-font-weight: getCssVar(font-weight, bold), ); @include b(custom-dashboard-design) { @@ -32,7 +31,7 @@ $custom-dashboard-design: ( display: flex; flex-direction: column; height: 100%; - padding: getCssVar(custom-dashboard-design, padding); + padding: getCssVar(custom-dashboard-design, spacing-padding); } @include b(custom-dashboard-design-header) { @@ -40,25 +39,25 @@ $custom-dashboard-design: ( flex: 0 0 auto; align-items: center; justify-content: space-between; - padding: getCssVar(custom-dashboard-design, header-padding); - font-size: getCssVar(custom-dashboard-design, header-font-size); + padding: getCssVar(custom-dashboard-design, spacing-header-padding); + font-size: getCssVar(custom-dashboard-design, font-header-fontSize); @include e(close-btn) { flex-shrink: 0; - font-size: getCssVar(custom-dashboard-design, close-btn-font-size); + font-size: getCssVar(custom-dashboard-design, close-btn-fontSize); cursor: pointer; } @include e(title) { overflow: hidden; - font-weight: getCssVar(custom-dashboard-design, header-title-font-weight); + font-weight: getCssVar(custom-dashboard-design, font-header-title-fontWeight); text-overflow: ellipsis; white-space: nowrap; } @include e(save-btn) { flex-shrink: 0; - color: getCssVar(custom-dashboard-design, save-btn-color); + color: getCssVar(custom-dashboard-design, color-save-btn-color); cursor: pointer; } } @@ -71,13 +70,13 @@ $custom-dashboard-design: ( @include b(custom-dashboard-design-item) { display: flex; align-items: center; - height: getCssVar(custom-dashboard-design, item-height); - padding: getCssVar(custom-dashboard-design, item-padding); - margin: getCssVar(custom-dashboard-design, item-margin); - font-size: getCssVar(custom-dashboard-design, item-font-size); - line-height: getCssVar(custom-dashboard-design, item-height); - background-color: getCssVar(custom-dashboard-design, item-bg-color); - border-radius: getCssVar(custom-dashboard-design, item-border-radius); + height: getCssVar(custom-dashboard-design, height-item-height); + padding: getCssVar(custom-dashboard-design, spacing-item-padding); + margin: getCssVar(custom-dashboard-design, spacing-item-margin); + font-size: getCssVar(custom-dashboard-design, font-item-fontSize); + line-height: getCssVar(custom-dashboard-design, height-item-height); + background-color: getCssVar(custom-dashboard-design, color-item-bg-color); + border-radius: getCssVar(custom-dashboard-design, radius-item-border-radius); @include e(icon) { display: flex; @@ -85,7 +84,7 @@ $custom-dashboard-design: ( align-items: center; width: 1em; height: 1em; - margin-right: getCssVar(custom-dashboard-design, item-icon-margin-right); + margin-right: getCssVar(custom-dashboard-design, spacing-item-icon-margin-right); } @include e(text) { @@ -97,7 +96,7 @@ $custom-dashboard-design: ( @include e(checkbox) { flex: 0 0 auto; - margin-left: getCssVar(custom-dashboard-design, item-checkbox-margin-left); + margin-left: getCssVar(custom-dashboard-design, spacing-item-checkbox-margin-left); } } diff --git a/src/control/dashboard/dashboard.scss b/src/control/dashboard/dashboard.scss index 13eb0cc33332ca130ad03fe05e77e0436b3491f3..ef1b9c3fed2e9949c0c2c5c6b755c3b1795a3312 100644 --- a/src/control/dashboard/dashboard.scss +++ b/src/control/dashboard/dashboard.scss @@ -1,20 +1,17 @@ $control-dashboard: ( - // 高度 - portlet-header-height: rem(50px), - // 边距 - sidebar-topleft-top: calc(#{getCssVar(view-page-caption, line-height)} + 2 * #{getCssVar(spacing, tight)}), - sidebar-topleft-left: rem(0px), - sidebar-topright-top: calc(#{getCssVar(view-page-caption, line-height)} + 2 * #{getCssVar(spacing, tight)}), - sidebar-topright-right: rem(0px), - sidebar-bottomleft-bottom: rem(0px), - sidebar-bottomleft-left: rem(0px), - sidebar-bottomright-bottom: rem(0px), - sidebar-bottomright-right: rem(0px), - sidebar-middleleft-top: 50%, - sidebar-middleleft-left: rem(0px), - sidebar-middleright-top: 50%, - sidebar-middleright-right: rem(0px), + spacing-sidebar-topleft-top: calc(#{getCssVar(view-page-caption, line-height)} + 2 * #{getCssVar(spacing, tight)}), + spacing-sidebar-topleft-left: rem(0px), + spacing-sidebar-topright-top: calc(#{getCssVar(view-page-caption, line-height)} + 2 * #{getCssVar(spacing, tight)}), + spacing-sidebar-topright-right: rem(0px), + spacing-sidebar-bottomleft-bottom: rem(0px), + spacing-sidebar-bottomleft-left: rem(0px), + spacing-sidebar-bottomright-bottom: rem(0px), + spacing-sidebar-bottomright-right: rem(0px), + spacing-sidebar-middleleft-top: 50%, + spacing-sidebar-middleleft-left: rem(0px), + spacing-sidebar-middleright-top: 50%, + spacing-sidebar-middleright-right: rem(0px), ); @include b(control-dashboard) { @@ -27,24 +24,24 @@ $control-dashboard: ( @include e(nav-bar) { @include m(topleft) { .van-index-bar__sidebar { - top: getCssVar('control-dashboard', 'sidebar-topleft-top'); + top: getCssVar('control-dashboard', 'spacing-sidebar-topleft-top'); right: auto; - left: getCssVar('control-dashboard', 'sidebar-topleft-left'); + left: getCssVar('control-dashboard', 'spacing-sidebar-topleft-left'); transform: none; } } @include m(topright) { .van-index-bar__sidebar { - top: getCssVar('control-dashboard', 'sidebar-topright-top'); - right: getCssVar('control-dashboard', 'sidebar-topright-right'); + top: getCssVar('control-dashboard', 'spacing-sidebar-topright-top'); + right: getCssVar('control-dashboard', 'spacing-sidebar-topright-right'); transform: none; } } @include m(bottomleft) { .van-index-bar__sidebar { - inset: auto auto getCssVar('control-dashboard', 'sidebar-bottomleft-bottom') getCssVar('control-dashboard', 'sidebar-bottomleft-left'); + inset: auto auto getCssVar('control-dashboard', 'spacing-sidebar-bottomleft-bottom') getCssVar('control-dashboard', 'spacing-sidebar-bottomleft-left'); transform: none; } } @@ -52,24 +49,24 @@ $control-dashboard: ( @include m(bottomright) { .van-index-bar__sidebar { top: auto; - right: getCssVar('control-dashboard', 'sidebar-bottomright-right'); - bottom: getCssVar('control-dashboard', 'sidebar-bottomright-bottom'); + right: getCssVar('control-dashboard', 'spacing-sidebar-bottomright-right'); + bottom: getCssVar('control-dashboard', 'spacing-sidebar-bottomright-bottom'); transform: none; } } @include m(middleleft) { .van-index-bar__sidebar { - top: getCssVar('control-dashboard', 'sidebar-middleleft-top'); + top: getCssVar('control-dashboard', 'spacing-sidebar-middleleft-top'); right: auto; - left: getCssVar('control-dashboard', 'sidebar-middleleft-left'); + left: getCssVar('control-dashboard', 'spacing-sidebar-middleleft-left'); } } @include m(middleright) { .van-index-bar__sidebar { - top: getCssVar('control-dashboard', 'sidebar-middleright-top'); - right: getCssVar('control-dashboard', 'sidebar-middleright-right'); + top: getCssVar('control-dashboard', 'spacing-sidebar-middleright-top'); + right: getCssVar('control-dashboard', 'spacing-sidebar-middleright-right'); } } diff --git a/src/control/dashboard/portlet/portlet-layout/portlet-layout.scss b/src/control/dashboard/portlet/portlet-layout/portlet-layout.scss index 952c07a61f6967eabd2c7034ea50488e5838a20c..e6bc51d712f863cac90c72b3988f5831ec70da0c 100644 --- a/src/control/dashboard/portlet/portlet-layout/portlet-layout.scss +++ b/src/control/dashboard/portlet/portlet-layout/portlet-layout.scss @@ -1,19 +1,30 @@ $portlet-layout: ( - header-height: rem(50px), - header-padding: getCssVar(spacing, base), - header-margin: 0, - bg-color: getCssVar(color, bg, 1), - header-bg-color: getCssVar(color, bg, 0), - header-border-bottom: rem(1px) solid getCssVar(color, border), - caption-max-width: rem(300px), - caption-font-weight: getCssVar(font-weight, regular), - caption-font-size:getCssVar(font-size, header-6), - caption-color: getCssVar(color, text, 1), - content-bg-color: transparent, - content-padding: getCssVar(spacing, tight) getCssVar(spacing, base), - content-margin: 0, - border-radius: getCssVar(border-radius, medium), - header-line-height: var(--van-cell-group-title-line-height), + // 颜色 + color-bg-color: getCssVar(color, bg, 1), + color-header-bg-color: getCssVar(color, bg, 0), + color-caption-color: getCssVar(color, text, 1), + color-content-bg-color: transparent, + + // 宽高 + height-header-height: rem(50px), + width-caption-max-width: rem(300px), + + // 边距 + spacing-header-padding: getCssVar(spacing, base), + spacing-header-margin: 0, + spacing-content-padding: getCssVar(spacing, tight) getCssVar(spacing, base), + spacing-content-margin: 0, + + // 字体大小 + font-caption-fontWeight: getCssVar(font-weight, regular), + font-caption-fontSize: getCssVar(font-size, header-6), + font-header-lineHeight: var(--van-cell-group-title-line-height), + + // 圆角 + radius-border-radius: getCssVar(border-radius, medium), + + // 其他 + header-border-bottom: rem(1px) solid getCssVar(color, border) ); @include b(portlet-layout) { @@ -21,17 +32,17 @@ $portlet-layout: ( width: 100%; height: 100%; - background-color: getCssVar(portlet-layout, bg-color); - border-radius: getCssVar(portlet-layout, border-radius); + background-color: getCssVar(portlet-layout, color-bg-color); + border-radius: getCssVar(portlet-layout, radius-border-radius); // 标题样式 @include e(caption) { - max-width: getCssVar(portlet-layout, caption-max-width); + max-width: getCssVar(portlet-layout, width-caption-max-width); @include e(caption-text) { overflow: hidden; - font-size: getCssVar(portlet-layout, caption-font-size); - font-weight: getCssVar(portlet-layout, caption-font-weight); + font-size: getCssVar(portlet-layout, font-caption-fontSize); + font-weight: getCssVar(portlet-layout, font-caption-fontWeight); color: getCssVar(portlet-layout, caption-color); text-overflow: ellipsis; white-space: nowrap; @@ -42,11 +53,11 @@ $portlet-layout: ( display: flex; align-items: center; height: 100%; - } + } // 无头部时的样式 @include when(no-header) { - >.#{bem(portlet-layout-content)} { + > .#{bem(portlet-layout-content)} { height: 100%; padding: 0; } @@ -56,7 +67,7 @@ $portlet-layout: ( padding: 0; font-size: inherit; font-weight: inherit; - line-height:inherit; + line-height: inherit; color: inherit; background: inherit; } @@ -69,14 +80,14 @@ $portlet-layout: ( @include when(custom) { position: relative; - @include e(left){ + @include e(left) { z-index: 1; } - - @include e(right){ + + @include e(right) { z-index: 1; } - + @include e(bg) { position: absolute; top: 0; @@ -86,18 +97,17 @@ $portlet-layout: ( } } - height: getCssVar(portlet-layout, header-height); - padding: getCssVar(portlet-layout, header-padding); - margin: getCssVar(portlet-layout, header-margin); - line-height: getCssVar(portlet-layout, header-line-height); - background-color: getCssVar(portlet-layout, header-bg-color); - + height: getCssVar(portlet-layout, height-header-height); + padding: getCssVar(portlet-layout, spacing-header-padding); + margin: getCssVar(portlet-layout, spacing-header-margin); + line-height: getCssVar(portlet-layout, font-header-lineHeight); + background-color: getCssVar(portlet-layout, color-header-bg-color); } // 内容区样式 @include b(portlet-layout-content) { - height: calc(100% - getCssVar(portlet-layout, header-height)); - padding: getCssVar(portlet-layout, content-padding); - margin: getCssVar(portlet-layout, content-margin); - background-color: getCssVar(portlet-layout, content-bg-color); -} \ No newline at end of file + height: calc(100% - getCssVar(portlet-layout, height-header-height)); + padding: getCssVar(portlet-layout, spacing-content-padding); + margin: getCssVar(portlet-layout, spacing-content-margin); + background-color: getCssVar(portlet-layout, color-content-bg-color); +}