wsmdyj / mpvue Goto Github PK
View Code? Open in Web Editor NEW🍉Mpvue meituan takeout (third party) open source program
🍉Mpvue meituan takeout (third party) open source program
用与原先的数据就可以 完全不懂啊 可以指教下吗
如题,希望作者能解决下
addShop (event) {
if (!this.food.count) {
Vue.set(this.food, 'count', 1)
} else {
this.food.count++
}
}
通过Vue.set设置商品数量,来控制购物车数据的展示。只是在创建订单后,如何让购物车置空呢?
rt
我通过如下方式,虽然实现了左右联动,但是不知道为什么反应特别的慢,请问您知道原因吗
methods: {
scroll (e) {
let scrollTop = e.mp.detail.scrollTop
this.currentY = Math.abs(Math.round(scrollTop))
}
},
computed: {
currentIndex () {
for (let i = 0; i < this.foodListHeights.length - 1; i++) {
let heightBottom = this.foodListHeights[i]
let heightTop = this.foodListHeights[i + 1]
// 对滑动后currentY值不足的情况进行修正
let diff = Math.abs(this.currentY - heightTop)
if (diff < 5) {
this.currentY = heightTop
}
// 判断currentY当前所在的区间
if (this.currentY < heightTop && this.currentY >= heightBottom) {
return i
}
}
}
}
$ npm run dev
[email protected] dev D:\wechat\download\mpvue
node build/dev-server.js
D:\wechat\download\mpvue\node_modules\mpvue-template-compiler\build.js:5785
switch(fileExt.platform) {
^
TypeError: Cannot read property 'platform' of undefined
at Object.compileToWxml (D:\wechat\download\mpvue\node_modules\mpvue-template-compiler\build.js:5785:20)
at genComponentWxml (D:\wechat\download\mpvue\node_modules\mpvue-loader\lib\mp-compiler\index.js:45:75)
at Timeout.createWxml [as _onTimeout] (D:\wechat\download\mpvue\node_modules\mpvue-loader\lib\mp-compiler\index.js:92:19)
at ontimeout (timers.js:438:13)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我在项目中使用mpvue开发小程序,有个页面是抢购商品列表,每个商品都有一个倒计时,在安卓手机滑动页面的时候,倒计时就会很卡,定时器数字忽快忽慢的,不知道怎么解决,有什么好建议么
小程序开发工具报错:VM3706:2 未找到入口 app.json 文件,或者文件读取失败,请检查后重新编译。
目前无头绪,请大家给点线索和思路。
微信开发者工具:v1.02.1807200
node版本:v8.11.3
npm版本:5.6.0
曾经在另外一个项目中发现以下内容放在/src/main.js中export不起作用,改到/src/main.json中可以工作。但是本项目这么改也不起作用。
{
"pages": [
"pages/logs/main",
"^pages/home/main",
"pages/order/main",
"pages/my/main",
"pages/index/main",
"pages/pay/main"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "美团外卖",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#272636",
"selectedColor": "#FFD161",
"backgroundColor": "#fff",
"borderStyle": "#a8a8a8",
"list": [
{
"pagePath": "pages/home/main",
"iconPath": "static/images/home.png",
"selectedIconPath": "static/images/home-selected.png",
"color": "white",
"text": "首页"
},
{
"pagePath": "pages/order/main",
"iconPath": "static/images/order.png",
"selectedIconPath": "static/images/order-selected.png",
"text": "订单"
},
{
"pagePath": "pages/my/main",
"iconPath": "static/images/my.png",
"selectedIconPath": "static/images/my-selected.png",
"text": "我的"
}
]
}
}
请问会持续维护吗。。。
如题,感觉mpvue 这还是有坑,以为发现可以转h5,发现不是不知道怎么转
mpvue本来就没几个项目用例,这是让转wepy的节奏吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.