This commit is contained in:
Ruin
2022-03-10 17:55:48 +08:00
parent 07be80f1d4
commit c7630a957f
7 changed files with 66 additions and 48 deletions

View File

@@ -4,17 +4,27 @@
* @Author: Ruin 🍭
* @Date: 2022-03-10 10:11:06
* @LastEditors: 刘引
* @LastEditTime: 2022-03-10 10:58:49
* @LastEditTime: 2022-03-10 16:05:04
-->
<template>
<div class="root-home">
<news></news>
<el-button @click="changeData()">更改值了</el-button>
<h1>写一点demo玩一玩</h1>
{{ res }}
</div>
</template>
<script setup lang="ts">
import news from "./components/news.vue"
import { useStore } from 'vuex';
import { computed } from "vue";
const store = useStore()
let res: any = computed(() => store.state.userInfo.name)
const changeData = () => {
store.dispatch('setData')
}
</script>
<style lang="scss" scoped>