摘要: Getter 有时候我们需要从 store 中的 state 中派生出一些状态,例如对列表进行过滤并计数: computed: { doneTodosCount () { return this.$store.state.todos.filter(todo => todo.done).length 阅读全文
posted @ 2021-08-25 13:23 理想三旬· 阅读(49) 评论(0) 推荐(0) 编辑