这个项目是基于 Ant Design Pro 的 多 tab 版本.
-
官方不支持多 tab。
-
其他的实现的多 tab 侵入性很强,要改的地方很多。这个版本,把多 tab 封装成组件在 components/TabPages 下,直接在 BasicLayout 引入即可。其余的使用,例如打开新页面、替换当前页面都没有改变。
-
本多 tab 实现了右键菜单,包含刷新 tab、关闭其他页面的功能。
history.push({ state: { closed: true } });
history.replace('/a/b/c');
history.push({ pathname: '/a/b/c', state: { closed: true } });
Install node_modules
:
npm install
or
yarn
Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.
Scripts provided in package.json
. It's safe to modify or add additional script:
npm start
npm run build
npm run lint
You can also use script to auto fix some lint error:
npm run lint:fix
npm test
You can view full document on our official website. And welcome any feedback in our github.