feat: Conversations封装、首页开发
This commit is contained in:
20
src/stores/modules/share-data/index.ts
Normal file
20
src/stores/modules/share-data/index.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
interface SharedDataState {
|
||||
routeParams: Record<string, any> | null;
|
||||
}
|
||||
|
||||
export const useSharedDataStore = defineStore('sharedData', {
|
||||
state: (): SharedDataState => ({
|
||||
routeParams: null,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setRouteParams(params: Record<string, any>) {
|
||||
this.routeParams = params;
|
||||
},
|
||||
clearRouteParams() {
|
||||
this.routeParams = null;
|
||||
},
|
||||
},
|
||||
});
|
||||
@ -1,7 +1,3 @@
|
||||
/*
|
||||
* @Author: RenXiaoDong
|
||||
* @Date: 2025-06-19 01:45:53
|
||||
*/
|
||||
import { defineStore } from 'pinia';
|
||||
import type { TabBarState, TagProps, RouteLocationNormalized } from './types';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user