引入页面 [代码]/**[代码][代码] [代码][代码]* 页面相关事件处理函数--监听用户下拉动作[代码][代码] [代码][代码]*/[代码][代码]onPullDownRefresh: [代码][代码]function[代码] [代码]() {[代码] [代码]},[代码]调用 Component 里面获取数据的方法
Component是否支持上拉加载,下拉刷新Component是否支持上拉加载,下拉刷新 如何支持 如何写呢 看完文档好像没有
2019-07-15没人解答吗
usingComponents 引入页面onLoad未执行- 当前 Bug 的表现(可附上截图) usingComponents 引入页面onLoad未执行 - 预期表现 onLoad: function(options) { console.log(111112); }, - 复现路径 /pages/landlord/myHouse/myHouse - 提供一个最简复现 Demo index.wxml [代码]<[代码][代码]myHouse[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{PageCur == 'myHouse'}}"[代码][代码]></[代码][代码]myHouse[代码][代码]>[代码][代码]<[代码][代码]contract[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{PageCur == 'contract'}}"[代码][代码]></[代码][代码]contract[代码][代码]>[代码][代码]<[代码][代码]houseControl[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{PageCur == 'houseControl'}}"[代码][代码]></[代码][代码]houseControl[代码][代码]>[代码][代码]<[代码][代码]rent[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{PageCur == 'rent'}}"[代码][代码]></[代码][代码]rent[代码][代码]>[代码][代码]<[代码][代码]personal[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{PageCur == 'personal'}}"[代码][代码]></[代码][代码]personal[代码][代码]>[代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"cu-bar tabbar shadow foot"[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"action"[代码] [代码]bindtap[代码][代码]=[代码][代码]"NavChange"[代码] [代码]data-cur[代码][代码]=[代码][代码]"myHouse"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'cuIcon-cu-image'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]"/images/icon/myHouse{{PageCur=='myHouse'?'_cur':''}}.png"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]" {{PageCur=='myHouse'?'text-green':'text-bar'}}"[代码][代码]>我的房屋</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"action"[代码] [代码]bindtap[代码][代码]=[代码][代码]"NavChange"[代码] [代码]data-cur[代码][代码]=[代码][代码]"contract"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'cuIcon-cu-image'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]"/images/icon/contract{{PageCur=='contract'?'_cur':''}}.png"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"{{PageCur=='contract'?'text-green':'text-bar'}}"[代码][代码]>合同管理</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"action"[代码] [代码]bindtap[代码][代码]=[代码][代码]"NavChange"[代码] [代码]data-cur[代码][代码]=[代码][代码]"houseControl"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'cuIcon-cu-image'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]"/images/icon/houseControl{{PageCur=='houseControl'?'_cur':''}}.png"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"{{PageCur=='houseControl'?'text-green':'text-bar'}}"[代码][代码]>房控</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"action"[代码] [代码]bindtap[代码][代码]=[代码][代码]"NavChange"[代码] [代码]data-cur[代码][代码]=[代码][代码]"rent"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'cuIcon-cu-image'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]"/images/icon/rent{{PageCur=='rent'?'_cur':''}}.png"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"{{PageCur=='rent'?'text-green':'text-bar'}}"[代码][代码]>收租</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"action"[代码] [代码]bindtap[代码][代码]=[代码][代码]"NavChange"[代码] [代码]data-cur[代码][代码]=[代码][代码]"personal"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'cuIcon-cu-image'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]"/images/icon/personal{{PageCur=='personal'?'_cur':''}}.png"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"{{PageCur=='personal'?'text-green':'text-bar'}}"[代码][代码]>个人中心</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码]</[代码][代码]view[代码][代码]>[代码]index.json引入相关页面 [代码]{[代码][代码] [代码][代码]"usingComponents"[代码][代码]: {[代码][代码] [代码][代码]"myHouse"[代码][代码]: [代码][代码]"/pages/landlord/myHouse/myHouse"[代码][代码],[代码][代码] [代码][代码]"contract"[代码][代码]: [代码][代码]"/pages/landlord/contract/contract"[代码][代码],[代码][代码] [代码][代码]"houseControl"[代码][代码]: [代码][代码]"/pages/landlord/houseControl/houseControl"[代码][代码],[代码][代码] [代码][代码]"rent"[代码][代码]: [代码][代码]"/pages/landlord/rent/rent"[代码][代码],[代码][代码] [代码][代码]"personal"[代码][代码]: [代码][代码]"/pages/landlord/personal/personal"[代码][代码] [代码][代码]}[代码][代码]}[代码]index.js [代码]const app = getApp();[代码] [代码]Page({[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面的初始数据[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]PageCur: [代码][代码]'myHouse'[代码][代码],[代码][代码] [代码][代码]// height: app.globalData.height * 2 + 24,[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面加载[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onLoad: [代码][代码]function[代码] [代码](options) {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面方法[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]NavChange(e) {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]PageCur: e.currentTarget.dataset.cur[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]onShareAppMessage() {[代码][代码] [代码][代码]return[代码] [代码]{[代码][代码] [代码][代码]title: [代码][代码]'我的房屋'[代码][代码],[代码][代码] [代码][代码]// imageUrl: '/images/share.jpg',[代码][代码] [代码][代码]path: [代码][代码]'pages/landlord/myHouse/myHouse'[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码] [代码]})[代码] 页面如下 当加载页面 myHouse 在myHouse 页面 onLoad方法却未执行 这个是为什么了 如何调用onload呢
2019-07-15