mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 04:53:31 +08:00
更新快捷动作的声明
This commit is contained in:
@@ -127,10 +127,7 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
allQuickCommandTags: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
allQuickCommandTags: Array,
|
||||
isLeaving: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
@@ -251,12 +251,9 @@ export default {
|
||||
}
|
||||
);
|
||||
// F11 全屏
|
||||
this.rawEditor().addCommand(
|
||||
monaco.KeyCode.F11,
|
||||
() => {
|
||||
this.$emit("keyStroke", "fullscreen");
|
||||
}
|
||||
);
|
||||
this.rawEditor().addCommand(monaco.KeyCode.F11, () => {
|
||||
this.$emit("keyStroke", "fullscreen");
|
||||
});
|
||||
},
|
||||
getSelectionOrLineContent() {
|
||||
let selection = this.rawEditor().getSelection();
|
||||
|
79
src/plugins/monaco/types/shortcode.api.d.ts
vendored
Normal file
79
src/plugins/monaco/types/shortcode.api.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* 打开文件或文件夹
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.shellOpenItem(path)
|
||||
* ```
|
||||
*/
|
||||
declare function open(path: string): void;
|
||||
|
||||
/**
|
||||
* 在文件管理器中显示文件或文件夹
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.shellShowItemInFolder(path)
|
||||
* ```
|
||||
*/
|
||||
declare function locate(path: string): void;
|
||||
|
||||
/**
|
||||
* 访问 URL
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.shellOpenExternal(url)
|
||||
* ```
|
||||
*/
|
||||
declare function visit(url: string): void;
|
||||
|
||||
/**
|
||||
* 执行系统命令并返回结果,输出编码根据操作系统自出处理
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* child_process.execSync(cmd, { windowsHide: true } )
|
||||
* ```
|
||||
*/
|
||||
declare function system(cmd: string): string;
|
||||
|
||||
/**
|
||||
* 显示系统通知
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.showNotification(msg)
|
||||
* ```
|
||||
*/
|
||||
declare function message(msg: string): void;
|
||||
|
||||
/**
|
||||
* 模拟键盘按键
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.simulateKeyboardTap(key, ...modifier)
|
||||
* ```
|
||||
*/
|
||||
declare function keyTap(key: string, ...modifier: string[]): void;
|
||||
|
||||
/**
|
||||
* 复制文本到剪贴板
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* electron.clipboard.writeText(text)
|
||||
* ```
|
||||
*/
|
||||
declare function copyTo(text: string): void;
|
||||
|
||||
/**
|
||||
* 隐藏主窗口并输入文本
|
||||
*
|
||||
* ```js
|
||||
* // 等同于
|
||||
* utools.hideMainWindowTypeString(text)
|
||||
* ```
|
||||
*/
|
||||
declare function send(text: string): void;
|
Reference in New Issue
Block a user