开了ts类型检测吧
不能将类型“string”分配给类型"nver"?之前写的同样的代码,一点问题没有,为什么更新了开发工具之后,就提示:不能将类型“string”分配给类型nver,请高手指点下。如图: [图片] 代码如下: wxml代码: <view class="news" wx:for="{{newses}}">{{item}}</view> <button class="loading" loading="true">上拉加载...</button> ts代码: Page({ /** * 页面的初始数据 */ data: { sources:[ '今天礼拜四,天气很好,适合去钓鱼', '今天礼拜四,天气很好,适合去钓鱼', '今天礼拜四,天气很好,适合去钓鱼', '今天礼拜四,天气很好,适合去钓鱼', ], newses:[] }, /** * 生命周期函数--监听页面加载 */ onLoad() { var that = this; setTimeout(function(){ var sources = that.data.sources; var newses = []; for(var index=0;index<10;index++){ var news = sources[index]; newses.push(news); } that.setData({ newses:newses }) },1000); }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { var that = this; setTimeout(function(){ var newses = that.data.newses; var newsesLength = newses.length; var sources = that.data.sources; var sourcesLength = that.data.sources.length; var start = newsesLength; var end = Math.min(start+9,sourcesLength-1); for (var index = start;index <= end;index++){ var news = sources[index]; newses.push(news); } that.setData({ newses:newses }) },1000) }
2023-09-21可以直接写一个按钮,然后把开放标签设置完全透明覆盖在上面就行
在使用wx-open-launch-weapp中使用了背景图,透明底色却显示白色?我在开发H5跳转小程序时,使用wx-open-launch-weapp标签,在标签样式部分使用了背景图,透明底色的背景图却显示白色, 目前只有在iOS16.1.2上出现这种现象,不明原因 [图片] <wx-open-launch-weapp id="launch-btn" :username="originalId" :path="trainPath" :env-version="envVersion" @launch="handleLaunchFn" @error="handleErrorFn" > <div v-is="'script'" type="text/wxtag-template"> <div style=" display: flex; justify-content: center; align-items: center; background-image: url(https://*******.png); background-repeat: no-repeat; border-radius: 25px; " :style="screenAvailWidths" ></div> </div> </wx-open-launch-weapp>
2023-09-21