From 1fc9e1a208098cdb64bd06678502b15af6515e0b Mon Sep 17 00:00:00 2001 From: XRene <1017653702@qq.com> Date: Wed, 8 Nov 2017 14:45:01 +0800 Subject: [PATCH] update action-sheet demo and doc --- .../components/docs/en-US/action-sheet.md | 32 +++++++++++++++++-- .../components/docs/zh-CN/action-sheet.md | 32 +++++++++++++++++-- example/pages/action-sheet.vue | 32 +++++++++++++++++-- 3 files changed, 90 insertions(+), 6 deletions(-) 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() }