|
7 | 7 | <MDButton id="alert" text="alert" @tap="onTap" />
|
8 | 8 | <MDButton id="prompt" text="prompt" @tap="onTap" />
|
9 | 9 | <MDButton id="confirm" text="confirm" @tap="onTap" />
|
| 10 | + <MDButton id="action" text="action" @tap="onTap" /> |
10 | 11 | <MDButton id="password" text="password" @tap="onTap" />
|
11 | 12 | <MDButton id="login" text="login" @tap="onTap" />
|
12 | 13 | <MDButton id="dialogCustomView" text="customView" @tap="onTap" />
|
|
19 | 20 | import * as frameModule from '@nativescript/core/ui/frame';
|
20 | 21 | import Vue from 'vue';
|
21 | 22 | import { EventData, View, Color } from '@nativescript/core/ui/frame';
|
22 |
| -import { alert, confirm, AlertDialog, login, prompt, inputType } from 'nativescript-material-dialogs'; |
| 23 | +import { action, alert, confirm, AlertDialog, login, prompt, inputType } from 'nativescript-material-dialogs'; |
23 | 24 | import { StackLayout } from '@nativescript/core/ui/layouts/stack-layout/stack-layout';
|
24 | 25 | import { ActivityIndicator } from '@nativescript/core/ui/activity-indicator/activity-indicator';
|
25 | 26 | import { Label } from '@nativescript/core/ui/label/label';
|
@@ -117,6 +118,16 @@ export default Vue.extend({
|
117 | 118 | }).then(result => console.log('login result', result));
|
118 | 119 | break;
|
119 | 120 | }
|
| 121 | + case 'action': { |
| 122 | + console.log('about to action'); |
| 123 | + action({ |
| 124 | + message: 'this is test Prompt!', |
| 125 | + cancelButtonText: 'Cancel', |
| 126 | + title: 'title?', |
| 127 | + actions: ['action1', 'action2', 'action3'], |
| 128 | + }).then(result => console.log('action result', result)); |
| 129 | + break; |
| 130 | + } |
120 | 131 |
|
121 | 132 | case 'alertdialog':
|
122 | 133 | const stack = new StackLayout();
|
|
0 commit comments