fix: 静态资源文件路径解析
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { onBeforeUnmount, onMounted, reactive } from 'vue';
|
||||
import { scriptUrl } from '@/assets/js/wiregasm_worker';
|
||||
import { WK, OptionsType } from '@/plugins/wk-worker';
|
||||
import { parseBasePath } from '@/plugins/file-static-url';
|
||||
const wk = new WK();
|
||||
|
||||
export const NO_SELECTION = { id: '', idx: 0, start: 0, length: 0 };
|
||||
@@ -201,7 +202,7 @@ export function usePCAP() {
|
||||
/**本地示例文件 */
|
||||
async function handleLoadExample() {
|
||||
const name = 'test_ethernet.pcap';
|
||||
const res = await fetch('/wiregasm/test_ethernet.pcap');
|
||||
const res = await fetch(parseBasePath('/wiregasm/test_ethernet.pcap'));
|
||||
const body = await res.arrayBuffer();
|
||||
|
||||
state.summary = {
|
||||
|
||||
Reference in New Issue
Block a user