From f05b75ef9fe848d56ddb4711fc13ca717fc006b9 Mon Sep 17 00:00:00 2001 From: fzh <1399952343@qq.com> Date: Wed, 13 Mar 2024 19:12:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BB=A3=E7=A0=81=E8=A1=A8=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E3=80=81=E6=A0=B7=E5=BC=8F=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss | 5 +++++ src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41791e92..4801a549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Added + +- 下拉列表支持代码表背景样式、样式表 + ### Fixed - 修复当上下文中配置srfreadonly=true时,编辑视图样式呈现不正确异常 diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss index 42669c89..190f6f65 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss @@ -40,6 +40,11 @@ $dropdown-readonly-text-item: ( } } +.el-select-dropdown__item{ + width: 100%; + background-color: getCssVar(dropdown, select-option-item-bkcolor); +} + @include b(dropdown-select-option-content) { @include flex(row, flex-start, center); diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 264a597b..bfa92d33 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx @@ -361,6 +361,14 @@ export const IBizDropdown = defineComponent({ value={item.value.toString()} label={item.text} disabled={item.disableSelect === true} + style={ + item.bkcolor + ? this.ns.cssVarBlock({ + 'select-option-item-bkcolor': `${item.bkcolor}`, + }) + : '' + } + class={[item.cls ? item.cls : null]} > {{ default: () => { -- Gitee