修复收藏文件、网址的bug

This commit is contained in:
fofolee 2022-05-27 08:54:29 +08:00
parent 1770f27725
commit 413d89183a
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
export default {
mounted() {
utools.setExpendHeight(0);
this.$root.payload.forEach((file) => {
this.$root.enterData.payload.forEach((file) => {
let uid = this.getUid();
let fileInfo = window.getFileInfo({
type: "file",

View File

@ -24,7 +24,7 @@ export default {
);
url = choise.text + "://" + url;
}
let title = this.$root.payload.title
let title = this.$root.enterData.payload.title
.replace(/和另外 \d+ 个页面.*/, "")
.replace(/[-|—] .*?[Edge|Firefox|Chrome].*/, "")
.trim();
@ -39,7 +39,7 @@ export default {
let uid = this.getUid();
let command = {
features: {
explain: `访问${title}`,
explain: title,
cmds: [title],
platform: ["linux", "win32", "darwin"],
code: `key_${uid}`,
@ -51,7 +51,7 @@ export default {
};
try {
let res = await quickcommand.downloadFile(iconUrl, iconPath);
if (res) command.features.icon = iconPath;
if (res) command.features.icon = window.getBase64Ico(iconPath);
} catch (e) {}
this.importCommand(command);
utools.showNotification("操作成功!");