bulkActions.ts 306 B

12345678910111213141516
  1. import { defineStore } from "pinia";
  2. export const useBulkActionsStore = props => {
  3. const { modalUuid } = props;
  4. if (!modalUuid) return null;
  5. return defineStore(`bulkActions-${modalUuid}`, {
  6. state: () => ({
  7. type: null
  8. }),
  9. actions: {
  10. init({ type }) {
  11. this.type = type;
  12. }
  13. }
  14. })();
  15. };