<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>