You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
634 B
31 lines
634 B
<template> |
|
<div class="box1"> |
|
<h1>{{infoStore.count}}-------{{infoStore.total}}</h1> |
|
<el-button type="primary" @click="updateCount">点我修改仓库数据</el-button> |
|
</div> |
|
</template> |
|
|
|
<script setup lang="ts"> |
|
import useInfoStore from "@/store/modules/info"; |
|
//获取小仓库对象 |
|
let infoStore = useInfoStore(); |
|
|
|
const updateCount = ()=>{ |
|
// infoStore.count ++ |
|
|
|
//$patch方法 |
|
// infoStore.$patch({ |
|
// count:111 |
|
// }) |
|
infoStore.updateNum(10,100) |
|
console.log(infoStore,'========infoStore信息') |
|
} |
|
</script> |
|
|
|
<style scoped> |
|
.box1{ |
|
width: 300px; |
|
height: 200px; |
|
background: darkorange; |
|
} |
|
</style> |