Comments (8)
@baselin 你好,找到问题了,不是nginx问题,上面的配置是对的。
当换成history模式,可能引用路径和hash # 是不一样的。
这里修改config文件夹下的index.js,原来:
assetsPublicPath: './',
staticPath:'./',
修改后:
assetsPublicPath: '/',
staticPath:'/',
主要问题出在这里,重新打包、部署,测试可行。问题关闭啦。
from vue-element-admin.
配置上没看出什么问题
能截个图么?
from vue-element-admin.
from vue-element-admin.
introduction/js 是什么 哪来的。。。
from vue-element-admin.
原本的页面“简述” http://localhost:9528/#/introduction/index
我只是把#去掉了,在router的mode这里,改成了history。
export default new Router({
mode: 'history',
from vue-element-admin.
js所有文件都在dist/js文件夹下面,但是URL如果是localhost:9528/introduction/index等localhost:9528/###/***格式,网页会去dist的###文件夹下找js,这就导致不对。我估计
from vue-element-admin.
不是说去掉#号history模式需要node配合吗?vue官方的配置也是这种错误,搞了一天nginx配置都不行,你们有谁配置成功了告诉我一下谢谢~~~~~
from vue-element-admin.
@YuxinChou 谢谢啦 ~~~~
from vue-element-admin.
Related Issues (20)
- 安装依赖报错解决方法 npm install HOT 4
- 基于rspack从0改造当前项目 HOT 3
- vue-element-admin noCache缓存问题 HOT 1
- 三级目录时页面展示异常 HOT 1
- export2Excel 为何需要依赖 script-loader 插件?经测试不安装也可以正常导出
- 升级到vue3 HOT 2
- 请问同一个页面如何多开,然后关闭或切换时,不影响其它多开的相同页面
- npm i依赖报错解决方法
- index.html 加入 meta 后, 移动端无法缩放 HOT 2
- 为什么在路由守卫里必须给定角色并传入store中? HOT 1
- 关于登录页密码框的样式问题
- vue2项目,刷新当前路由页面后,侧边栏菜单不选中是咋回事 HOT 1
- 有VUE3版本的吗?
- 路由query传参,手动刷新浏览器之后,路由参数丢失
- npm install报错
- Element UI 的 Cascader 级联选择器怎么用上去呀
- vue3版本的admin难道没有吗 HOT 3
- responseFake中的写法疑问
- 怎么判断刷新页面之后,就自动跳转到指定页面
- node-ipc 要求 node <=18 降级到16后 [email protected] 又要求node>18 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-element-admin.