Skip to content

Instantly share code, notes, and snippets.

@salmanyaqoob
Created January 28, 2021 08:37
Show Gist options
  • Select an option

  • Save salmanyaqoob/36abe0f081a05e8111223f27ef993e13 to your computer and use it in GitHub Desktop.

Select an option

Save salmanyaqoob/36abe0f081a05e8111223f27ef993e13 to your computer and use it in GitHub Desktop.
index screen js
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