Comments (14)
http://mpvue.com/mpvue/quickstart/
1.此项目中在已有的template里面更改代码(如counter or index ...)可实现热更新,实时编译刷新,但添加的新页面无法实时编译(在微信开发者工具中未得到更新)。
2.添加新页面代码后构建可自动生成页面,但是页面的显示顺序似乎按是pages文件夹下新页面文件夹的首字母顺序来显示的(微信app.json中是以第一个写到的页面为首页),目前该template是以counter为首页,添加boofar文件夹,编辑好代码后以boofar为首页显示。
from mpvue.
不必配置,代码构建后会自动生成。
from mpvue.
http://mpvue.com/build/ 没有认真找, 先仔细再好好研究研究,不会乱开issue了😥
from mpvue.
http://mpvue.com/build/mpvue-loader/
app.json/page.json 这一段落 可以看下
from mpvue.
@aOrz 非常感谢,原来是自己挖的坑
export default { // 这个字段下的数据会被填充到 app.json / page.json config: { pages: ['static/calendar/calendar', '^pages/list/list'], // Will be filled in webpack window: { backgroundTextStyle: 'light', navigationBarBackgroundColor: '#455A73', navigationBarTitleText: '美团汽车票', navigationBarTextStyle: '#fff' } } };
之前找到这里,但自己没细看,
mpvue的page页面命名规则与小程序相同
假如新建boofar页面,mpvue当中的结构为
index.vue main.js
但是在app层面的main.js中的配置中应写为
‘pages/boofar/boofar’
而不是'pages/boofar/index', 真的是自己挖坑自己跳,跳着还要叫!
另外, @aOrz 你好,新页面实时构建的问题依旧存在,原有页面改变可实现实时构建,但新页面一定得ctrl+c 重新npm run dev后才能在工具当中看到, 即使在main.js当中的pages当中配置好也无法被实时构建
from mpvue.
因为新的页面需要添加进 webpack 的 entry,entry 是通过遍历 src/pages 目录下的 main.js 获得的,故需要重启 webpack
from mpvue.
@aOrz 🆗
from mpvue.
那现在页面间跳转怎么写啊,直接加vue-router的方式?
from mpvue.
页面跳转可以使用 a 标签,会被转成 小程序的 navigator
from mpvue.
请问如何设置首页
from mpvue.
@alpacachen src/main.js
,
export default {
config: {
pages: ['^pages/pagename/pagename']
}
}
from mpvue.
@aOrz 那js方法里跳转要怎么写,还是把文档写详细点吧,希望马上能用到项目里。
from mpvue.
@vinson2016 js 的跳转方法直接用 wx.
相关方法即可
wx.navigateTo({
url: 'test?id=1'
})
https://mp.weixin.qq.com/debug/wxadoc/dev/api/ui-navigate.html#wxredirecttoobject
from mpvue.
@alpacachen
src/main.js
,export default { config: { pages: ['^pages/pagename/pagename'] } }
你好 按照这个提示已添加 重启项目 进入的首页设置无效
from mpvue.
Related Issues (20)
- 子组件如何向父组件传值,$emit没用
- 如何创建1.x版本的新项目
- 建议支持一下华为的快应用!
- scroll-view 下拉刷新refresherrefresh有问题怎么解决
- 项目是不是已经停更了?已经没人维护了? HOT 3
- 子组件中 v-for绑定@click 无效
- sourcemap生成格式错误,导致还原失败 HOT 5
- mpvue camera 扫码识别时间无效
- 坑太多..... HOT 34
- 最后吐槽一次 HOT 8
- computed
- computed属性未使用,getter方法却被调用
- 请问mpvue可以引用@babel的相关插件吗,想使用一些链式运算符,但是babel版本太低不能使用 HOT 2
- 小白的角度来说:有能力并且喜欢这个框架的人就去fork另外一份去维护,没能力维护或者没精力就别喷了,相互理解
- Mpvue引入百度地图API在小程序报错
- 用npm install 安装的第三方 引用后 会有各个平台的兼容性问题吗 HOT 1
- 微信开发者工具中页面样式错乱,该怎么解决? HOT 1
- test
- test
- 无法安装 vue-cli · Failed to download repo mpvue/mpvue-quickstart: unable to verify the first certificate 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 mpvue.