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

37 lines
882 B

2 years ago
2 years ago
2 years ago
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. initLoading: true,
  17. }
  18. },
  19. // actions
  20. actions: {
  21. updateInitLoading() {
  22. this.initLoading = false
  23. },
  24. updateCurrentDate(currentDate) {
  25. this.currentDate = currentDate
  26. },
  27. updateCurrentTime(currentTime) {
  28. this.currentTime = currentTime
  29. },
  30. changeAddLiquidConfigVal(val) {
  31. this.addLiquidConfigVal = val
  32. },
  33. changeSprayLiquidConfigVal(val) {
  34. this.sprayLiquidConfigVal = val
  35. },
  36. },
  37. })