We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug描述 uni微信小程序端type=“2d”在模拟器运行正常,真机失效 复现过程
<template> <view class="matching animated fadeIn"> <view class="matching__mask" /> <canvas id="matching" canvas-id="matching" type="2d" /> </view> </template> <script> import lottie from 'lottie-miniapp' export default { onReady() { this.createSelectorQuery() .select('#matching') .fields({ node: true, size: true }) .exec(async res => { const canvas = res[0].node const context = canvas.getContext('2d') const dpr = wx.getSystemInfoSync().pixelRatio canvas.width = res[0].width * dpr canvas.height = res[0].height * dpr context.scale(dpr, dpr) lottie.loadAnimation({ renderer: 'canvas', // 只支持canvas loop: true, autoplay: true, path: `https://echojin.coding.net/p/bd-public/d/bd-public/git/raw/master/lottie.json`, rendererSettings: { canvas, context, clearCanvas: true } }) }) } } </script> <style scoped lang="scss" rel="stylesheet/scss"> .matching { @include dialog-base; z-index: 99999999; canvas { width: 750rpx; height: 750rpx; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } } </style>
截图
错误设备信息 "lottie-miniapp": "^1.9.1",
The text was updated successfully, but these errors were encountered:
No branches or pull requests
bug描述
uni微信小程序端type=“2d”在模拟器运行正常,真机失效
复现过程
截图
错误设备信息
"lottie-miniapp": "^1.9.1",
The text was updated successfully, but these errors were encountered: