<template>
<div id="app">
<!--<img src="./assets/logo.png">-->
<h1>{{title}}</h1>
<h2 v-text='title'></h2>
<p v-html='content'></p>
<ul>
<li v-bind:class='{finished:item.isFinished}' @click='toggleClick(item)' v-for='item in items'>
{{item.label}}
</li>
</ul>
<input v-model='newItem' v-on:keyup.enter='addNewItem'>
</div>
</template>
<script>
// import Hello from './components/Hello'
import Store from './components/store.js';
// console.log(Store);
export default {
data() {
return{
title:'todo list',
content:'todo content<span>!</span>',
items:[],
// liClass:'lxq'
newItem:''
}
},
watch:{
items:{
handler: function(items) {
Store.save(items);
},
deep: true
}
},
源心
相关分类