diff --git a/document/components/docs/en-US/action-sheet.md b/document/components/docs/en-US/action-sheet.md index c5ba1f91c..53f0b1613 100644 --- a/document/components/docs/en-US/action-sheet.md +++ b/document/components/docs/en-US/action-sheet.md @@ -65,7 +65,21 @@ export default { { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }).show() } } @@ -96,7 +110,21 @@ export default { { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }).show() } } diff --git a/document/components/docs/zh-CN/action-sheet.md b/document/components/docs/zh-CN/action-sheet.md index b85cb92b7..a65ef2629 100644 --- a/document/components/docs/zh-CN/action-sheet.md +++ b/document/components/docs/zh-CN/action-sheet.md @@ -65,7 +65,21 @@ { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }).show() } } @@ -95,7 +109,21 @@ { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }).show() } } diff --git a/example/pages/action-sheet.vue b/example/pages/action-sheet.vue index 4784f7c57..17222c962 100644 --- a/example/pages/action-sheet.vue +++ b/example/pages/action-sheet.vue @@ -57,7 +57,21 @@ { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }) this.actionSheet.show() }, @@ -75,7 +89,21 @@ { content: '豪华型' } - ] + ], + onSelect: (item, index) => { + this.$createToast({ + txt: `Clicked ${item.content}`, + type: 'correct', + time: 1000 + }).show() + }, + onCancel: () => { + this.$createToast({ + txt: `Clicked canceled`, + type: 'warn', + time: 1000 + }).show() + } }) this.actionSheet.show() }