-
Notifications
You must be signed in to change notification settings - Fork 284
feat(lottie): 支持京东小程序 #3080
New issue
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
feat(lottie): 支持京东小程序 #3080
Conversation
Walkthrough本次 PR 对多个文件进行修改,主要涉及 Lottie 相关依赖与配置的更新。在两个 Changes
Sequence Diagram(s)sequenceDiagram
participant App as 应用
participant Config as 配置生成器
participant Env as 环境检测
participant Lottie as Lottie引擎
App->>Config: 加载配置(包含 renderingMode: 'mixed')
Config-->>App: 返回配置对象
App->>Env: 获取 TARO_ENV 值
alt 环境为 'weapp' 或 'jd'
Env-->>App: 返回 'weapp'/'jd'
App->>Lottie: 加载 Lottiemp 实现(新导入路径)
else 环境为 'h5'
Env-->>App: 返回 'h5'
App->>Lottie: 加载 LottieWeb 实现(更新后的导入)
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #3080 +/- ##
==========================================
Coverage 86.95% 86.95%
==========================================
Files 280 280
Lines 18456 18456
Branches 2785 2785
==========================================
Hits 16049 16049
Misses 2402 2402
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { miniprogram } from '@/utils/platform-taro' 是不是可以用这个判断
// @ts-ignore | ||
implementation = LottieWeb | ||
} else if (process.env.TARO_ENV === 'weapp') { | ||
} else if (process.env.TARO_ENV === 'weapp' || process.env.TARO_ENV === 'jd') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { miniprogram } from '@/utils/platform-taro' 是不是可以直接用这个判断
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1、appconfig 中 目前没有 renderingmode 这个字段,出现了类型报错;
2、目录结构中,命名可改为 与其他组件一致的形式,
如:lottie.tsx
lottie.taro.tsx
lottie.taro.h5.tsx
3、目前jd ide 无法展示,可在文档中稍作说明。
这里不能改,这里要通过 process 的环境变量处理分支编译,去掉无用的环境 |
# Conflicts: # pnpm-lock.yaml
2、3 fixed;1 属于 taro 范围 |
canvas 同层渲染,需要根据京东小程序文档进行配置。
Summary by CodeRabbit