up
chenyc
2022-09-09 cf29ab5abf6c5f7b870c4854d37cdd6ec69fda67
src/views/home/index.vue
@@ -5,12 +5,14 @@
    import {useRoute} from 'vue-router'
    const router = useRoute()
    const counter = useCounterStore()
    const data={
        name:'cheng',
        age:18
    }
    // counter.count++
    const count=computed(()=>{
        return counter.count
    })
    console.log(count, 'count')
    const add=()=>{
        counter.increment()
    }
@@ -25,5 +27,6 @@
    <Button @click="add" type="primary">
        Tertiary{{count}}
    </Button>
    <div>{{data.name}}</div>
</template>