需要搭配自定义路由跳转,再使用
getRouteContext 为什么返回是 undefined ?wx.router.getRouteContext(this)) https://developers.weixin.qq.com/miniprogram/dev/api/route/router/base/router.getRouteContext.html https://github.com/wechat-miniprogram/awesome-skyline/blob/main/examples/card_transition/pages/detail/detail.js this.customRouteContext = wx.router?.getRouteContext(this); details.js 60行 路由这块,文档有点单薄,基本没有太多信息可查,返回数据类型也没有。。。
2024-09-28从编译后代码来看,是被当成自定义组件了;看下安装目录下`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能这样配置?
从renderer:webivew的页面跳到renderer:skyline页面图片显示异常?从renderer:webivew的页面跳到renderer:skyline页面,skyline页面中的image图片显示不出 基础库3.0.2app.json配置 "style": "v2", "lazyCodeLoading": "requiredComponents", "componentFramework": "glass-easel", "disableScroll": true, "navigationStyle": "custom", "rendererOptions": { "skyline": { "defaultDisplayBlock": true, "defaultContentBox": true } } renderer:skyline的page.json配置 "renderer": "skyline", "rendererOptions": { "skyline": { "disableABTest": true, "sdkVersionBegin": "3.0.2", "sdkVersionEnd": "15.255.255" } }
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-238.0.16客户端版本对应基础库版本为2.21.4,而webView兼容grid-view基础库需为2.30.4+;请自行升级客户端版本 https://developers.weixin.qq.com/miniprogram/dev/framework/client-lib/version.html
grid-view 安卓兼容问题?组件:grid-view 手机型号:OPPO R11s 安卓版本:8.1.0 小程序版本库:3.0 渲染模式:Skyline/webview 微信版本:8.0.16 问题:瀑布流模式不兼容,按照官方代码片段,是4列,在手机上展现的效果是只有1列,调试用官方片段就可以
2023-09-18声明全局变量`apiCategory`为`null`,`app.onLaunch`时赋值`apiCategory`,`app.onShow`时再赋值,确保冷启动、热启动都能给`apiCategory`赋值。然后监听`apiCategory`,发生变化时调用`wx.getWindowInfo`获取窗口信息,这样可行否? 另外可关注下 [wx.onApiCategoryChange](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/life-cycle/wx.onApiCategoryChange.html)这个新接口,2.33.0+可用来监听`apiCategory`的变化
如何解决打开半屏小程序时自定义导航栏的statusBarHeight为0的问题?使用wx.openEmbeddedMiniProgram打开半屏小程序时,自定义导航栏 statusBarHeight 为0,没有任何问题,关键是切换为全屏小程序时,自定义导航头的高度缺少 statusBarHeight,高度被压缩变形,导致整个页面样式异常,影响相关功能:例如吸顶等。 自定义导航栏高度是由状态栏高度+胶囊高度+胶囊边距组成的自定义导航栏高度。其中状态栏高度在半屏的情况下为 0,全屏正常。优先打开全屏,则半屏高度异常,优先打开半屏,则全屏高度异常,自定义导航栏高度在不同的屏幕下高度无法同步。
2023-07-13