- 针对 animate 动画中 keyframes 中参数不能使用变量么?
Page({ data: { commentHeight: 300, showDetail: false }, onLoad: function () { const { windowHeight } = wx.getWindowInfo() const query = wx.createSelectorQuery() query.select('.navbar').boundingClientRect() query.select('#video-player').boundingClientRect() query.exec(([ nav, video ]) => { this.setData({ commentHeight: `${windowHeight - nav.height - video.height}` }) }) }, showAnim: function() { console.log(this.data.commentHeight) // 输出正常 this.animate('.block', [ { translateY: this.data.commentHeight }, { translateY: 0 }, ], 2400, () => { this.clearAnimation('.block') }) }, change: function () { this.setData({ showDetail: true }) wx.nextTick(() => { this.showAnim() }) } }) 如此动画没效果,改成一个常量值 动画生效 [图片]
2024-12-19 - input placeholder 显示异常
存在绝对定位元素在上层时,下层 input placehoder 显示如下图 [图片][图片]
2024-12-18 - 真机调试:页面引用组件第一没法识别自定义属性,第二调用setData 报错
Component({ data: { commentHeight: 0 }, lifetimes: { ready: function() { const { windowHeight } = wx.getWindowInfo() this.setData({ commentHeight: `${windowHeight - 92 - 220}` }) } }, [图片] [图片]
2024-12-17 - skyline 稳定版和最新版 真机调试异常?
data: { commentHeight: 0 }, onReady() { const { windowHeight } = wx.getWindowInfo() const query = wx.createSelectorQuery() query.select('.navbar').boundingClientRect() query.select('#video-player').boundingClientRect() query.exec(([ nav, video ]) => { this.setData({ commentHeight: `${windowHeight - nav.height - video.height}` }) }) this.videoContext = wx.createVideoContext('video-player') }, [图片] [图片] 修改属性名称,还是注释代码 提示都很奇怪 还能提示到注释的代码上去(同样的报错) [图片]
2024-12-15