Comments (14)
遇到一样的问题
from antd-admin.
依次檢查:
src/index.js
有沒有已經定義了該model(即app.model()
)src/models
文件夾下的文件的namespace
是否重複定義
from antd-admin.
检查了这两项,都没有问题。
会不会是路由跳转的时候,由于又require了一次model,导致namespace
又定义一遍,所以重复了?
from antd-admin.
不會啊,第一次跳轉到該路由時,僅加載一次該組件的js,此時是第一次require該組件的model,整個項目衹會require一次model/markets
試試注釋該路由,會不會報錯
方便的話,提交到你的分支,我幫你檢查一下
from antd-admin.
我刚下载了这个分支上的代码,不加任何改动就会报错。
你试一下,先跳到【仪表盘】,再跳到【用户管理】,再又跳回到【仪表盘】,就会报错。
应该就是第二次跳某个带model的路由时,就会报app.model: namespace should be unique。
from antd-admin.
這兩天出去玩了,沒帶電腦😅
我這邊暫時不能復現
from antd-admin.
出现同样问题了
from antd-admin.
@taven-liu能看一下你的新增代码吗
from antd-admin.
{ path: 't1', name: 't1', getComponent (nextState, cb) { require.ensure([], require => { app.model(require('./modules/aTest/models/t1')) cb(null, {component: require('./modules/aTest/containers/t1Container')}) }) } },
from antd-admin.
from antd-admin.
可能是dva版本的原因,暂时先把dva 切换到 1.1 版本吧,后面我解决一下
from antd-admin.
已解决 ff2005d
from antd-admin.
dvajs/dva#533 官方针对1.2的解决办法,最好还是搞下吧,要不升级到1.2后还会有问题
from antd-admin.
@xiaosansiji ,现在升级没问题了啊,ff2005d
from antd-admin.
Related Issues (20)
- Change proxy HOT 1
- Failed to load resource: the server responded with a status of 404 (Not Found) 开发环境是正常的,打包后浏览器打开出问题 HOT 3
- 自己写登录接口 HOT 1
- 强强
- 能否提供个typescript版的 HOT 1
- 切换菜单时报错
- 项目启动时报 [ERR_ASSERTION]: filePath not found of antd/lib/locale-provider/pt_BR
- 启动直接报错,我的node版本是18.12.1 HOT 3
- 有没有项目说明文档 HOT 2
- 打开之后无法加载页面 HOT 2
- 111
- Select tag mode bug HOT 1
- npm run start doesn't work HOT 5
- macbook中出现Assertion Error,无法npm run start HOT 3
- develop分支,修改主题色无效 HOT 2
- Proxy 问题 HOT 11
- 技术问题,怎么实现受控表单 HOT 2
- Demo Prevew version diffirence git clone version? HOT 2
- pageing not working HOT 1
- graphgl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antd-admin.