diff --git a/src/components/CommandEditor.vue b/src/components/CommandEditor.vue
index 2e2841f..e49831e 100644
--- a/src/components/CommandEditor.vue
+++ b/src/components/CommandEditor.vue
@@ -83,44 +83,97 @@
-
- 查看文档
- 自定义解释器路径
- 脚本及输出编码设置
+
+
+
+
+
+
+ {{
+ ["模拟按键", "快捷动作", "查看文档"][index]
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
program.ext === this.quickcommandInfo.customOptions.ext
);
@@ -256,6 +316,13 @@ export default {
let highlight = this.$root.programs[language].highlight;
this.$refs.editor.setEditorLanguage(highlight ? highlight : language);
},
+ listenKey() {},
+ showActions() {
+ this.isActionsShow = true;
+ },
+ addAction(payload) {
+ this.$refs.editor.repacleEditorSelection(payload);
+ },
// 打开文档
showHelp() {
utools.createBrowserWindow("./helps/quickcommand.html", {
@@ -263,31 +330,6 @@ export default {
height: 920,
});
},
- // 编码设置页面
- showCodingPage() {
- quickcommand
- .showInputBox(
- {
- labels: ["文件编码", "输出编码"],
- hints: [
- "GBK/Big5/utf8,无乱码请留空",
- "GBK/Big5/utf8,无乱码请留空",
- ],
- values: [
- this.quickcommandInfo.charset?.scriptCode,
- this.quickcommandInfo.charset?.outputCode,
- ],
- },
- "编码设置"
- )
- .then((res) => {
- if (res)
- [
- this.quickcommandInfo.charset.scriptCode,
- this.quickcommandInfo.charset.outputCode,
- ] = res;
- });
- },
// 展开收起侧栏
toggleSideBarWidth() {
if (this.sideBarWidth) {
@@ -298,35 +340,6 @@ export default {
this.lastSideBarWidth = 0;
}
},
- // 自定义解释器路径界面
- showCustomOptions() {
- quickcommand
- .showInputBox(
- {
- labels: ["解释器路径", "解释器参数", "脚本后缀"],
- hints: [
- "绝对路径,如:/home/.bin/python",
- "运行参数,如:-u",
- "脚本的后缀,不含点,如:py",
- ],
- values: [
- this.quickcommandInfo.customOptions?.bin,
- this.quickcommandInfo.customOptions?.argv,
- this.quickcommandInfo.customOptions?.ext,
- ],
- },
- "自定义解释器路径"
- )
- .then((res) => {
- if (res)
- [
- this.quickcommandInfo.customOptions.bin,
- this.quickcommandInfo.customOptions.argv,
- this.quickcommandInfo.customOptions.ext,
- ] = res;
- this.matchLanguage(this.quickcommandInfo.customOptions.ext);
- });
- },
// 保存
saveCurrentCommand() {
let updatedData = this.$refs.sidebar?.SaveMenuData();
diff --git a/src/components/popup/QuickAction.vue b/src/components/popup/QuickAction.vue
new file mode 100644
index 0000000..7ca1df5
--- /dev/null
+++ b/src/components/popup/QuickAction.vue
@@ -0,0 +1,107 @@
+
+
+ 快捷动作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 退出
+ 添加
+
+
+
+
+