分类

vue

vue使用history模式打包后出现404
当我们设置了mode为history时,当前端发送路径给服务端时,服务端根本就不认识省去#的url,所以返回给我们404,因为vue是单一页面所有的页面都在index.html中,vue是用js来切换页面的 使用nginx服务器需添加以下配置:
2024-03-01
|
0
|
0
vue设置路径别名
vite中添加下列高亮代码行的配置vite.config.js/vite.config.js: webpack类似。 附:vue+ts的可能会遇到报错Vue: Cannot find module @/router/router.ts or its corresponding type declar
2024-02-29
|
0
|
0
vite/vue Top-level await
npm安装vite-plugin-top-level-await插件 配置vite.config.js文件 导入 在plugins中添加topLevelAwait方法
2024-01-28
|
0
|
0
element-plus form表单校验
const validateBackAccount = (rule, value, callback) => { //return value === value.replace(/[^[a-z0-9A-Z]+$/g, '') //return '' === value.replace(/[a-z0
2024-01-28
|
0
|
0