create.ts 670 B

12345678910111213141516171819202122232425
  1. import { reactive } from "vue";
  2. const original = () => {
  3. return {
  4. subjectStatus: false,
  5. subjectList: [] as any, // 声部列表
  6. selectSubjectIds: [] as any,
  7. selectSubjects: [] as any, // 选中的声部
  8. selectLastTeacherSubjects: [] as any, // 选择老师最终信息
  9. studentStatus: false,
  10. teacherStatus: false,
  11. orchestraList: [] as any, // 乐团列表
  12. selectSubjectStudents: {} as any,
  13. orchestraName: null, //乐团名称
  14. selectTeacher: {} as any // 选中老师信息
  15. }
  16. }
  17. export const createState = reactive(original())
  18. // 重置对象
  19. export const resestState = () => {
  20. Object.assign(orderStatus, original())
  21. }