Files
crawlab/frontend/crawlab-ui/src/store/index.ts
Marvin Zhang 512f246094 feat: implement AutoProbe components and enhance LLM provider functionality
- Introduced AutoProbeForm and AutoProbeTaskStatus components for managing AutoProbe configurations and task statuses.
- Updated LLMProvider model to include a default model field for improved provider management.
- Enhanced AutoProbeList and AutoProbeDetail components for better user interaction and data display.
- Refactored related Vue components and services to streamline AutoProbe functionality and improve state management.
- Added internationalization support for new AutoProbe features and updated existing translations.
2025-05-12 17:37:30 +08:00

77 lines
2.1 KiB
Go

import { createStore as createVuexStore, Store } from 'vuex';
import common from '@/store/modules/common';
import layout from '@/store/modules/layout';
import node from '@/store/modules/node';
import project from '@/store/modules/project';
import spider from '@/store/modules/spider';
import task from '@/store/modules/task';
import file from '@/store/modules/file';
import dataCollection from '@/store/modules/dataCollection';
import schedule from '@/store/modules/schedule';
import user from '@/store/modules/user';
import role from '@/store/modules/role';
import token from '@/store/modules/token';
import git from '@/store/modules/git';
import notificationSetting from '@/store/modules/notificationSetting';
import notificationChannel from '@/store/modules/notificationChannel';
import notificationRequest from '@/store/modules/notificationRequest';
import notificationAlert from '@/store/modules/notificationAlert';
import database from '@/store/modules/database';
import dependency from '@/store/modules/dependency';
import environment from '@/store/modules/environment';
import system from '@/store/modules/system';
import autoprobe from '@/store/modules/autoprobe';
let _store: Store<RootStoreState>;
export const createStore = (): Store<RootStoreState> => {
return createVuexStore<RootStoreState>({
modules: {
common,
layout,
node,
project,
spider,
task,
file,
dataCollection,
schedule,
user,
role,
token,
git,
notificationSetting,
notificationChannel,
notificationRequest,
notificationAlert,
database,
dependency,
environment,
system,
autoprobe,
},
});
};
export const setStore = (store: Store<RootStoreState>) => {
_store = store;
};
export const getStore = (): Store<RootStoreState> => {
if (!_store) {
_store = createStore();
}
return _store;
};
export const addStoreModule = <M>(
path: string,
module: M,
store?: Store<RootStoreState>
) => {
if (!store) {
store = getStore();
}
store.registerModule(path, module as any);
};