浏览代码

fix: 无障碍菜单中下载快捷方式文件功能

任一存 3 年之前
父节点
当前提交
9f00e7631f
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      web/src/views/accessibility.vue

+ 10 - 2
web/src/views/accessibility.vue

@@ -174,8 +174,8 @@
       <li>
         <a
           ref="shortcutBtnRef"
-          href="."
-          download="首都博物馆"
+          :href="shortcutFileText"
+          download="首都博物馆.url"
         >
           <img
             :src="assetUrls.shotcut"
@@ -404,6 +404,14 @@ export default {
       continueReadTaskId: null,
       continueReadIteratorStoper: null,
 
+      shortcutFileText: 'data:text/plain;charset=utf-8,' + encodeURIComponent(`
+        [{000214A0-0000-0000-C000-000000000046}]
+        Prop3=19,2
+        [InternetShortcut]
+        IDList=
+        URL=${location.origin}/main/index.html
+      `),
+
       audioPlayer: null,
     }
   },