This commit is contained in:
fofolee 2022-03-31 22:02:22 +08:00
parent 27e077b56b
commit 5eddc7b6b0

View File

@ -14,8 +14,10 @@ let showInputBox = (options = [], title = "") => {
if (!(options instanceof Object)) return reject(new TypeError("必须为数组或对象"))
if (options instanceof Array) props.labels = options
else props = options
if (!props.values) props.values = options.labels.map(() => "")
if (!props.hints) props.hints = options.labels.map(() => "")
if (!props.labels) return reject(new SyntaxError("缺少必须要的参数"))
if (!props.values) props.values = props.labels.map(() => "")
if (!props.hints) props.hints = props.labels.map(() => "")
props.title = title
Dialog.create({
component: inputBox,
componentProps: props