mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-10-10 07:23:23 +08:00
bug fix:showSelectList options的closeOnSelect设置为false时,选项只能点一次
修改:添加每个选项独立的事件注册
This commit is contained in:
11
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
11
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
@@ -55,8 +55,15 @@ interface quickcommandApi {
|
||||
* // json
|
||||
* var opt = []
|
||||
* for (var i = 0; i < 15; i++) {
|
||||
* // 每一个选项为 json 格式
|
||||
* opt.push({title: `选项${i}`, description: `选项${i}的描述`, icon: `http://www.u.tools/favicon.ico`,abcd: `选项${i}的自定义属性`})
|
||||
* // 每一个选项为 json 格式, 使用clickFn注册选项单击事件时id属性是必需的
|
||||
* opt.push({
|
||||
* id: i,
|
||||
* title: `选项${i}`,
|
||||
* description: `选项${i}的描述`,
|
||||
* icon: `http://www.u.tools/favicon.ico`,
|
||||
* abcd: `选项${i}的自定义属性`,
|
||||
* clickFn:function(e){console.log(e)}
|
||||
* })
|
||||
* }
|
||||
* quickcommand.showSelectList(opt, {optionType: 'json'}).then(choise => {
|
||||
* console.log(`选择的选项为${choise.title}`)
|
||||
|
Reference in New Issue
Block a user