|
@@ -279,9 +279,16 @@ export function setComboStore(sender, config, getDictFn, bizKey) {
|
|
|
|
|
|
if (sender.$className === 'Ext.form.field.ComboBox') {
|
|
|
getDictFn(bizKey, (r) => {
|
|
|
- if (sender.el?.dom) {
|
|
|
+ if (sender.rendered) {
|
|
|
// 异步回传
|
|
|
sender.setStore(new Ext.data.Store(r))
|
|
|
+ // 这里有个bug, 异步回传完毕之后, 需要强制刷新一下
|
|
|
+ // 否则在 forceSelection 的模式下。displayField 不会强制做变更
|
|
|
+ const realValue = sender.bind?.value?.getValue()
|
|
|
+ if (typeof realValue !== 'undefined') {
|
|
|
+ sender.setValue(realValue)
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
// 同步回传
|
|
|
config.store = new Ext.data.Store(r)
|
|
@@ -397,18 +404,20 @@ export function toPlainObject(obj) {
|
|
|
|
|
|
export function confirm(msg, sender?): Promise<void> {
|
|
|
return new Promise<void>(resolve => {
|
|
|
- const scope = lookupScope(sender)
|
|
|
+ const scope = lookupScope(sender)?.topScope
|
|
|
+
|
|
|
const config: any = {
|
|
|
title: '请确认',
|
|
|
icon: Ext.Msg.QUESTION,
|
|
|
modal: true,
|
|
|
animateTarget: sender,
|
|
|
+ // resizable: false,
|
|
|
// constrainHeader: true,
|
|
|
// constrain: true,
|
|
|
// constrainTo: scope._handle?.el?.dom || Ext.getBody(),
|
|
|
items: [
|
|
|
{
|
|
|
- html: _.escape(msg)
|
|
|
+ html: `<div style="min-width: 300px;min-height: 110px">${_.escape(msg)}</div>`
|
|
|
}
|
|
|
],
|
|
|
buttons: [
|
|
@@ -960,4 +969,9 @@ export function stopEvent(e) {
|
|
|
window.event.cancelBubble = true
|
|
|
e.returnValue = false;
|
|
|
e.cancelBubble = true;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+export {
|
|
|
+ msg
|
|
|
}
|