Created
December 31, 2020 11:44
-
-
Save nolimits4web/291478c2df97923fd724a0ed42abf34b to your computer and use it in GitHub Desktop.
Framework7 v5 Router Component
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
<template> | |
<div class="page"> | |
<p>Value is: {{foo}}</p> | |
<p> | |
<a href="#" @click="changeValue">Change value</a> | |
</p> | |
<ul> | |
{{each items}} | |
<li>{{title}}</li> | |
{{/each}} | |
</ul> | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
foo: 'bar', | |
items: [ | |
{ | |
title: 'Item 1' | |
}, | |
{ | |
title: 'Item 2' | |
}, | |
] | |
} | |
}, | |
methods: { | |
changeValue() { | |
this.foo = 'bar 2'; | |
this.$update(); | |
}, | |
}, | |
on: { | |
pageInit() { | |
this.$app.dialog.alert('page init') | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment