mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
修复收藏文件、网址的bug
This commit is contained in:
parent
1770f27725
commit
413d89183a
@ -2,7 +2,7 @@
|
|||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
utools.setExpendHeight(0);
|
utools.setExpendHeight(0);
|
||||||
this.$root.payload.forEach((file) => {
|
this.$root.enterData.payload.forEach((file) => {
|
||||||
let uid = this.getUid();
|
let uid = this.getUid();
|
||||||
let fileInfo = window.getFileInfo({
|
let fileInfo = window.getFileInfo({
|
||||||
type: "file",
|
type: "file",
|
||||||
|
@ -24,7 +24,7 @@ export default {
|
|||||||
);
|
);
|
||||||
url = choise.text + "://" + url;
|
url = choise.text + "://" + url;
|
||||||
}
|
}
|
||||||
let title = this.$root.payload.title
|
let title = this.$root.enterData.payload.title
|
||||||
.replace(/和另外 \d+ 个页面.*/, "")
|
.replace(/和另外 \d+ 个页面.*/, "")
|
||||||
.replace(/[-|—] .*?[Edge|Firefox|Chrome].*/, "")
|
.replace(/[-|—] .*?[Edge|Firefox|Chrome].*/, "")
|
||||||
.trim();
|
.trim();
|
||||||
@ -39,7 +39,7 @@ export default {
|
|||||||
let uid = this.getUid();
|
let uid = this.getUid();
|
||||||
let command = {
|
let command = {
|
||||||
features: {
|
features: {
|
||||||
explain: `访问${title}`,
|
explain: title,
|
||||||
cmds: [title],
|
cmds: [title],
|
||||||
platform: ["linux", "win32", "darwin"],
|
platform: ["linux", "win32", "darwin"],
|
||||||
code: `key_${uid}`,
|
code: `key_${uid}`,
|
||||||
@ -51,7 +51,7 @@ export default {
|
|||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
let res = await quickcommand.downloadFile(iconUrl, iconPath);
|
let res = await quickcommand.downloadFile(iconUrl, iconPath);
|
||||||
if (res) command.features.icon = iconPath;
|
if (res) command.features.icon = window.getBase64Ico(iconPath);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
this.importCommand(command);
|
this.importCommand(command);
|
||||||
utools.showNotification("操作成功!");
|
utools.showNotification("操作成功!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user