vue使用history模式打包后出现4042024-03-012024-10-11vueVUE当我们设置了mode为history时,当前端发送路径给服务端时,服务端根本就不认识省去#的url,所以返回给我们404,因为vue是单一页面所有的页面都在index.html中,vue是用js来切换页面的 使用nginx服务器需添加以下配置: location / { try_files 2024-03-01|4|0
vue设置路径别名2024-02-292024-10-11vueVUEvite中添加下列高亮代码行的配置vite.config.js/vite.config.js: import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import topLevelAwait from "2024-02-29|3|0
Vue: Cannot find module @/router/router.ts or its corresponding type declarations.2024-02-292024-10-11vueVUEtsconfig.json中添加以下高亮代码行的配置: json {4-7} { "compilerOptions": { /* path alias */ "baseUrl": "./", "paths": { "@/*": ["./src/*"] } } }2024-02-29|4|0
vue右键弹出菜单(vue-contextmenu)2024-01-282024-10-11vueVUE安装 npm install vue-contextmenu --save2024-01-28|4|0
vite/vue Top-level await2024-01-282024-10-11vueVUEnpm安装vite-plugin-top-level-await插件 npm install vite-plugin-top-level-await -D 配置vite.config.js文件 导入 import topLevelAwait from 'vite-plugin-top-level-2024-01-28|2|0
element-plus form表单校验2024-01-282024-10-11vueVUEconst validateBackAccount = (rule, value, callback) => { //return value === value.replace(/[^[a-z0-9A-Z]+$/g, '') //return '' === value.replace(/2024-01-28|2|0