umi+dva+antd新建項目

首先全局安裝dva+umi
umi:npm install -g umi
dva:npm install -g dva-cli

html

經過腳手架建立項目typescript

一:
mkdir myapp && cd myapp

二:
npm create umi

三:
? Select the boilerplate type (Use arrow keys)
  ant-design-pro  - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
❯ app             - Create project with a simple boilerplate, support typescript.
  block           - Create a umi block.
  library         - Create a library with umi.
  plugin          - Create a umi plugin.

四:
? Do you want to use typescript? (y/N)

五:
? What functionality do you want to enable? (Press <space> to select, <a> to toggle all, <i> to invert selection)
❯◯ antd
 ◯ dva
 ◯ code splitting
 ◯ dll

地五步的時候選擇antd和dva便可 npm

參考umi官網文檔(https://umijs.org/zh/guide/create-umi-app.html#%E4%BB%8B%E7%BB%8D-create-umi)antd

具體用法能夠查看官方文檔app

相關文章
相關標籤/搜索