diff --git a/src/js/quickcommand.js b/src/js/quickcommand.js index d1e799f..08ff563 100644 --- a/src/js/quickcommand.js +++ b/src/js/quickcommand.js @@ -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