Count代码:
<template>
<div>
<h1>当前求和为:{
{
$store.state.sum}}</h1>
<select v-model.number="n"><!--强制放在number里转换-->
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<button @click="increment">+</button>
<button @click="decrement">-