补充 mpx2web skill - #2545
Open
wangxiaokou wants to merge 20 commits into
Open
Conversation
hiyuki
reviewed
Jul 9, 2026
|
|
||
| | 知识库 | 说明 | | ||
| | --- | --- | | ||
| | [条件编译](./references/conditional-compile.md) | 模板、脚本、样式、JSON 等不同部分的条件编译语法,遇到无法跨端等效实现需分平台处理时读取 | |
Collaborator
There was a problem hiding this comment.
改skill需要考虑和mpx2rn skill(未来可能抽离出一个mpx base skill)混合使用,mpx2rn skill中已有的基础部分不需要再额外描述,重点描述web特有的差异和最佳实践
added 15 commits
July 13, 2026 14:33
hiyuki
reviewed
Sep 9, 2026
| 11. 连续触摸手势与 `tap` 共存时,按 [Web 模板能力参考](./references/web-template-reference.md) 使用与当前手势绑定的一次性误触标记;禁止用固定时间窗吞掉之后的合法点击。 | ||
| 12. 用 `transform: scale()` 兼容小字号时,按 [Web 样式实践](./references/web-style-practice.md) 同时校正变换原点和布局占位;不能只让视觉字号变小。 | ||
| 13. WebView 消息安全按 [WebView Bridge 参考](./references/webview-bridge-reference.md) 核对。优先使用内建 `bindmessage`;若 Web 与小程序消息协议不同,用 `bindmessage@web` / `bindmessage@wx` 分开处理,或在同一处理器内写真实平台分支。Web 处理器在领券、跳转等副作用前严格拒绝缺失或不等于当前值的业务主键;不要写成“字段存在时才比较”。不得反向要求既有小程序协议新增 Web-only 的 origin/source/业务字段。只有额外监听全局 `message` 时才同时校验完整可信 origin 与当前 iframe `contentWindow`。 | ||
| 14. 存在 WXS 事件绑定时,先运行 `node <skill-root>/scripts/validate-wxs-web-events.js <file.mpx>` 检查小程序与 Web 事件是否成对。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.