坏骇芓
2019-09-16 15:59
<template> <div> hello info <div>{{count}}</div> <button type="button" @click="add()">添加</button> </div> </template> <script> import store from '@/store'; export default { name: 'Info', store, data() { return { count: store.state.count, }; }, methods: { add() { console.log('add Event'); store.commit('increase'); }, }, }; </script>
computed
3小时速成 Vue2.x 核心技术
82574 学习 · 489 问题
相似问题