- 自定义组件不支持wx:for?
给了数据就是出不来
2017-11-14 - 自定义组件wxss里面不能用@font-face?
VM17251:2 Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./components/cell/cell.wxss:62:1)This wxss file is ignored.一放进去就给我报错那我要用小图标怎么办?只能用图片代替吗?
2017-11-13 - bind:这种写法是否有bug?
<component-dropdown bindtoggleChange="toggleChange"> 这个可以触发 <view slot="dropdown-header">这是头部</view> <view slot="dropdown-body">这是内容区域</view> </component-dropdown> <component-dropdown bind:toggleChange="toggleChange"> 无效没法触发toggleChange <view slot="dropdown-header">这是头部</view> <view slot="dropdown-body">这是内容区域</view> </component-dropdown>
2017-11-10 - 自定义组件传值
index.wxml <view> <component-dropdown bind:toggleChange="toggleChange"> <view slot="dropdown-header">这是头部</view> <view slot="dropdown-body">这是内容区域</view> </component-dropdown> </view> 组件内部方法 methods: { dropdownToggle: function (e) { this.setData({ toggle: !this.data.toggle }) var myEventDetail = {} // detail对象,提供给事件监听函数 var myEventOption = { toggle: this.data.toggle } // 触发事件的选项 这里 走到了 console.log(222) this.triggerEvent('toggleChange', myEventDetail, myEventOption) } } index.js Page({ data: { }, methods: { toggleChange: function (e) { 为什么没触发?为什么这里的事件没触发难道不是这样绑定? console.log(222) } } })
2017-11-10 - web-view
web-view 的业务域名可以和服务器request域名一致吗?
2017-11-03 - web-view调试
开发者工具上,可以通过右键 - 调试,打开 [代码]<web-view/>[代码] 组件的调试 开发工具版本已经最新了我也没找到啊! 手机上已经看到了样子了
2017-11-03 - 如何给page加overflow-y hidden
有个向上弹出的效果遮罩层会触发page的scroll想直接弹出的时候把page overflow hidden如何加上去?
2017-10-31 - setData设置属性值之前获取this设置的属性已经被改变了?但是不可用?求解
onLoad: function (options) { var that=this; console.log(that) console.log("that:"+""+"roomid:"+that.data.roomId+" "+"hotelid:"+that.data.hotelId) //这里才设置为什么前面的that属性值已经被改变了,但是不可用? that.setData({ roomId: options.roomId, hotelId: options.hotelId }) console.log("this:" + " "+ "roomid:" + that.data.roomId + " " + "hotelid:" + that.data.hotelId) }, //console.log(that) e {data: {…}, onLoad: ƒ, onReady: ƒ, …}data: {roomId: "8d112e2b-5a23-4b3a-af99-15ee6fc30dac", hotelId: "c9633c5c-d6b4-4723-a1e3-9a2770d058a4", __webviewId__: 209}onHide: ƒ ()onLoad: ƒ ()onPullDownRefresh: ƒ ()onReachBottom: ƒ ()onReady: ƒ ()onRouteEnd: ƒ ()onShareAppMessage: ƒ ()onShow: ƒ ()onUnload: ƒ ()options: {roomId: "8d112e2b-5a23-4b3a-af99-15ee6fc30dac", hotelId: "c9633c5c-d6b4-4723-a1e3-9a2770d058a4"}route: "pages/roomdetail/roomdetail"__route__: (...)__wxWebviewId__: (...)get __route__: ƒ ()set __route__: ƒ ()get __wxWebviewId__: ƒ ()set __wxWebviewId__: ƒ ()__proto__: Object // console.log("that:"+""+"roomid:"+that.data.roomId+" "+"hotelid:"+that.data.hotelId) roomdetail.js? [sm]:18 that:roomid: hotelid: //console.log("this:" + " "+ "roomid:" + that.data.roomId + " " + "hotelid:" + that.data.hotelId) roomdetail.js? [sm]:23 this: roomid:8d112e2b-5a23-4b3a-af99-15ee6fc30dac hotelid:c9633c5c-d6b4-4723-a1e3-9a2770d058a4 求解为什么第一个that里面会无缘无故有roomId和hotelId的我明明在打印后才设置的啊!基础不扎实这个是什么原因?
2017-10-27