editUser.ts 338 B

12345678910111213141516171819
  1. import { defineStore } from "pinia";
  2. export const useEditUserStore = props => {
  3. const { modalUuid } = props;
  4. return defineStore(`editUser-${modalUuid}`, {
  5. state: () => ({
  6. userId: null,
  7. user: {}
  8. }),
  9. actions: {
  10. init({ userId }) {
  11. this.userId = userId;
  12. },
  13. setUser(user) {
  14. this.user = user;
  15. }
  16. }
  17. })();
  18. };