mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 19:20:37 +08:00
编排添加正则提取/替换
This commit is contained in:
@@ -121,6 +121,11 @@ export default defineComponent({
|
||||
],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
command: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
mainKeyDisplay() {
|
||||
if (!this.mainKey) return "";
|
||||
@@ -272,7 +277,7 @@ export default defineComponent({
|
||||
|
||||
const args = [this.mainKey, ...activeModifiers];
|
||||
// 为每个参数添加引号
|
||||
this.$emit("update:modelValue", `keyTap("${args.join('","')}")`);
|
||||
this.$emit("update:modelValue", `${this.command.value}("${args.join('","')}")`);
|
||||
},
|
||||
parseKeyString(val) {
|
||||
try {
|
||||
|
||||
@@ -54,7 +54,7 @@ export default defineComponent({
|
||||
.filter((val) => val !== undefined && val !== "")
|
||||
.join(",");
|
||||
|
||||
this.$emit("update:modelValue", argv);
|
||||
this.$emit("update:modelValue", `${this.command.value}(${argv})`);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user