fix: 修复initalState问题

This commit is contained in:
万纯 2020-12-22 18:58:27 +08:00
parent 97c7739d02
commit d8259ba17a
2 changed files with 3 additions and 10 deletions

View File

@ -1,12 +1,5 @@
import { reactive, toRefs, inject } from "vue";
import { inject, reactive } from "vue";
export default function initalModel() {
const initialState = reactive(inject("initialState"));
const setInitialState = (obj) => {
initState = reactive(obj);
};
return toRefs({
initialState,
setInitialState
});
return reactive(inject("initialState"));
}

View File

@ -6,7 +6,7 @@ import { useModel } from '@webank/fes';
export default {
setup() {
const { initialState } = useModel('@@initialState');
const initialState = useModel('@@initialState');
return {
initialState
};