新型管道消毒机前端代码
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.

32 lines
768 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineStore } from 'pinia'
  2. export const useSettingStore = defineStore({
  3. id: 'setting', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. // 设置当前日期
  8. currentDate: [],
  9. // 设置当前时间
  10. currentTime: [],
  11. // 设置加液泵的参数
  12. addLiquidConfigVal: 0,
  13. // 设置喷液泵的参数
  14. sprayLiquidConfigVal: 0,
  15. }
  16. },
  17. // actions
  18. actions: {
  19. updateCurrentDate(currentDate) {
  20. this.currentDate = currentDate
  21. },
  22. updateCurrentTime(currentTime) {
  23. this.currentTime = currentTime
  24. },
  25. changeAddLiquidConfigVal(val) {
  26. this.addLiquidConfigVal = val
  27. },
  28. changeSprayLiquidConfigVal(val) {
  29. this.sprayLiquidConfigVal = val
  30. },
  31. },
  32. })