随笔分类 - 前端
摘要:错误提示中包含了 URL 编码的中文字符(如 %E4%BC%9A%E5%91%98%E8%B4%AD),说明项目路径中存在中文字符。Vite 或 Node.js 在处理路径时未能正确解码这些字符,导致文件加载失败。 🔍 原因分析 使用了 new URL('.', import.meta.url).
阅读全文
摘要:sitemap.xml application/ld+json ico keywords description robots og type title description image url twitter site card title description image url cano
阅读全文
摘要:let jsonObj = [{ "Name": "test" "Attach": "www!@#$%^&*(){}|:\"<>?,./;'[]\\" }] let html = jsonObj.map((i, v) => { let jsonStr = JSON.stringify(jsonObj
阅读全文
摘要:可以通过在 body 根节点设置任意一个属性名字 data-them="dark" 来匹配主题; :root{ --gener-color: #000000; --gener-bg-color: #ffffff; } [data-theme] .header{ --gener-color: #fff
阅读全文
摘要:HOST 路径 C:\Windows\System32\drivers\etc\hosts 前往 HOST 加入 185.199.108.133 raw.githubusercontent.com 测试是否成功 (若无任何信息返回即成功): node -e "require('https').get
阅读全文
摘要:unplugin-auto-import 官网:https://github.com/unplugin/unplugin-auto-import 安装 pnpm add -D unplugin-auto-import 使用 // ~/vite.onfig.ts import AutoImport f
阅读全文
摘要:安装 官网:https://vue-i18n.intlify.dev/api/general.html pnpm add vue-i18n@9 使用 // @/locale/index.ts import appConfig from "@/configure/app.config.ts"; imp
阅读全文
摘要:官方说明:https://blog.jetbrains.com/webstorm/2018/01/working-with-vue-js-in-webstorm/#:~:text=We can debug our application,and start the debug session. 打开
阅读全文
摘要:教程基于 vite 和 vue3-ts 前往 tsconfig.json 修改 compilerOptions 选项,如果没有以下参数就自己添加: { "compilerOptions": { "baseUrl": "./src", "paths": { "@/*": [ "src/*" ] } }
阅读全文
摘要:安装 pinia 官网: https://pinia.vuejs.org/ pnpm add pinia 使用 新建 pinia 实例 // @/store/index.ts import {createPinia} from "pinia"; import useUserStore from "@
阅读全文
摘要:安装 vue-router 官网: https://router.vuejs.org/installation.html pnpm add vue-router@4 使用 vue-router 创建自己的 router // @/route/index.ts import {createRouter
阅读全文
摘要:vue 地方使用了 `` 注释,这是正常的,但是 css 部分也是使用 `` 注释,css 应该使用 `//` 或 `/* */` 注释,这里错了。 多次检查扩展,发现是扩展的问题,卸载 [vue](https://marketplace.visualstudio.com/items?itemNam
阅读全文
摘要:# 檢測第三方鏈接頁面跳转提示 ```javascript 即将跳转至新页面,请稍等... ``` # jquery 反轉對象數組 ```javascript var arr = [ { id: 1, name: 'Tom' }, { id: 2, name: 'Jerry' }, { id: 3,
阅读全文

浙公网安备 33010602011771号