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

40 lines
967 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
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineStore } from 'pinia'
  2. export const useDetailStore = defineStore({
  3. id: 'detail', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. industry_id: '1',
  8. example_id: '1',
  9. hardwareExampleId: '1',
  10. hardware_id: '1',
  11. showRecruitDetail: false,
  12. componentKey_case: 0,
  13. componentKey_hardware: 0,
  14. }
  15. },
  16. // actions
  17. actions: {
  18. changeComponentKeyCase() {
  19. this.componentKey_case++
  20. },
  21. changeComponentKeyHardware() {
  22. this.componentKey_hardware++
  23. },
  24. changeRecruitDetail(flag) {
  25. this.showRecruitDetail = flag
  26. },
  27. updateHardwareId(hardware_id) {
  28. this.hardware_id = hardware_id
  29. },
  30. updateHardwareExampleId(hardwareExampleId) {
  31. this.hardwareExampleId = hardwareExampleId
  32. },
  33. updateIndustryId(industry_id) {
  34. this.industry_id = industry_id
  35. },
  36. updateExampleId(example_id) {
  37. this.example_id = example_id
  38. },
  39. },
  40. })