mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
fix: 修复initalState问题
This commit is contained in:
parent
97c7739d02
commit
d8259ba17a
@ -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"));
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { useModel } from '@webank/fes';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const { initialState } = useModel('@@initialState');
|
||||
const initialState = useModel('@@initialState');
|
||||
return {
|
||||
initialState
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user