Skip to content

Commit

Permalink
doc: 修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
lareinayanyu committed Jan 15, 2025
1 parent 4eaafdb commit c9c0d05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs-vuepress/guide/basic/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,16 @@ Mpx 提供了比原生小程序更强大的事件传参能力,支持以下几
### 使用 event 对象

```html
<!-- 支持传入动态数据 -->
<view bindtap="handleTapInlineWithEvent($event)">获取event对象</view>
<!-- 获取 event 对象 -->
<view bindtap="handleTapInlineWithEvent($event, 'inline')">获取event对象</view>

<script>
import { createComponent } from '@mpxjs/core'
createComponent({
methods: {
handleTapInline(event) {
handleTapInlineWithEvent(event, params) {
console.log('event:', event)
console.log('params:', params)
}
}
})
Expand Down

0 comments on commit c9c0d05

Please sign in to comment.