如何了?请问解决了么?
小程序安卓卡顿setInterval 时间倒计时严重卡顿用setInterval 写倒计时 划动屏幕 安卓机严重卡顿 之前的类似轮播的一个功能也严重卡顿 ios很流畅 (问题模块只能选择时间)
2019-12-20因为你的para只有一个值,如果para[1]就越界了老哥。
含有字典型的数组在data中如何定义.wxml <block wx:for="{{inks}}" wx:key=""> <image src="{{item.url}}" mode='widthFix' style="width:{{item.width}}rpx;"></image></block> .js var para = [{ url:[], width:[] }]; var i=0; data: { imagepath:["../../images/ink1.png", "../../images/ink2.png", "../../images/ink3.png", "../../images/ink4.png"], inks: [{ url: [], width: [] }], }, 一个函数下面: para[i].url = that.data.imagepath[parseInt(Math.random() * 4)] ; para[i].width = Math.random() ; i++; this.setData({ inks:para, }) 第一次i=0时进来就可以,第二次i=1时就报错:Cannot set property 'url' of undefined 请问,这是什么问题?
2019-10-11我也遇到了,代码都没改过
真机无法调试- 当前 Bug 的表现(可附上截图) - 预期表现 - 复现路径 - 提供一个最简复现 Demo [publib]:146 error run publib TypeError: Cannot read property 'toLowerCase' of undefined at a.g ([publib]:1) at new a ([publib]:1) at [publib]:1 at Object.u [as onReady] ([publib]:1) at Object.<anonymous> ([publib]:1) at o ([publib]:1) at i ([publib]:1) at __waServiceInit__ ([publib]:1) at __doWAServiceInit__ ([publib]:1) at [publib]:1 value @ [publib]:146 [publib]:833 ReferenceError: define is not defined at app.js:1 at ContextifyScript.Script.runInContext (vm.js:59) at Object.runInContext (vm.js:120) at loadCode ([publib]:827) at handleInitUserCode ([publib]:811) at handleSetupContext ([publib]:1221) at handleProcessMessage ([publib]:1230) at WebSocket.ws.on ([publib]:1458) at emitOne (events.js:115) at WebSocket.emit (events.js:210) loadCode @ [publib]:833 [publib]:833 ReferenceError: define is not defined at canvasdrawer.js:1 at ContextifyScript.Script.runInContext (vm.js:59) at Object.runInContext (vm.js:120) at loadCode ([publib]:827) at handleInitUserCode ([publib]:811) at handleSetupContext ([publib]:1221) at handleProcessMessage ([publib]:1230) at WebSocket.ws.on ([publib]:1458) at emitOne (events.js:115) at WebSocket.emit (events.js:210) loadCode @ [publib]:833 [publib]:833 ReferenceError: define is not defined at scan.js:1 at ContextifyScript.Script.runInContext (vm.js:59) at Object.runInContext (vm.js:120) at loadCode ([publib]:827) at handleInitUserCode ([publib]:811) at handleSetupContext ([publib]:1221) at handleProcessMessage ([publib]:1230) at WebSocket.ws.on ([publib]:1458) at emitOne (events.js:115) at WebSocket.emit (events.js:210) loadCode @ [publib]:833 [publib]:833 ReferenceError: define is not defined at index.js:1 at ContextifyScript.Script.runInContext (vm.js:59) at Object.runInContext (vm.js:120) at loadCode ([publib]:827) at handleInitUserCode ([publib]:811) at handleSetupContext ([publib]:1221) at handleProcessMessage ([publib]:1230) at WebSocket.ws.on ([publib]:1458) at emitOne (events.js:115) at WebSocket.emit (events.js:210) loadCode @ [publib]:833
2019-07-18