From 4c2fbe3a7baa78121695c77dafb8988589571212 Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 15 Oct 2024 08:53:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=8F=8A=E6=9C=AA=E5=87=BA=E4=B8=8B=E5=88=92?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/link.sh | 3 ++- src/control/list/md-ctrl/md-ctrl.scss | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/link.sh b/scripts/link.sh index 6a1803718bc..b17f9a00096 100755 --- a/scripts/link.sh +++ b/scripts/link.sh @@ -2,4 +2,5 @@ pnpm link --global "@ibiz-template/vue3-util" pnpm link --global "@ibiz-template/model-helper" pnpm link --global "@ibiz-template/runtime" pnpm link --global "@ibiz-template/core" -pnpm link --global "@ibiz-template/theme" \ No newline at end of file +pnpm link --global "@ibiz-template/theme" +pnpm link --global "@ibiz-template/devtool" \ No newline at end of file diff --git a/src/control/list/md-ctrl/md-ctrl.scss b/src/control/list/md-ctrl/md-ctrl.scss index 93911af083d..5267ec8c2b9 100644 --- a/src/control/list/md-ctrl/md-ctrl.scss +++ b/src/control/list/md-ctrl/md-ctrl.scss @@ -30,17 +30,13 @@ $control-mobmdctrl: ( height: 100%; @include e(content) { - display: flex; - flex-wrap: wrap; width: 100%; - height: 100%; - padding: getCssVar(control-mobmdctrl, padding); + height: 99%; overflow: hidden auto; .van-cell { padding: getCssVar(control-mobmdctrl, padding); } - @include when(show-underLine) { .#{bem(control-mobmdctrl-item)} + .#{bem(control-mobmdctrl-item)}::before { @@ -53,6 +49,19 @@ $control-mobmdctrl: ( content: ''; background-color: getCssVar(color, border); } + + .van-swipe-cell + .van-swipe-cell { + .van-swipe-cell__wrapper::before { + position: relative; + top: rem(1px); + left: 1rem; + display: block; + width: calc(100% - 2rem); + height: rem(1px); + content: ''; + background-color: getCssVar(color, border); + } + } } } -- Gitee From 6d4cc717241b8f4c71cc49766aeeb0c96c3ddf9d Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 15 Oct 2024 08:54:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=8C=83=E5=9B=B4=E9=80=89=E6=8B=A9=E5=99=A8=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E6=8B=A9=E7=AC=AC=E4=BA=8C=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ibiz-date-range-picker/ibiz-date-range-picker.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.tsx b/src/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.tsx index dda1132120b..233689a508b 100644 --- a/src/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.tsx +++ b/src/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.tsx @@ -32,7 +32,7 @@ export const IBizDateRangePicker = defineComponent({ // 分钟按指定数分隔 const minStep = 1; // 数据 - const items: string[] = []; + let items: string[] = []; // 时间选择器文本 const lang = { title: ibiz.i18n.t('editor.datePicker.title'), @@ -100,6 +100,7 @@ export const IBizDateRangePicker = defineComponent({ return array; } if (props.value && typeof props.value === 'string') { + items = props.value.split(valueSeparator); return props.value.split(valueSeparator); } return []; @@ -127,7 +128,7 @@ export const IBizDateRangePicker = defineComponent({ // 处理值变更 const onConfirm = (value: string, index: number) => { const formatVal = dayjs(value).format(valueFormat); - if (formatVal !== 'Invalid Date') { + if (valueFormat && formatVal !== 'Invalid Date') { items[index] = formatVal; } else { items[index] = value; @@ -137,7 +138,9 @@ export const IBizDateRangePicker = defineComponent({ } if (refFormItem.value) { const valueName = refFormItem.value[index]; - emit('change', value, valueName); + if (valueName) { + emit('change', value, valueName); + } } }; -- Gitee From ce8892075926b0a34fbe091aa0725cfb22a6024c Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 15 Oct 2024 08:55:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E4=B8=8B=E6=8B=89=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E6=94=AF=E6=8C=81=E4=BB=A3=E7=A0=81=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E5=8F=8A=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ibiz-dropdown/ibiz-dropdown.scss | 28 ++++++- .../ibiz-dropdown/ibiz-dropdown.tsx | 76 ++++++++++++++++++- 2 files changed, 101 insertions(+), 3 deletions(-) diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss index c31e470c2c6..8d7b77617c3 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss @@ -5,14 +5,30 @@ height: 100%; font-size: getCssVar('form-item', 'font-size'); + .#{bem('dropdown','select-input')} { + padding: 0 rem(16px); + color: getCssVar(dropdown, select-option-item-color); + background-color: getCssVar(dropdown, select-option-item-bkcolor); + border-radius: getCssVar(spacing, base); + } + &::after { display: none; } .van-field__body { + display: flex; + justify-content: space-between; height: 100%; } + } + @include e(option) { + padding: rem(5px) rem(16px); + line-height: 21px; + color: getCssVar(dropdown, select-option-item-color); + background-color: getCssVar(dropdown, select-option-item-bkcolor); + border-radius: getCssVar(spacing, base); } .van-picker { @@ -32,4 +48,14 @@ color: getCssVar('form-item', 'readonly-color'); -webkit-text-fill-color: getCssVar('form-item', 'readonly-color'); } -} \ No newline at end of file +} + +@include b(dropdown-readonly-text-item) { + display: inline-block; + padding: 0 rem(16px); + font-size: rem(14px); + line-height: rem(24px); + color: getCssVar(dropdown, select-option-item-color); + background-color: getCssVar(dropdown, select-option-item-bkcolor); + border-radius: getCssVar(spacing, base); +} diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 86d9de836ab..4e007549d92 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx @@ -5,6 +5,7 @@ import { useNamespace, } from '@ibiz-template/vue3-util'; import './ibiz-dropdown.scss'; +import { PickerOption } from 'vant'; import { DropDownListEditorController } from '../dropdown-list-editor.controller'; import { IBizCommonRightIcon } from '../../common/right-icon/right-icon'; @@ -118,6 +119,11 @@ export const IBizDropdown = defineComponent({ } }; + // 根据text获取对应代码表项 + const getCodeListItem = (text: string | undefined) => { + return items.value.find(item => item.text === text); + }; + return { ns, c, @@ -131,10 +137,32 @@ export const IBizDropdown = defineComponent({ treeNodes, showPicker, onConfirm, + getCodeListItem, }; }, render() { + const readonlyContent = this.valueText.split(',').map((text: string) => { + const codeListItem = this.getCodeListItem(text); + return ( + + {text} + + ); + }); + + const optionValue = this.getCodeListItem(this.valueText); // 编辑态内容 const editContent = this.hasChildren ? ibiz.i18n.t('editor.dropdownList.noSupportTreePicker') @@ -154,8 +182,28 @@ export const IBizDropdown = defineComponent({ this.showPicker = true; } }} + style={ + optionValue?.color || optionValue?.bkcolor + ? this.ns.cssVarBlock({ + 'select-option-item-color': `${optionValue.color || ''}`, + 'select-option-item-bkcolor': `${ + optionValue.bkcolor || '' + }`, + }) + : '' + } > {{ + input: () => { + if (this.valueText) { + return ( + + {this.valueText} + + ); + } + return
{this.c.placeHolder}
; + }, 'right-icon': , }} , @@ -167,7 +215,31 @@ export const IBizDropdown = defineComponent({ this.showPicker = false; }} onConfirm={this.onConfirm} - /> + > + {{ + option: (option: PickerOption, _index: number) => { + return ( +
+ {option.text} +
+ ); + }, + }} + , ]; return ( @@ -178,7 +250,7 @@ export const IBizDropdown = defineComponent({ this.readonly ? this.ns.m('readonly') : '', ]} > - {this.readonly ? this.valueText : editContent} + {this.readonly ? readonlyContent : editContent} ); }, -- Gitee From 6c865a8910f1e3a33d5951a6de0668b71ddc47b9 Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 15 Oct 2024 08:56:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E6=8F=90=E4=BA=A4=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a7a4c0b0c5..17bdb1ca637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,21 @@ ## [Unreleased] +### Added + +- 下拉选择器支持代码表字体颜色及背景色 + ### Change - 富文本支持图片预览 - 工具栏支持项显示模型 - 返回顶部按钮样式对齐 +### Fixed + +- 修复列表换行及未出下划线 +- 修复时间范围选择器无法选择第二项 + ## [0.0.26] - 2024-10-13 ### Added @@ -28,7 +37,7 @@ ### Fixed -- 修复图表宽高变化时未自适应的问题 +- 修复图表宽高变化时未自适应的问题 - 修复门户控件界面行为组未绘制的问题 - 修复登录页标签标题异常 - 修复picker编辑器打开视图方式未识别模型 -- Gitee