diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc9275a9a8dd8cb2b2a52f5cdcd0561bc26862a..3f1e29e94c1287fc0a9f6d1285c2e4cee01445fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ - 新增树部件加载时显示loadding - 新增树导航视图的视图刷新能力 - 新增树面包屑绘制模式(头部样式),当配置树控件动态参数crumbshowmode=HEADERSTYLE或处于树导航栏视图时,将绘制该样式 +- modal工具补充extendConfirm弹出确认操作方法 ### Change @@ -125,6 +126,7 @@ - 修复级联选择器数据查询异常 - 修复树部件屏幕高度过高时数据显示不全 - 修复树部件计数器样式未显示移动端计数器样式 +- 修复下拉列表框值显示异常 ## [0.7.41-alpha.19] - 2025-10-16 diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 7a40aec86014e0a3c42b8d42ffe393956cf48a82..4ec6251c910278645bc97f6d95cce41356184514 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx @@ -81,6 +81,8 @@ export const IBizDropdown = defineComponent({ if (newVal === null) { curValue.value = ''; } + } else { + curValue.value = ''; } }, { immediate: true }, diff --git a/src/util/modal-util/modal-util.ts b/src/util/modal-util/modal-util.ts index dabd42bd3da1c96f2c83235bd325dd632a107b89..9d014d6dfc09e5ab55ebc7f22b7eb7709a6891b0 100644 --- a/src/util/modal-util/modal-util.ts +++ b/src/util/modal-util/modal-util.ts @@ -95,4 +95,26 @@ export class ModalUtil implements IModalUtil { }); }); } + + async extendConfirm(params: ModalParams): Promise<'yes' | 'no' | 'cancel'> { + return new Promise(resolve => { + showConfirmDialog({ + message: params.desc, + beforeClose: action => { + if (!action) { + resolve('cancel'); + } + return true; + }, + ...params, + ...params.options, + }) + .then(() => { + resolve('yes'); + }) + .catch(() => { + resolve('no'); + }); + }); + } }