从编译后代码来看,是被当成自定义组件了;看下安装目录下`uni.compiler.js`文件(`HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-weixin/dist/uni.compiler.js`)中`customElements`有没有`channel-live`,若无则需加上,重启HX再编译
uni-app开发小程序,使用channel-live内嵌视频号直播,页面不显示?查看编译出的代码:<channel-live wx:if="{{a}}" u-i="524a63c2-0" bind:__l="__l" u-p="{{a}}"></channel-live> 放在另一个新创建的项目中可正常展示,请问是什么原因导致的
2024-08-09try { // ...省略canvas绘制代码 // 获取snapshotNode:仅Skyline const { node } = await new Promise<{ node : any }>(resolve => { this.createSelectorQuery() .select('#snapshot') .node(resolve) .exec() }) // 截图,延迟10ms是为了确保canvas绘制二维码完成 const { tempFilePath: path } = await new Promise<{ tempFilePath : string }>((resolve, reject) => { setTimeout(() => { node.takeSnapshot({ type: 'file', format: 'png', success: resolve, fail: reject }) }, 10) }) // console.log('path:', path); // 分享 wx.showShareImageMenu({ path, style: 'v2' }) } catch(error) {}
snapshot组件在体验版本时能正常下载海报,正式上线后显示保存图片成功,但是实际上没有下载图片?问题如上。 <snapshot id="view" class="intro"> <view class="snapshot-box"> <view class="pages"> </view> </view> </snapshot> tap() { // Ensure all elements are rendered before taking a snapshot setTimeout(() => { this.createSelectorQuery().select("#view") .node().exec(res => { const node = res[0].node; node.takeSnapshot({ type: 'arraybuffer', format: 'png', success: (res) => { const f = `${wx.env.USER_DATA_PATH}/snapshot.png`; const fs = wx.getFileSystemManager(); fs.writeFileSync(f, res.data, 'binary'); wx.showToast({ title: '保存成功' }); wx.saveImageToPhotosAlbum({ filePath: f, complete: (res) => { console.log("saveImageToPhotosAlbum:", res); } }); }, fail: (res) => { console.log("takeSnapshot fail:", res); } }); }); }, 500); // Delay to ensure rendering is complete } });
2024-05-28跟onLoad一样写在methods里?
glass-easel框架里面,怎么定义onShareAppMessage?现在使用Component({})这种写法,但是没法定义onShareAppMessage
2024-05-13page.json能这样配置?
2024-04-18寂寞
Skyline 1.3.0 的更新日志在哪里?[代码]U[代码] 优化 skyline版本升级到1.3.0 这个1.3 的更新了啥?
2024-04-18type与子元素不符合预期?
skyline模式下中灰屏?scroll-view 添加属性 pointer-events: none; 调式器会灰屏 代码片段:https://developers.weixin.qq.com/s/uvkNWgmK7EOv
2024-03-03原生tabBar页暂不支持自定义路由,必须得用的话,可改用自定义tabBar
skyline模式,tabBar页面中用wx.navigateTo新界面是空白的黑屏,何解?在skyline模式下,tabBar页面中。 使用 wx.navigateTo,并设置了 routeType="wx://upwards" wx.navigateTo({ url: "pages/thread/index", routeType:"wx://upwards", }); 打开新的界面,是空白内容。黑屏 代码片断如下: https://developers.weixin.qq.com/s/hnFhgamB70Pg
2024-02-23