modern.js
modern.js copied to clipboard
auto-actions并没有按照文档的说明去生成对应的set,或者其他操作
https://modernjs.dev/docs/apis/runtime/model/auto-actions
我测试了半天,ts能够提示对应的set,但是实际调用的时候却找不到 什么情况
@liuhuapiaoyuan 可以贴一下 model 的代码看看
import { model } from '@modern-js/runtime/model';
export type LoginModelState = {
phone?: string;
password?: string;
};
export const LoginModel = model<LoginModelState>('login').define({
state: {},
actions: {
},
});
在vscode中其实已经有actions的setPhone,setPassword的提示
@liuhuapiaoyuan 可以贴一下 model 的代码看看
我没有在linux下面测试过,目前环境win