Skip to content

Instantly share code, notes, and snippets.

@tacman
Created July 18, 2018 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacman/d6003422d8b8abf459f295f93dcfe34c to your computer and use it in GitHub Desktop.
Save tacman/d6003422d8b8abf459f295f93dcfe34c to your computer and use it in GitHub Desktop.
Simple list (that doesn't work) f7 and vue
<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