From 98f871d9a16f37651301547e3c49d0ae186fe857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=94=BF=E6=9D=83?= <1978141412@qq.com> Date: Tue, 3 Sep 2024 18:35:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?style:=20=E8=AE=BE=E8=AE=A1=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=8C=BA=E6=A0=B7=E5=BC=8F=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design-base/src/style/index.scss | 126 ++++++---- packages/er-design/src/style/index.scss | 271 ++++------------------ 2 files changed, 127 insertions(+), 270 deletions(-) diff --git a/packages/design-base/src/style/index.scss b/packages/design-base/src/style/index.scss index 49030764..45cc4edf 100644 --- a/packages/design-base/src/style/index.scss +++ b/packages/design-base/src/style/index.scss @@ -11,9 +11,83 @@ @include set-component-css-var('form-item', $form-item); } + @include b(panel-view-header) { + height: 35px; + padding: 9px getCssVar('spacing', 'none') 5px getCssVar('spacing', 'tight'); + margin: getCssVar('spacing', 'none'); + + .#{bem(panel-container, '', view_header_right)} { + padding: 0; + padding-left: getCssVar('spacing', 'tight'); + } + + @include b(control-captionbar) { + $control-captionbar: ( + padding: getCssVar('spacing', 'none'), + ); + + @include set-component-css-var(control-captionbar, $control-captionbar); + + @include b(control-captionbar-caption) { + padding-left: 0; + + &::before { + display: none; + } + $control-captionbar: ( + font-size: getCssVar('font-size', 'regular'), + font-weight: getCssVar('font-weight', 'regular'), + ); + + @include set-component-css-var( + control-captionbar, + $control-captionbar + ); + } + } + + @include b(control-toolbar) { + $control-toolbar: ( + 'icon-margin': getCssVar('spacing', 'none'), + 'item-bg-color': transparent, + 'item-disabled-button': transparent, + 'item-padding': getCssVar('spacing', 'none'), + 'icon-max-width': getCssVar('font-size', 'regular'), + 'icon-max-height': getCssVar('font-size', 'regular'), + 'text-margin': 0 0 0 getCssVar('spacing', 'tight'), + ); + + @include set-component-css-var(control-toolbar, $control-toolbar); + } + + .#{bem('control-toolbar', 'item')} { + .el-button { + --el-button-bg-color: transparent; + --el-button-disabled-bg-color: transparent; + --el-button-hover-bg-color: transparent; + --el-button-active-bg-color: transparent; + --el-button-text-color: #{getCssVar(color, primary)}; + --el-button-disabled-text-color: #{getCssVar(color, text, 1)}; + --el-button-hover-text-color: #{getCssVar(color, text, 1)}; + --el-button-border-color: #{getCssVar(color, text, 1)}; + + height: auto; + + > span { + font-size: getCssVar('font-size', 'small'); + } + + &:focus { + color: getCssVar(color, primary); + background-color: transparent; + } + } + } + } + @include b(panel-view-content) { $panel-view-content: ( - 'padding': getCssVar('spacing', 'none') getCssVar('spacing', 'tight') + 'padding': 6px getCssVar('spacing', 'tight') getCssVar('spacing', 'none') 6px, ); @@ -55,8 +129,7 @@ @include b(form-item-container) { $form-item-container: ( - 'label-left-padding': 0 - getCssVar('spacing', 'base-tight') 0 0, + 'label-left-padding': 0 var(--ibiz-spacing-base-tight) 0 0, 'padding': getCssVar('spacing', 'none') getCssVar('spacing', 'extra-tight') getCssVar('spacing', 'base') getCssVar('spacing', 'extra-tight'), @@ -75,59 +148,20 @@ @include b(panel-view-header) { height: 42px; - @include b(control-captionbar) { - $control-captionbar: ( - padding: getCssVar('spacing', 'none'), - ); - - @include set-component-css-var(control-captionbar, $control-captionbar); - - @include b(control-captionbar-caption) { - $control-captionbar: ( - font-size: getCssVar('font-size', 'regular'), - font-weight: getCssVar('font-weight', 'bold'), - ); - - @include set-component-css-var( - control-captionbar, - $control-captionbar - ); - } - } - .#{bem('panel-container', '', 'view_header_right')} { padding: getCssVar('spacing', 'none'); } @include b(control-toolbar) { $control-toolbar: ( - 'item-margin': getCssVar('spacing', 'none'), 'item-padding': getCssVar('spacing', 'none') getCssVar('spacing', 'tight'), - 'icon-margin': getCssVar('spacing', 'none'), 'icon-max-width': getCssVar('width-icon', 'small'), 'icon-max-height': getCssVar('width-icon', 'small'), ); @include set-component-css-var(control-toolbar, $control-toolbar); } - - .#{bem('control-toolbar', 'item')} { - .el-button { - --el-button-bg-color: transparent; - --el-button-disabled-bg-color: transparent; - --el-button-hover-bg-color: transparent; - --el-button-active-bg-color: transparent; - --el-button-text-color: #{getCssVar(color, text, 1)}; - --el-button-disabled-text-color: #{getCssVar(color, text, 1)}; - --el-button-hover-text-color: #{getCssVar(color, text, 1)}; - --el-button-border-color: #{getCssVar(color, text, 1)}; - - > span { - font-size: getCssVar('font-size', 'small'); - } - } - } } @include b(panel-view-content) { @@ -171,6 +205,14 @@ @include set-component-css-var('form-page', $form-page); } + + @include b(form-raw-item) { + $form-rawitem: ( + 'line-height': normal, + ); + + @include set-component-css-var('form-rawitem', $form-rawitem); + } } .form-design-header { diff --git a/packages/er-design/src/style/index.scss b/packages/er-design/src/style/index.scss index e45fc042..d0916720 100644 --- a/packages/er-design/src/style/index.scss +++ b/packages/er-design/src/style/index.scss @@ -1,62 +1,59 @@ /* stylelint-disable selector-class-pattern */ -.#{bem(view--PSSysERMapDesignView)} { - .#{bem(panel-container--er_design_toolbar_container)} { - .el-button { - --el-button-bg-color: transparent; - --el-button-hover-bg-color: #{getCssVar(color, primary, light, default)}; - --el-button-active-bg-color: #{getCssVar(color, primary, light, default)}; - --el-button-hover-text-color: #{getCssVar(color, text, 2)}; - --el-button-text-color: #{getCssVar(color, text, 2)}; - --el-button-active-text-color: #{getCssVar(color, text, 2)}; - --#{bem(control-toolbar-item-padding)}: #{getCssVar( - 'spacing', - 'extra-tight' - )} #{getCssVar('spacing', 'tight')} #{getCssVar( - 'spacing', - 'extra-tight' - )} #{getCssVar('spacing', 'extra-tight')}; - - height: 26px; - - &.is-loading::before { - display: none; - } +// er设计顶部工具栏 +.#{bem(er-design-header-toolbar)} { + .el-button { + --el-button-bg-color: transparent; + --el-button-hover-bg-color: #{getCssVar(color, primary, light, default)}; + --el-button-active-bg-color: #{getCssVar(color, primary, light, default)}; + --el-button-hover-text-color: #{getCssVar(color, text, 2)}; + --el-button-text-color: #{getCssVar(color, text, 2)}; + --el-button-active-text-color: #{getCssVar(color, text, 2)}; + --#{bem(control-toolbar-item-padding)}: #{getCssVar( + 'spacing', + 'extra-tight' + )} #{getCssVar('spacing', 'tight')} #{getCssVar('spacing', 'extra-tight')} + #{getCssVar('spacing', 'extra-tight')}; + + height: 26px; + + &.is-loading::before { + display: none; + } - .el-icon.is-loading { - display: none; - } + .el-icon.is-loading { + display: none; } + } - .#{bem(control-toolbar__item)} { + .#{bem(control-toolbar__item)} { + --#{bem(control-toolbar-item-margin)}: 0 0 0 #{getCssVar( + 'spacing', + 'extra-loose' + )}; + + &:first-child { --#{bem(control-toolbar-item-margin)}: 0 0 0 #{getCssVar( 'spacing', - 'extra-loose' + 'tight' )}; + } - &:first-child { - --#{bem(control-toolbar-item-margin)}: 0 0 0 #{getCssVar( - 'spacing', - 'tight' - )}; - } - - .#{bem(toolbar-item-icon)} { - margin-right: getCssVar('spacing', 'extra-tight'); - } + .#{bem(toolbar-item-icon)} { + margin-right: getCssVar('spacing', 'extra-tight'); + } - .el-button > span { - font-size: getCssVar('font-size', 'small'); - } + .el-button > span { + font-size: getCssVar('font-size', 'small'); + } - .el-button - > span - .#{bem(toolbar-item-icon)} - + .#{bem(toolbar-item-text)} { - margin-top: getCssVar('spacing', 'super-tight'); - } + .el-button > span .#{bem(toolbar-item-icon)} + .#{bem(toolbar-item-text)} { + margin-top: getCssVar('spacing', 'super-tight'); } } +} +// er设计区 +.#{bem(er_design_content)} { .#{bem('er-toggle-button', '', 'rt')}, .#{bem('er-toggle-button', '', 'lt')} { transform: translateX(-8px) translateY(-24px); @@ -76,188 +73,6 @@ .#{bem('er-toggle-button', 'wrapper', 'lb')} { transform: translateY(16px); } - - @include b(nav-pos) { - @include b(panel-view-header) { - height: 35px; - padding: calc( - ( - getCssVar('spacing', 'base-loose') - getCssVar( - 'spacing', - 'super-tight' - ) - ) / 2 - ) - getCssVar('spacing', 'none') - calc( - ( - getCssVar('spacing', 'base-tight') - getCssVar( - 'spacing', - 'super-tight' - ) - ) / 2 - ) - getCssVar('spacing', 'tight'); - margin: 0 getCssVar('spacing', 'tight') 0 - calc(getCssVar('spacing', 'base-tight') / 2); - - .#{bem(panel-container, '', view_header_right)} { - padding: 0; - padding-left: getCssVar('spacing', 'tight'); - } - - @include b(control-captionbar) { - $control-captionbar: ( - font-size: getCssVar('font-size', 'regular'), - font-weight: getCssVar('font-weight', 'regular'), - padding: 0, - ); - - @include set-component-css-var(control-captionbar, $control-captionbar); - - @include b(control-captionbar-caption) { - padding-left: 0; - - &::before { - display: none; - } - } - } - - @include b(control-toolbar) { - $control-toolbar: ( - item-bg-color: transparent, - item-padding: 0, - icon-max-width: getCssVar('font-size', 'regular'), - icon-max-height: getCssVar('font-size', 'regular'), - text-margin: 0 0 0 getCssVar('spacing', 'tight'), - ); - - @include set-component-css-var(control-toolbar, $control-toolbar); - - .el-button { - --el-button-bg-color: transparent; - --el-button-text-color: #{getCssVar(color, primary)}; - --el-button-hover-bg-color: transparent; - --el-button-hover-text-color: #{getCssVar(color, primary, hover)}; - --el-button-active-bg-color: transparent; - --el-button-active-text-color: #{getCssVar(color, primary)}; - - height: auto; - - &:focus { - color: getCssVar(color, primary); - background-color: transparent; - } - } - } - } - - @include b(panel-view-content) { - $panel-view-content: ( - 'padding': calc(getCssVar('spacing', 'base-tight') / 2) - getCssVar('spacing', 'tight') getCssVar('spacing', 'none') - calc(getCssVar('spacing', 'base-tight') / 2), - ); - - @include set-component-css-var(panel-view-content, $panel-view-content); - - overflow: visible; - } - - @include b(form-group) { - $form-group-header: ( - 'padding': - calc( - ( - getCssVar('spacing', 'base-loose') - getCssVar( - 'spacing', - 'super-tight' - ) - ) / 2 - ) - getCssVar('spacing', 'none') - calc( - ( - getCssVar('spacing', 'base-tight') - getCssVar( - 'spacing', - 'super-tight' - ) - ) / 2 - ) - getCssVar('spacing', 'tight'), - 'height': 35px, - 'margin': getCssVar('spacing', 'none'), - ); - - $form-group-caption: ( - 'font-size': getCssVar('font-size', 'regular'), - 'font-weight': getCssVar('font-weight', 'regular'), - ); - - $form-group-content: ( - 'padding': calc(getCssVar('spacing', 'base-tight') / 2) - getCssVar('spacing', 'none') getCssVar('spacing', 'none'), - ); - - @include set-component-css-var('form-group-header', $form-group-header); - @include set-component-css-var('form-group-caption', $form-group-caption); - @include set-component-css-var('form-group-content', $form-group-content); - } - - @include b(form-group-header) { - @include e(right) { - .el-button { - font-size: getCssVar('font-size', 'regular'); - } - } - - @include e(icon) { - font-size: getCssVar('font-size', 'regular'); - } - } - - @include b(form-item-container) { - $form-item-container: ( - 'padding': 0 - calc( - ( - getCssVar('spacing', 'base-tight') - getCssVar( - 'spacing', - 'super-tight' - ) - ) / 2 - ) - calc( - getCssVar(font-size, small) + getCssVar('spacing', 'super-tight') - ), - 'font-size': getCssVar(font-size, small), - ); - - @include set-component-css-var( - 'form-item-container', - $form-item-container - ); - - .el-input__wrapper { - padding-right: getCssVar('spacing', 'tight'); - padding-left: getCssVar('spacing', 'tight'); - } - } - - @include b(form-button) { - padding: 0 0 - calc(getCssVar(font-size, small) + getCssVar('spacing', 'super-tight')); - } - - @include b(form-raw-item) { - $form-rawitem: ( - 'line-height': normal, - ); - - @include set-component-css-var('form-rawitem', $form-rawitem); - } - } } .x6-widget-dnd { -- Gitee From b1c056fef8365e796f158b041a66be9f07daae59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=94=BF=E6=9D=83?= <1978141412@qq.com> Date: Wed, 4 Sep 2024 16:47:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?style:=20=E5=B1=9E=E6=80=A7=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design-base/src/style/index.scss | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/design-base/src/style/index.scss b/packages/design-base/src/style/index.scss index 45cc4edf..654c2cf8 100644 --- a/packages/design-base/src/style/index.scss +++ b/packages/design-base/src/style/index.scss @@ -147,6 +147,25 @@ @include b(form-druipart) { @include b(panel-view-header) { height: 42px; + @include b(control-captionbar) { + $control-captionbar: ( + padding: getCssVar('spacing', 'none'), + ); + + @include set-component-css-var(control-captionbar, $control-captionbar); + + @include b(control-captionbar-caption) { + $control-captionbar: ( + font-size: getCssVar('font-size', 'regular'), + font-weight: getCssVar('font-weight', 'bold'), + ); + + @include set-component-css-var( + control-captionbar, + $control-captionbar + ); + } + } .#{bem('panel-container', '', 'view_header_right')} { padding: getCssVar('spacing', 'none'); -- Gitee