Umi: [Feature Request] umi@3 能否支持识别 dva-model-creator 写法的 model

Created on 18 Mar 2020  ·  5Comments  ·  Source: umijs/umi

Background

现有两个项目都重度使用了 dva-model-creator 来编写model。

Proposal

虽然可以通过 skipModelValidate: true 的方式跳过,但是在使用 useModel 仍然会检验model是否合法。我希望支持校验,或者useModel也能感知skipModelValidate从而达到不校验的目的。

All 5 comments

  1. useModel 如果不用,可以通过配 model: false 关闭
  2. useModel 校验你的 model 文件会报错吗?

我想用useModel拿到models/app这个全局model(用dva-model-creator编写的)下的共享数据,用来代替const { app } = yield select()。useModel("app")拿到的是undefined。

useModel 不能拿 dva 的 model。

issue 先留着,dva 需要支持 dva-model-creator 的 model 识别。

useModel 不能拿 dva 的 model。

umi官网插件plugin-model给的文档好像不太清楚,看着像能取到dva的model一样(类似reselect),但useModel('global')却是undefined,希望给出详细的使用文档。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tangzhengwen picture tangzhengwen  ·  4Comments

nguyenhuutinh picture nguyenhuutinh  ·  3Comments

Artoria-0x04 picture Artoria-0x04  ·  3Comments

miaojinxing picture miaojinxing  ·  3Comments

stoneWeb picture stoneWeb  ·  3Comments