-
-
Save tacman/d6003422d8b8abf459f295f93dcfe34c to your computer and use it in GitHub Desktop.
Simple list (that doesn't work) f7 and vue
This file contains 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> | |
<!-- Scrollable page content--> | |
<f7-block-title>{{ title }}</f7-block-title> | |
<f7-block inner> | |
<ol id="example-murals"> | |
<!-- this displays blank list items --> | |
<li v-for="item in items"> | |
{{item.title}} | |
</li> | |
</ol> | |
<f7-block-title>Murals</f7-block-title> | |
<f7-list> | |
<!-- this won't even compile --> | |
</f7-list> | |
</f7-block> | |
</div> | |
</template> | |
<script> | |
import F7List from "framework7-vue/src/components/list"; | |
export default { | |
name: 'Murals', | |
components: {F7List}, | |
mounted() { // when the Vue app is booted up, this is run automatically. | |
var self = this; | |
let dataURL = 'https://jsonplaceholder.typicode.com/posts'; | |
this.$f7.request.get(dataURL, function (data) { | |
self.items = data; | |
console.log(data); | |
}); | |
}, | |
data () { | |
return { | |
title: 'Murals', | |
items: [] | |
}; | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment