Created
January 28, 2021 08:37
-
-
Save salmanyaqoob/36abe0f081a05e8111223f27ef993e13 to your computer and use it in GitHub Desktop.
index screen js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import router from '@system.router' | |
| import app from '@system.app' | |
| export default { | |
| data: { | |
| }, | |
| clickAction(){ | |
| router.replace({ | |
| uri: 'pages/detail/detail' | |
| }); | |
| }, | |
| openPage($page){ | |
| console.log($page); | |
| router.replace({ | |
| uri: 'pages/'+$page | |
| }); | |
| }, | |
| touchMove(e){ // Handle the swipe event. | |
| if(e.direction == "right") // Swipe right to exit. | |
| { | |
| this.appExit(); | |
| } | |
| }, | |
| appExit(){ // Exit the application. | |
| app.terminate(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment