Skip to content

Commit 1883c7d

Browse files
authored
Merge pull request #2310 from didi/docs-fix-some-content
Docs fix some content
2 parents c623049 + 64becd9 commit 1883c7d

3 files changed

Lines changed: 15 additions & 413 deletions

File tree

docs-vitepress/.vitepress/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ const sidebar: DefaultTheme.Sidebar = {
9494
text: "跨端基础",
9595
items: [
9696
{ text: "跨端输出配置", link: "/guide/cross-platform/basic" },
97-
{ text: "条件编译机制", link: "/guide/cross-platform/conditional" },
98-
{ text: "平台差异处理", link: "/guide/cross-platform/differences" },
97+
{ text: "条件编译机制", link: "/guide/cross-platform/conditional" }
9998
],
10099
},
101100
{

docs-vitepress/guide/basic/event.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,17 @@ Mpx 提供了比原生小程序更强大的事件传参能力,支持以下几
218218
})
219219
</script>
220220
```
221+
222+
## Mpx 增强事件代理
223+
224+
Mpx 提供了事件代理机制,通过在事件绑定上添加 `.proxy` 修饰符,可以在事件触发时调用全局的 `proxyEventHandler` 钩子。
225+
226+
示例:
227+
228+
```html
229+
<view bindtap.proxy="handleTap">代理事件</view>
230+
```
231+
232+
当点击时,除了执行 `handleTap`,还会触发 `Mpx.config.proxyEventHandler(event, componentIns)`
233+
234+
更多细节见 [proxyEventHandler](/api/app-config.html#proxyeventhandler)

0 commit comments

Comments
 (0)