diff --git a/packages/plugin-auth/template/index.tsx b/packages/plugin-auth/template/index.tsx index de731a51c..8eaf5bf6b 100644 --- a/packages/plugin-auth/template/index.tsx +++ b/packages/plugin-auth/template/index.tsx @@ -7,7 +7,7 @@ function useAuth() { return [ auth, setAuth - ]; + ] as [Record, typeof setAuth]; } // class 组件支持 Hoc 用法 diff --git a/packages/plugin-auth/template/model.ts b/packages/plugin-auth/template/model.ts index dba9cdd0c..d2ad80e98 100644 --- a/packages/plugin-auth/template/model.ts +++ b/packages/plugin-auth/template/model.ts @@ -1,7 +1,5 @@ export default { - state: { - auth: {} - }, + state: {}, reducers: { setAuth (state, payload) {