15 lines
278 B
JavaScript
15 lines
278 B
JavaScript
/**
|
|
* 简单的响应式状态管理
|
|
* 基于 Vue 3 reactive API
|
|
*/
|
|
|
|
import { reactive, ref } from 'vue';
|
|
import userStore from './modules/user.js';
|
|
|
|
// 创建全局状态
|
|
const globalStore = reactive({
|
|
user: userStore
|
|
});
|
|
|
|
export default globalStore;
|
|
export { userStore }; |