diff --git a/src/preload.js b/src/preload.js index 59f91f2..e37dfa2 100644 --- a/src/preload.js +++ b/src/preload.js @@ -107,18 +107,18 @@ const quickcommand = { swalOneByOne(options) }, - showSelectBox: function (callback, selects) { + showSelectBox: function (callback, selects, placeholder = "搜索") { let helps = `正确用法: quickcommand.showSelectBox(choise => { var index = choise.index var text = choise.text //do something... - }, [option1, option2...])` + }, [option1, option2...], placeholder)` if (!(callback instanceof Function)) throw helps if (!(selects instanceof Array) || (selects && !selects.length)) throw helps // 调整插件高度 let modWindowHeight = num => { - if(!$("#customize").is(":parent")) utools.setExpendHeight(num > 11 ? 600 : 50 * (num + 1)); + if(!$("#customize").is(":parent")) utools.setExpendHeight(num > 10 ? 550 : 50 * num); } var html = `