mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-10 07:24:37 +08:00
新建快捷命令支持base64格式
This commit is contained in:
parent
472f0029e2
commit
15395e3ff6
@ -43,6 +43,12 @@
|
|||||||
"label": "新建快捷命令",
|
"label": "新建快捷命令",
|
||||||
"match": "/^\\{[\\s\\S]*\"program\" *: *\".*\"[\\s\\S]*\"cmd\" *: *\".*\"[\\s\\S]*\\}$/i",
|
"match": "/^\\{[\\s\\S]*\"program\" *: *\".*\"[\\s\\S]*\"cmd\" *: *\".*\"[\\s\\S]*\\}$/i",
|
||||||
"maxNum": 1
|
"maxNum": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "regex",
|
||||||
|
"label": "新建快捷命令",
|
||||||
|
"match": "/^qc=eyJwcm9ncmFtIj/",
|
||||||
|
"maxNum": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -321,8 +321,17 @@ export default {
|
|||||||
initPage() {
|
initPage() {
|
||||||
// 如果从 newcommand 进入则直接新建命令
|
// 如果从 newcommand 进入则直接新建命令
|
||||||
if (this.newCommandDirect) {
|
if (this.newCommandDirect) {
|
||||||
if (this.$root.enterData.type === "text") this.addNewCommand();
|
if (this.$root.enterData.type === "text") {
|
||||||
else this.editCommand(JSON.parse(this.$root.enterData.payload));
|
this.addNewCommand();
|
||||||
|
} else if (this.$root.enterData.payload.slice(0, 3) === "qc=") {
|
||||||
|
this.editCommand(
|
||||||
|
JSON.parse(
|
||||||
|
window.base64Decode(this.$root.enterData.payload.slice(3))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.editCommand(JSON.parse(this.$root.enterData.payload));
|
||||||
|
}
|
||||||
this.$router.push("/configuration");
|
this.$router.push("/configuration");
|
||||||
}
|
}
|
||||||
if (this.$route.params.tags) {
|
if (this.$route.params.tags) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user