diff --git a/CHANGELOG.md b/CHANGELOG.md index 41791e92ec038b30fdbb8a08e70c4e31958d7664..4801a549d42ba941c7e0a7e9cf0b173250ccd850 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 42669c89e5baac7d844a3c1c61615342e0bf1a9a..190f6f65fed606f35e872b7b338effd466e0d4ed 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 264a597b105b6c9640365b0de4ee9d13519287b0..bfa92d3318c48b63ed7b3d4c4cd49837d5a48572 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: () => {