Skip to content

Instantly share code, notes, and snippets.

@nolimits4web
Created December 31, 2020 11:44
Show Gist options
  • Save nolimits4web/291478c2df97923fd724a0ed42abf34b to your computer and use it in GitHub Desktop.
Save nolimits4web/291478c2df97923fd724a0ed42abf34b to your computer and use it in GitHub Desktop.
Framework7 v5 Router Component
<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