Blame view

website/src/app.js 492 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// import { Set_Count, Set_Count_sy } from './store/mutation-types.js'

export default {
    name: 'app',
    setup() {
        const store = Vuex.useStore()

        // 状态的控制事件
        const setCount = () => {
            store.commit('setCount')
            store.commit('setTime')
            store.commit('setArray')
            // store._mutations.setCount[0] // 这是什么?
        }

        return {
            // 设置state
            setCount
        }
    }
}