根据官方文档https://pro.antdv.com/docs/getting-started,记录操作过程和遇到的问题
机器信息
# node
[~/xuejiao/tools/web/dj-and-pro-vue]node -v
v16.17.0
# os
[~/xuejiao/tools/web/dj-and-pro-vue]cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
下载代码
[~/xuejiao/tools/web/dj-and-pro-vue]git clone --depth=1 https://github.com/vueComponent/ant-design-vue-pro.git font
Cloning into 'front'...
remote: Enumerating objects: 346, done.
remote: Counting objects: 100% (346/346), done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 346 (delta 12), reused 308 (delta 12), pack-reused 0
Receiving objects: 100% (346/346), 418.36 KiB | 1.93 MiB/s, done.
Resolving deltas: 100% (12/12), done.
[~/xuejiao/tools/web/dj-and-pro-vue]ls
front
# 具体参考https://pro.antdv.com/docs/getting-started#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84
[~/xuejiao/tools/web/dj-and-pro-vue/front]tree -L 1
.
├── babel.config.js
├── commitlint.config.js
├── config
├── deploy
├── Dockerfile
├── docs
├── jest.config.js
├── jsconfig.json
├── LICENSE
├── package.json
├── pnpm-lock.yaml
├── postcss.config.js
├── public
├── README.md
├── README.zh-CN.md
├── src
├── tests
└── vue.config.js
安装依赖
需要自行安装依赖管理包管理工具yarn - https://www.npmjs.com/package/yarn
[~/xuejiao/tools/web/dj-and-pro-vue/front] yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning @ant-design-vue/pro-layout > omit.js > babel-runtime > core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning viser-vue > viser > @antv/g2 > core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning @vue/cli-service > cssnano > cssnano-preset-default > postcss-svgo > svgo > stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
warning babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @ant-design-vue/pro-layout@1.0.13" has unmet peer dependency "umi-request@^1.2.11".
warning " > @ant-design-vue/pro-layout@1.0.13" has unmet peer dependency "vue-container-query@^0.1.0".
warning "@vue/cli-service > @babel/helper-compilation-targets@7.19.1" has unmet peer dependency "@babel/core@^7.0.0".
warning " > @vue/cli-plugin-unit-jest@5.0.8" has unmet peer dependency "jest@^27.1.0".
warning " > eslint-plugin-vue@5.2.3" has incorrect peer dependency "eslint@^5.0.0".
warning "eslint-plugin-vue > vue-eslint-parser@5.0.0" has incorrect peer dependency "eslint@^5.0.0".
warning " > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > less-loader@5.0.0" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
[##################################################-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 9308/46494
启动
yarn run serve