From ee6f0666219d94c78b5d4b07034faf253e179b9a Mon Sep 17 00:00:00 2001 From: ShineKOT <1917095344@qq.com> Date: Mon, 11 Nov 2024 11:43:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=EF=BC=8C=E8=8F=9C=E5=8D=95=E9=A2=84=E8=A7=88=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/grid-shell/grid-shell.scss | 69 ++++++++++--------- .../src/components/menu-shell/menu-shell.scss | 3 - .../menu-preview-content.controller.ts | 12 +++- .../view-ctrl-shell/view-ctrl-shell.scss | 10 ++- 4 files changed, 54 insertions(+), 40 deletions(-) diff --git a/packages/grid-design/src/components/grid-shell/grid-shell.scss b/packages/grid-design/src/components/grid-shell/grid-shell.scss index d45cf757..ec66de78 100644 --- a/packages/grid-design/src/components/grid-shell/grid-shell.scss +++ b/packages/grid-design/src/components/grid-shell/grid-shell.scss @@ -1,41 +1,42 @@ /* stylelint-disable selector-class-pattern */ @include b(gird-shell) { - @include m(light) { - $control-grid: ( - text-color: rgba(var(#{getCssVarName(grey, 9)}),1), - bg-color: rgba(var(#{getCssVarName(white)}),1), - row-edit-bg-color: rgba(var(#{getCssVarName(grey, 8), }),0.13), - row-bg-color: rgba(var(#{getCssVarName(white)}),1), - row-bg-color-2: rgba(var(#{getCssVarName(grey, 0)}),1), - row-hover-color: rgba(#{getCssVar(grey, 1)}, 1), - row-select-color: rgba(var(#{getCssVarName(blue, cyan, 0)}),1), - scrollbar-bg-color: #{rgba(var(#{getCssVarName(grey, 8), }),0.13)}, - scrollbar-bg-hover-color: #{rgba(var(#{getCssVarName(grey, 8), }),0.13)}, - cell-padding: 6px 12px, - now-header-height: 58px, - ); - $control-grid-header: ( - text-color: rgba(var(#{getCssVarName(grey, 6)}),1), - bg-color: rgba(#{getCssVar(grey, 1)}, 1), - ); + background-color: getCssVar(color, white); + @include m(light) { + $control-grid: ( + text-color: rgba(var(#{getCssVarName(grey, 9)}), 1), + bg-color: rgba(var(#{getCssVarName(white)}), 1), + row-edit-bg-color: rgba(var(#{getCssVarName(grey, 8), }), 0.13), + row-bg-color: rgba(var(#{getCssVarName(white)}), 1), + row-bg-color-2: rgba(var(#{getCssVarName(grey, 0)}), 1), + row-hover-color: rgba(#{getCssVar(grey, 1)}, 1), + row-select-color: rgba(var(#{getCssVarName(blue, cyan, 0)}), 1), + scrollbar-bg-color: #{rgba(var(#{getCssVarName(grey, 8), }), 0.13)}, + scrollbar-bg-hover-color: #{rgba(var(#{getCssVarName(grey, 8), }), 0.13)}, + cell-padding: 6px 12px, + now-header-height: 58px, + ); + $control-grid-header: ( + text-color: rgba(var(#{getCssVarName(grey, 6)}), 1), + bg-color: rgba(#{getCssVar(grey, 1)}, 1), + ); - $control-grid-page: ( - text-color: rgba(var(#{getCssVarName(grey, 6)}),1), - ); + $control-grid-page: ( + text-color: rgba(var(#{getCssVarName(grey, 6)}), 1), + ); - $control-grid-footer: ( - text-color: rgba(var(#{getCssVarName(grey, 6)}),1), - bg-color: rgba(#{getCssVar(grey, 1)}, 1), - ); - @include set-component-css-var(control-grid, $control-grid); - @include set-component-css-var(control-grid-header, $control-grid-header); - @include set-component-css-var(control-grid-page, $control-grid-page); - @include set-component-css-var(control-grid-footer, $control-grid-footer); + $control-grid-footer: ( + text-color: rgba(var(#{getCssVarName(grey, 6)}), 1), + bg-color: rgba(#{getCssVar(grey, 1)}, 1), + ); + @include set-component-css-var(control-grid, $control-grid); + @include set-component-css-var(control-grid-header, $control-grid-header); + @include set-component-css-var(control-grid-page, $control-grid-page); + @include set-component-css-var(control-grid-footer, $control-grid-footer); - --el-text-color-placeholder: #{getCssVar(color, text, 3)}; + --el-text-color-placeholder: #{getCssVar(color, text, 3)}; - .el-table__header { - height: getCssVar(control-grid, now-header-height); - } + .el-table__header { + height: getCssVar(control-grid, now-header-height); } -} \ No newline at end of file + } +} diff --git a/packages/menu-design/src/components/menu-shell/menu-shell.scss b/packages/menu-design/src/components/menu-shell/menu-shell.scss index 2656865e..36b89fc2 100644 --- a/packages/menu-design/src/components/menu-shell/menu-shell.scss +++ b/packages/menu-design/src/components/menu-shell/menu-shell.scss @@ -32,9 +32,6 @@ $menu-shell: ( padding: getCssVar(menu-shell, padding-top-bottom) getCssVar(menu-shell, padding); overflow-y: auto; -} - -@include b(light-theme-shell) { @include menu-light-theme; @include m(popper) { @include menu-light-theme; diff --git a/packages/menu-design/src/panel-items/menu-preview-content/menu-preview-content.controller.ts b/packages/menu-design/src/panel-items/menu-preview-content/menu-preview-content.controller.ts index 61b18633..701af802 100644 --- a/packages/menu-design/src/panel-items/menu-preview-content/menu-preview-content.controller.ts +++ b/packages/menu-design/src/panel-items/menu-preview-content/menu-preview-content.controller.ts @@ -1,3 +1,4 @@ +import { recursiveIterate } from '@ibiz-template/core'; import { PreviewContentController } from '@ibiz-template-plugin/design-base'; import { MenuPreviewContentState } from './menu-preview-content.state'; @@ -36,7 +37,14 @@ export class MenuPreviewContentController extends PreviewContentController { * @memberof MenuPreviewContentController */ protected async initItems(): Promise { - console.log('initItems', this.majorData); - this.state.items = this.majorData.psappmenuitems || []; + const items: IData[] = []; + recursiveIterate( + this.majorData, + (item: IData) => { + items.push(item); + }, + { childrenFields: ['psappmenuitems'] }, + ); + this.state.items = items; } } diff --git a/packages/view-design/src/components/panel-item-widgets/preview-componnets/view-ctrl-shell/view-ctrl-shell.scss b/packages/view-design/src/components/panel-item-widgets/preview-componnets/view-ctrl-shell/view-ctrl-shell.scss index 50f3ae4a..189eaf18 100644 --- a/packages/view-design/src/components/panel-item-widgets/preview-componnets/view-ctrl-shell/view-ctrl-shell.scss +++ b/packages/view-design/src/components/panel-item-widgets/preview-componnets/view-ctrl-shell/view-ctrl-shell.scss @@ -4,7 +4,15 @@ .#{bem('menu-shell-container')} { .#{bem('control-appmenu', '', 'vertical')} { - width: 100% !important; + width: 100%; + .el-menu--vertical { + overflow: unset; + } + .#{bem('control-appmenu-collapse-icon')} { + bottom: -6px; + float: right; + position: relative; + } } } -- Gitee