12345678910111213141516171819202122 |
- import { defineStore } from "pinia";
- export const useViewApiRequestStore = props => {
- const { modalUuid } = props;
- if (!modalUuid || modalUuid === "") return false;
- return defineStore(`viewApiRequest-${modalUuid}`, {
- state: () => ({
- requestId: null,
- request: {},
- removeAction: null
- }),
- actions: {
- init({ requestId, removeAction }) {
- this.requestId = requestId;
- this.removeAction = removeAction;
- },
- viewApiRequest(request) {
- this.request = request;
- }
- }
- })();
- };
|