Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.1k views
in Technique[技术] by (71.8m points)

.html多页页面引入vue.js怎么开发?

之前一直用vue-cli脚手架开发单页面,现在有个多页面任务,愚弟有点不明白怎么开发。

login.html
index.html
about.html
newList.html
detail.html

像这种多页面来回跳的,难道每个文件都得引vue.js,每个都得实例化一次vue吗,像这样的vuex什么的可以用吗


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

多页面的话,每个页面都是独立且完整的环境,所以都要引入并实例化全部框架代码。如果不想这样做就要用 vue-router 这样的库实现单页应用。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...