Comments (5)
能告诉我一下你具体在哪里把路由给成 history 模式的么?
from vue-objccn.
const router = new Router({
// mode: "history",
routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
setTimeout(() => {
window.scrollTo(savedPosition.x, savedPosition.y);
}, 200);
} else {
return { x: 0, y: 0 };
}
}
});
export default router;
就是在这里了
from vue-objccn.
试了一下。。。好像确实不行。。。我当时好像没有注意到这里。近期一直在忙 Go 的项目。你对这个功能很急么?(不是我吐槽,cordova 的性能放在现在来看真心差。。两年前还勉强可以)
from vue-objccn.
倒不急,现在用hash能用,就是页面后退的时候记不住上次的浏览位置了,难道跟协议有关?cordova打包的应用,访问页面的时候应该使用的是file://吧 (btw,用cordova也是无奈的过渡之举···)
from vue-objccn.
在服务器上,history 模式需要后端配合 ,找不到文件时返回Index让前端路由处理,在手机APP上,找不到没有处理所以不行。
from vue-objccn.
Related Issues (19)
- rm redundant code HOT 11
- 安装项目依赖项出错 HOT 3
- 提一个bug. npm run build:win 执行exe报错。 HOT 1
- win环境下更改main.js后打包cordova失败 HOT 5
- cordova run ios异常 HOT 4
- 仓库体积过大 HOT 2
- 图片太大 HOT 1
- 大佬 好腻害 求带
- 想问大佬一个问题 HOT 3
- please help me
- Electron 跨桌面,跨APP ? HOT 1
- getIssuesListInfo报错 HOT 3
- 数据登录问题 HOT 1
- build:mac 和build:win 都报错。 HOT 1
- vue.js能开发原生app吗 HOT 1
- 编译electron的文件存储位置有bug。会导致源程序不断重复编译。 HOT 7
- 您好,想问一下打包成app是什么原理 HOT 1
- 项目流程 HOT 2
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-objccn.