🐛 修复window下路径的问题
This commit is contained in:
parent
08c2a2cb5a
commit
5451f5bc70
@ -11,10 +11,10 @@ import Breadcrumb from "@/layout/compoenets/Breadcrumb.vue";
|
|||||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
import { ipcRenderer } from "electron";
|
import { ipcRenderer } from "electron";
|
||||||
import { clone } from "@/utils/clone";
|
import { clone } from "@/utils/clone";
|
||||||
import { formatDate, useClipboard, useDebounceFn } from "@vueuse/core";
|
import { useClipboard, useDebounceFn } from "@vueuse/core";
|
||||||
import IconifyIconOffline from "@/components/IconifyIcon/src/iconifyIconOffline";
|
import IconifyIconOffline from "@/components/IconifyIcon/src/iconifyIconOffline";
|
||||||
import commonIps from "./commonIp.json";
|
import commonIps from "./commonIp.json";
|
||||||
import router from "@/router";
|
import path from "path";
|
||||||
|
|
||||||
defineComponent({
|
defineComponent({
|
||||||
name: "Proxy"
|
name: "Proxy"
|
||||||
@ -565,10 +565,9 @@ const handleRandomProxyName = () => {
|
|||||||
`df_${editForm.value.type}_${result}`.toLocaleLowerCase();
|
`df_${editForm.value.type}_${result}`.toLocaleLowerCase();
|
||||||
};
|
};
|
||||||
|
|
||||||
import path from "path";
|
const normalizePath = (filePath: string) => {
|
||||||
function normalizePath(filePath: string) {
|
|
||||||
return path.normalize(filePath).replace(/\\/g, "/");
|
return path.normalize(filePath).replace(/\\/g, "/");
|
||||||
}
|
};
|
||||||
|
|
||||||
const handleSelectFile = (type: number, ext: string[]) => {
|
const handleSelectFile = (type: number, ext: string[]) => {
|
||||||
ipcRenderer.invoke("file.selectFile", ext).then(r => {
|
ipcRenderer.invoke("file.selectFile", ext).then(r => {
|
||||||
|
Loading…
Reference in New Issue
Block a user