|
28 | 28 | <Button class="btn btn-primary" @tap="counter">计数器【Counter】</Button> |
29 | 29 | <Button class="btn btn-primary" @tap="hello">Vuex及相机</Button> |
30 | 30 | <Button class="btn btn-primary" @tap="login">模拟登录【login】</Button> |
31 | | - |
32 | 31 | <Button class="btn btn-primary" @tap="btnToast">提示【Toast】</Button> |
33 | 32 | <Button class="btn btn-primary" @tap="btnAlert">精美提示框【Alert】</Button> |
34 | 33 | <Button class="btn btn-primary" @tap="info">消息通知【Info】</Button> |
35 | | - |
36 | 34 | <Button class="btn btn-primary" @tap="btnDialog">对话框【Dialog】</Button> |
37 | | - |
38 | 35 | <Button class="btn btn-primary" @tap="btnPlatformModule">平台型号【PlatformModule】</Button> |
39 | | - |
40 | 36 | <Button class="btn btn-primary" @tap="btnPhone">电话【Phone】</Button> |
41 | 37 | <Button class="btn btn-primary" @tap="btnSms">短信【Sms】</Button> |
42 | | - |
43 | 38 | <Button class="btn btn-primary" @tap="btnGeolocation">定位</Button> |
44 | 39 | <Button class="btn btn-primary" @tap="btnPermissions">获取权限1</Button> |
45 | | - |
46 | 40 | <Button class="btn btn-primary" @tap="btnPlatformModule">获取设备信息</Button> |
47 | 41 | <Button class="btn btn-primary btn-green" @tap="btnChange" ref="btn">改变按钮【Change Btn】</Button> |
48 | | - |
49 | 42 | <Label class="message" :text="msg" col="0" row="0" /> |
50 | 43 | <Button class="btn btn-primary" text="路由跳转" @tap="onButtonTap" /> |
51 | 44 | <Button class="btn btn-primary" text="本地存储示例" @tap="onInput" /> |
|
78 | 71 | import Counter from './Counter'; |
79 | 72 | import HelloWorlds from './HelloWorld'; |
80 | 73 | import Login from './Login'; |
81 | | -
|
82 | | -import * as Toast from 'nativescript-toast'; |
83 | | -import { TNSFancyAlert, TNSFancyAlertButton } from 'nativescript-fancyalert'; |
| 74 | +import Toast from './toast'; |
| 75 | +import fancyalert from './Fancyalert'; |
84 | 76 | //import * as LocalNotifications from "nativescript-local-notifications"; |
85 | 77 | import { LocalNotifications } from 'nativescript-local-notifications'; |
86 | 78 | //var LocalNotifications = require("nativescript-local-notifications"); |
@@ -155,15 +147,23 @@ export default { |
155 | 147 | }); |
156 | 148 | }, |
157 | 149 | btnToast: function() { |
158 | | - console.log('111'); |
159 | | - let toast = Toast.makeText('你好世界【Hello World】', 'long'); |
160 | | - toast.show(); |
| 150 | + this.$navigateTo(Toast, { |
| 151 | + animated: true, |
| 152 | + transition: { |
| 153 | + name: 'slide', |
| 154 | + duration: 380, |
| 155 | + curve: 'easeIn' |
| 156 | + } |
| 157 | + }); |
161 | 158 | }, |
162 | 159 | btnAlert: function() { |
163 | | - console.log('xxx'); |
164 | | - //TNSFancyAlert.showSuccess('Success!', 'Fancy alerts are nice.', 'Yes they are!'); |
165 | | - TNSFancyAlert.showSuccess('成功!Success!', '花哨的提醒很不错。【Fancy alerts are nice.】', '是的【Yes they are!】').then(() => { |
166 | | - /* user pressed the button */ |
| 160 | + this.$navigateTo(fancyalert, { |
| 161 | + animated: true, |
| 162 | + transition: { |
| 163 | + name: 'slide', |
| 164 | + duration: 380, |
| 165 | + curve: 'easeIn' |
| 166 | + } |
167 | 167 | }); |
168 | 168 | }, |
169 | 169 | info: function() { |
|
0 commit comments