pref: 优化插件store

This commit is contained in:
xiaojunnuo
2025-04-12 23:59:03 +08:00
parent 965dc2cb47
commit cc0657aaa8
71 changed files with 764 additions and 767 deletions
@@ -3,8 +3,6 @@ import { useI18n } from "vue-i18n";
import { Ref, ref } from "vue";
import { useRouter } from "vue-router";
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { useUserStore } from "/src/store/modules/user";
import { useSettingStore } from "/src/store/modules/settings";
import { Modal } from "ant-design-vue";
//@ts-ignore
import yaml from "js-yaml";
@@ -29,8 +27,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return res;
};
const userStore = useUserStore();
const settingStore = useSettingStore();
const selectedRowKeys: Ref<any[]> = ref([]);
context.selectedRowKeys = selectedRowKeys;
@@ -54,6 +54,7 @@ defineOptions({
});
const route = useRoute();
const pluginStore = usePluginStore();
const plugin = ref<any>({});
const formOptionsRef: Ref = ref();
const baseFormRef: Ref = ref({});
@@ -145,6 +146,7 @@ async function doSave() {
notification.success({
message: "保存成功",
});
pluginStore.clear();
} finally {
saveLoading.value = false;
}