no message

This commit is contained in:
kuaifan 2023-03-05 18:17:47 +08:00
parent c0fe4a2bcb
commit 5d5b1000fe
4 changed files with 9 additions and 5 deletions

View File

@ -864,6 +864,14 @@
} }
if (typeof config === "string") config = {title:config}; if (typeof config === "string") config = {title:config};
let inputId = "modalInput_" + $A.randomString(6); let inputId = "modalInput_" + $A.randomString(6);
let inputProps = {
value: config.value,
placeholder: $A.L(config.placeholder),
elementId: inputId,
}
if ($A.isJson(config.inputProps)) {
inputProps = Object.assign(inputProps, config.inputProps)
}
const onOk = () => { const onOk = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!config.onOk) { if (!config.onOk) {
@ -905,11 +913,7 @@
} }
}, $A.L(config.title)), }, $A.L(config.title)),
h('Input', { h('Input', {
props: { props: inputProps,
value: config.value,
placeholder: $A.L(config.placeholder),
elementId: inputId,
},
on: { on: {
input: (val) => { input: (val) => {
config.value = val; config.value = val;