yarn global add @vue/cli yarn global v1.22.17 [1/4] 🔍 Resolving packages... warning @vue/cli > @vue/cli-ui > apollo-server-express > subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md warning @vue/cli > @vue/cli-ui > apollo-server-express > apollo-server-core > subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md warning @vue/cli > @vue/cli-ui > apollo-server-express > apollo-server-core > apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details. warning @vue/cli > @vue/cli-ui > apollo-server-express > apollo-server-core > apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details warning @vue/cli > @vue/cli-ui > apollo-server-express > apollo-server-core > graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/ warning @vue/cli > @vue/cli-ui > apollo-server-express > graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead warning @vue/cli > @vue/cli-ui > apollo-server-express > apollo-server-core > graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead warning @vue/cli > @vue/cli-ui > apollo-server-express > graphql-tools > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning @vue/cli > vue-codemod > jscodeshift > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated warning @vue/cli > vue-codemod > jscodeshift > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning @vue/cli > vue-codemod > jscodeshift > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated warning @vue/cli > vue-codemod > jscodeshift > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Installed "@vue/cli@5.0.4" with binaries: - vue ✨ Done in 167.46s.
➜ antd-demo git:(master) ✗ yarn add ant-design-vue@1.7.6 yarn add v1.22.17 [1/4] 🔍 Resolving packages... info There appears to be trouble with your network connection. Retrying... warning ant-design-vue > babel-runtime > core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js. [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Saved lockfile. success Saved 39 new dependencies. info Direct dependencies └─ ant-design-vue@1.7.6 info All dependencies ├─ @ant-design/colors@3.2.2 ├─ @ant-design/icons-vue@2.0.0 ├─ @ant-design/icons@2.1.1 ├─ @simonwep/pickr@1.7.4 ├─ add-dom-event-listener@1.1.0 ├─ ant-design-vue@1.7.6 ├─ array-tree-filter@2.1.0 ├─ async-validator@3.5.2 ├─ babel-helper-vue-jsx-merge-props@2.0.3 ├─ babel-runtime@6.26.0 ├─ classnames@2.3.1 ├─ component-classes@1.2.6 ├─ component-indexof@0.0.3 ├─ dom-align@1.12.3 ├─ dom-closest@0.2.0 ├─ dom-matches@2.0.0 ├─ dom-scroll-into-view@2.0.1 ├─ enquire.js@2.1.6 ├─ intersperse@1.0.0 ├─ is-mobile@2.2.2 ├─ is-negative-zero@2.0.2 ├─ ismobilejs@1.1.1 ├─ json2mq@0.2.0 ├─ loose-envify@1.4.0 ├─ moment@2.29.3 ├─ mutationobserver-shim@0.3.7 ├─ nanopop@2.1.0 ├─ node-emoji@1.11.0 ├─ omit.js@1.0.2 ├─ performance-now@2.1.0 ├─ raf@3.4.1 ├─ regenerator-runtime@0.11.1 ├─ resize-observer-polyfill@1.5.1 ├─ shallow-equal@1.2.1 ├─ shallowequal@1.1.0 ├─ string-convert@0.2.1 ├─ tinycolor2@1.4.2 ├─ vue-ref@2.0.0 └─ warning@4.0.3 ✨ Done in 50.41s.
引入 antd
在 vue 项目的 main.js 中,增加引入 antd 的代码。
1 2 3 4 5 6 7 8 9 10 11 12 13
import Vue from 'vue' import App from './App.vue' + import Antd from 'ant-design-vue' + import 'ant-design-vue/dist/antd.css'