專案

一般

配置概況

動作

Bug #148

進行中
SC SC

SVG都在index.html, 有夠難讀

Bug #148: SVG都在index.html, 有夠難讀

是由 Sashiba Chou約 1 年 前加入.

狀態:
New
優先權:
Normal
被分派者:
開始日期:
2025-01-17
完成日期:
2025-01-29 (逾期 約 14 個月)
完成比例:

0%

預估工時:
5:00 小時
耗用工時:

概述

  1. 把SVG放到另外的資料夾和檔案

  2. 但是這會造成JS讀不到SVG內容

  3. SVG必須改成動態載入, JS也是

  4. 但是這會造成CROS
    Access to XMLHttpRequest at 'file:///D:/ER_note/ext_base.svg' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.

  5. 所以必須用localhost的方式, 解法:

Using Python's HTTP Server:
If you have Python installed, you can start a simple HTTP server by navigating to your project's directory in the command line and running:


python -m http.server

This command will start a server at http://localhost:8000/, allowing you to access your files through a browser.

動作

匯出至 PDF Atom