introduce.en-US.ac2971ec.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. import{_ as e,a as t,n as s,k as a}from"./index.c1b9962e.js";const o={pageData:{title:"Ant Design of Vue",description:"",frontmatter:{},headers:[{level:2,title:"Features",slug:"features",content:""},{level:2,title:"Environment Support",slug:"environment-support",content:""},{level:2,title:"Version",slug:"version",content:""},{level:2,title:"Installation",slug:"installation",content:"Using npm or yarn"},{level:3,title:"Using npm or yarn",slug:"using-npm-or-yarn",content:"**We recommend using npm or yarn to install**\uFF0Cit not only makes development easier\uFF0Cbut also allow you to take advantage of the rich ecosystem of Javascript packages and tooling."},{level:3,title:"Import in Browser",slug:"import-in-browser",content:"Add `script` and `link` tags in your browser and use the global variable `antd`."},{level:2,title:"Usage",slug:"usage",content:""},{level:3,title:"Use modularized antd",slug:"use-modularized-antd",content:""}],relativePath:"src/vueDocs/introduce.en-US.md",content:`# Ant Design of Vue
  2. Following the Ant Design specification, we developed a Vue UI library \`antd\` that contains a set of high quality components and demos for building rich, interactive user interfaces.
  3. <div class="pic-plus">
  4. <img width="150" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" />
  5. <span>+</span>
  6. <img width="160" src="https://qn.antdv.com/vue.png" />
  7. </div>
  8. <style>
  9. .pic-plus > * {
  10. display: inline-block !important;
  11. vertical-align: middle;
  12. }
  13. .pic-plus span {
  14. font-size: 30px;
  15. color: #aaa;
  16. margin: 0 20px;
  17. }
  18. </style>
  19. ## Features
  20. - An enterprise-class UI design language for web applications.
  21. - A set of high-quality Vue components out of the box.
  22. - Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
  23. ## Environment Support
  24. - Modern browsers. You can use [1.x](https://1x.antdv.com/) for IE9+.
  25. - Server-side Rendering
  26. - [Electron](https://electronjs.org/)
  27. | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Electron |
  28. | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  29. |Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
  30. ## Version
  31. - Stable: [![npm package](https://img.shields.io/npm/v/ant-design-vue/next.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue)
  32. You can subscribe to this feed for new version notifications: https://github.com/vueComponent/ant-design-vue/releases.atom
  33. ## Installation
  34. ### Using npm or yarn
  35. **We recommend using npm or yarn to install**\uFF0Cit not only makes development easier\uFF0Cbut also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
  36. \`\`\`bash
  37. $ npm install ant-design-vue@next --save
  38. \`\`\`
  39. \`\`\`bash
  40. $ yarn add ant-design-vue@next
  41. \`\`\`
  42. If you are in a bad network environment\uFF0Cyou can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
  43. ### Import in Browser
  44. Add \`script\` and \`link\` tags in your browser and use the global variable \`antd\`.
  45. We provide \`antd.js\` \`antd.css\` and \`antd.min.js\` \`antd.min.css\` under \`ant-design-vue/dist\` in antd's npm package. You can also download these files directly from [![jsdelivr](https://data.jsdelivr.com/v1/package/npm/ant-design-vue/badge)](https://www.jsdelivr.com/package/npm/ant-design-vue) or [unpkg](https://unpkg.com/ant-design-vue/dist/).
  46. > **We strongly discourage loading the entire files** this will add bloat to your application and make it more difficult to receive bugfixes and updates. Antd is intended to be used in conjunction with a build tool, such as [webpack](https://webpack.github.io/), which will make it easy to import only the parts of antd that you are using.
  47. > Note: you should import moment before using antd.js.
  48. ## Usage
  49. \`\`\`jsx
  50. import { DatePicker } from "ant-design-vue";
  51. app.use(DatePicker);
  52. \`\`\`
  53. And import stylesheets manually:
  54. \`\`\`jsx
  55. import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
  56. \`\`\`
  57. ### Use modularized antd
  58. - Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
  59. \`\`\`jsx
  60. // .babelrc or babel-loader option
  61. {
  62. "plugins": [
  63. ["import", { "libraryName": "ant-design-vue", "libraryDirectory": "es", "style": "css" }] // \`style: true\` for less
  64. ]
  65. }
  66. \`\`\`
  67. > Note: Don't set \`libraryDirectory\` if you are using webpack 1.
  68. This allows you to import components from antd without having to manually import the corresponding stylesheet. The antd babel plugin will automatically import stylesheets.
  69. \`\`\`jsx
  70. // import js and css modularly, parsed by babel-plugin-import
  71. import { DatePicker } from "ant-design-vue";
  72. \`\`\`
  73. - Manually import
  74. \`\`\`jsx
  75. import DatePicker from "ant-design-vue/lib/date-picker"; // for js
  76. import "ant-design-vue/lib/date-picker/style/css"; // for css
  77. // import 'ant-design-vue/lib/date-picker/style'; // that will import less
  78. \`\`\`
  79. - For Vite
  80. \`\`\`js
  81. // vite.config.js
  82. import ViteComponents, { AntDesignVueResolver } from 'vite-plugin-components';
  83. export default {
  84. plugins: [
  85. /* ... */
  86. ViteComponents({
  87. customComponentResolvers: [AntDesignVueResolver()],
  88. }),
  89. ],
  90. };
  91. \`\`\`
  92. ## Links
  93. - [Home Page](https://www.antdv.com/)
  94. - [Ant Design Of React](https://ant.design/)
  95. - [Components](https://www.antdv.com/docs/vue/introduce)
  96. - [Change Log](/docs/vue/changelog)
  97. - [CodeSandbox template](https://codesandbox.io/s/agitated-franklin-1w72v) for bug reports
  98. - [Customize Theme](/docs/vue/customize-theme)
  99. - [FAQ](/docs/vue/faq)
  100. - [Support US](/docs/vue/sponsor)
  101. - [Awesome Ant Design](https://github.com/vueComponent/ant-design-vue-awesome)
  102. ## Contributing
  103. If you'd like to help us improve antd, just create a [Pull Request](https://github.com/vueComponent/ant-design-vue/pulls). Feel free to report bugs and issues [here](https://vuecomponent.github.io/issue-helper/).
  104. > If you're new to posting issues, we ask that you read [_How To Ask Questions The Smart Way_](http://www.catb.org/~esr/faqs/smart-questions.html) and [How to Ask a Question in Open Source Community](https://github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) prior to posting. Well written bug reports help us help you!
  105. ## About ant-design-vue
  106. As we all know, Ant Design, as a design language, has gone through many years of iteration and accumulation. Its UI design ideas have become a set of de facto standards and are sought after and loved by many front-end developers and enterprises, and it is also a magic weapon in the hands of React developers. I hope that ant-design-vue will allow Vue developers to enjoy the excellent design of Ant Design.
  107. The ant-design-vue is the Vue implementation of Ant Design. The style of the component is kept in sync with Ant Design. The html structure and css style of the component are also consistent. The style 0 modification is really achieved, and the component API is kept as consistent as possible.
  108. Ant Design Vue is committed to providing programmers with a ** pleasant ** development experience.
  109. ## THANK YOU
  110. [Ant Design Team](https://github.com/ant-design/ant-design/blob/master/AUTHORS.txt)
  111. `,html:`<h1 id="ant-design-of-vue">Ant Design of Vue</h1>
  112. <p>Following the Ant Design specification, we developed a Vue UI library <code>antd</code> that contains a set of high quality components and demos for building rich, interactive user interfaces.</p>
  113. <div class="pic-plus">
  114. <img width="150" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" />
  115. <span>+</span>
  116. <img width="160" src="https://qn.antdv.com/vue.png" />
  117. </div>
  118. <h2 id="features">Features</h2>
  119. <ul>
  120. <li>An enterprise-class UI design language for web applications.</li>
  121. <li>A set of high-quality Vue components out of the box.</li>
  122. <li>Shared <a href="https://ant.design/docs/spec/introduce" target="_blank" rel="noopener noreferrer">Ant Design of React</a> design resources.</li>
  123. </ul>
  124. <h2 id="environment-support">Environment Support</h2>
  125. <ul>
  126. <li>Modern browsers. You can use <a href="https://1x.antdv.com/" target="_blank" rel="noopener noreferrer">1.x</a> for IE9+.</li>
  127. <li>Server-side Rendering</li>
  128. <li><a href="https://electronjs.org/" target="_blank" rel="noopener noreferrer">Electron</a></li>
  129. </ul>
  130. <table>
  131. <thead>
  132. <tr>
  133. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" /></a><br/> Edge</th>
  134. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /></a><br/>Firefox</th>
  135. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /></a><br/>Chrome</th>
  136. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /></a><br/>Safari</th>
  137. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /></a><br/>Opera</th>
  138. <th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" /></a><br/>Electron</th>
  139. </tr>
  140. </thead>
  141. <tbody>
  142. <tr>
  143. <td>Edge</td>
  144. <td>last 2 versions</td>
  145. <td>last 2 versions</td>
  146. <td>last 2 versions</td>
  147. <td>last 2 versions</td>
  148. <td>last 2 versions</td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <h2 id="version">Version</h2>
  153. <ul>
  154. <li>Stable: <a href="https://www.npmjs.org/package/ant-design-vue" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/v/ant-design-vue/next.svg?style=flat-square" alt="npm package"></a></li>
  155. </ul>
  156. <p>You can subscribe to this feed for new version notifications: <a href="https://github.com/vueComponent/ant-design-vue/releases.atom" target="_blank" rel="noopener noreferrer">https://github.com/vueComponent/ant-design-vue/releases.atom</a></p>
  157. <h2 id="installation">Installation</h2>
  158. <h3 id="using-npm-or-yarn">Using npm or yarn</h3>
  159. <p><strong>We recommend using npm or yarn to install</strong>\uFF0Cit not only makes development easier\uFF0Cbut also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.</p>
  160. <pre class="language-bash" v-pre><code>$ <span class="token function">npm</span> <span class="token function">install</span> ant-design-vue@next <span class="token parameter variable">--save</span>
  161. </code></pre>
  162. <pre class="language-bash" v-pre><code>$ <span class="token function">yarn</span> <span class="token function">add</span> ant-design-vue@next
  163. </code></pre>
  164. <p>If you are in a bad network environment\uFF0Cyou can try other registries and tools like <a href="https://github.com/cnpm/cnpm" target="_blank" rel="noopener noreferrer">cnpm</a>.</p>
  165. <h3 id="import-in-browser">Import in Browser</h3>
  166. <p>Add <code>script</code> and <code>link</code> tags in your browser and use the global variable <code>antd</code>.</p>
  167. <p>We provide <code>antd.js</code> <code>antd.css</code> and <code>antd.min.js</code> <code>antd.min.css</code> under <code>ant-design-vue/dist</code> in antd's npm package. You can also download these files directly from <a href="https://www.jsdelivr.com/package/npm/ant-design-vue" target="_blank" rel="noopener noreferrer"><img src="https://data.jsdelivr.com/v1/package/npm/ant-design-vue/badge" alt="jsdelivr"></a> or <a href="https://unpkg.com/ant-design-vue/dist/" target="_blank" rel="noopener noreferrer">unpkg</a>.</p>
  168. <blockquote>
  169. <p><strong>We strongly discourage loading the entire files</strong> this will add bloat to your application and make it more difficult to receive bugfixes and updates. Antd is intended to be used in conjunction with a build tool, such as <a href="https://webpack.github.io/" target="_blank" rel="noopener noreferrer">webpack</a>, which will make it easy to import only the parts of antd that you are using.</p>
  170. </blockquote>
  171. <blockquote>
  172. <p>Note: you should import moment before using antd.js.</p>
  173. </blockquote>
  174. <h2 id="usage">Usage</h2>
  175. <pre class="language-jsx" v-pre><code><span class="token keyword">import</span> <span class="token punctuation">{</span> DatePicker <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">"ant-design-vue"</span><span class="token punctuation">;</span>
  176. app<span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>DatePicker<span class="token punctuation">)</span><span class="token punctuation">;</span>
  177. </code></pre>
  178. <p>And import stylesheets manually:</p>
  179. <pre class="language-jsx" v-pre><code><span class="token keyword">import</span> <span class="token string">"ant-design-vue/dist/antd.css"</span><span class="token punctuation">;</span> <span class="token comment">// or 'ant-design-vue/dist/antd.less'</span>
  180. </code></pre>
  181. <h3 id="use-modularized-antd">Use modularized antd</h3>
  182. <ul>
  183. <li>
  184. <p>Use <a href="https://github.com/ant-design/babel-plugin-import" target="_blank" rel="noopener noreferrer">babel-plugin-import</a> (Recommended)</p>
  185. <pre class="language-jsx" v-pre><code><span class="token comment">// .babelrc or babel-loader option</span>
  186. <span class="token punctuation">{</span>
  187. <span class="token string-property property">"plugins"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
  188. <span class="token punctuation">[</span><span class="token string">"import"</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token string-property property">"libraryName"</span><span class="token operator">:</span> <span class="token string">"ant-design-vue"</span><span class="token punctuation">,</span> <span class="token string-property property">"libraryDirectory"</span><span class="token operator">:</span> <span class="token string">"es"</span><span class="token punctuation">,</span> <span class="token string-property property">"style"</span><span class="token operator">:</span> <span class="token string">"css"</span> <span class="token punctuation">}</span><span class="token punctuation">]</span> <span class="token comment">// \`style: true\` for less</span>
  189. <span class="token punctuation">]</span>
  190. <span class="token punctuation">}</span>
  191. </code></pre>
  192. <blockquote>
  193. <p>Note: Don't set <code>libraryDirectory</code> if you are using webpack 1.</p>
  194. </blockquote>
  195. <p>This allows you to import components from antd without having to manually import the corresponding stylesheet. The antd babel plugin will automatically import stylesheets.</p>
  196. <pre class="language-jsx" v-pre><code><span class="token comment">// import js and css modularly, parsed by babel-plugin-import</span>
  197. <span class="token keyword">import</span> <span class="token punctuation">{</span> DatePicker <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">"ant-design-vue"</span><span class="token punctuation">;</span>
  198. </code></pre>
  199. </li>
  200. <li>
  201. <p>Manually import</p>
  202. <pre class="language-jsx" v-pre><code><span class="token keyword">import</span> DatePicker <span class="token keyword">from</span> <span class="token string">"ant-design-vue/lib/date-picker"</span><span class="token punctuation">;</span> <span class="token comment">// for js</span>
  203. <span class="token keyword">import</span> <span class="token string">"ant-design-vue/lib/date-picker/style/css"</span><span class="token punctuation">;</span> <span class="token comment">// for css</span>
  204. <span class="token comment">// import 'ant-design-vue/lib/date-picker/style'; // that will import less</span>
  205. </code></pre>
  206. </li>
  207. <li>
  208. <p>For Vite</p>
  209. <pre class="language-js" v-pre><code><span class="token comment">// vite.config.js</span>
  210. <span class="token keyword">import</span> ViteComponents<span class="token punctuation">,</span> <span class="token punctuation">{</span> AntDesignVueResolver <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'vite-plugin-components'</span><span class="token punctuation">;</span>
  211. <span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  212. <span class="token literal-property property">plugins</span><span class="token operator">:</span> <span class="token punctuation">[</span>
  213. <span class="token comment">/* ... */</span>
  214. <span class="token function">ViteComponents</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  215. <span class="token literal-property property">customComponentResolvers</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token function">AntDesignVueResolver</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
  216. <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
  217. <span class="token punctuation">]</span><span class="token punctuation">,</span>
  218. <span class="token punctuation">}</span><span class="token punctuation">;</span>
  219. </code></pre>
  220. </li>
  221. </ul>
  222. <pre class="language-" v-pre><code>
  223. ## Links
  224. - [Home Page](https://www.antdv.com/)
  225. - [Ant Design Of React](https://ant.design/)
  226. - [Components](https://www.antdv.com/docs/vue/introduce)
  227. - [Change Log](/docs/vue/changelog)
  228. - [CodeSandbox template](https://codesandbox.io/s/agitated-franklin-1w72v) for bug reports
  229. - [Customize Theme](/docs/vue/customize-theme)
  230. - [FAQ](/docs/vue/faq)
  231. - [Support US](/docs/vue/sponsor)
  232. - [Awesome Ant Design](https://github.com/vueComponent/ant-design-vue-awesome)
  233. ## Contributing
  234. If you&#39;d like to help us improve antd, just create a [Pull Request](https://github.com/vueComponent/ant-design-vue/pulls). Feel free to report bugs and issues [here](https://vuecomponent.github.io/issue-helper/).
  235. &gt; If you&#39;re new to posting issues, we ask that you read [_How To Ask Questions The Smart Way_](http://www.catb.org/~esr/faqs/smart-questions.html) and [How to Ask a Question in Open Source Community](https://github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) prior to posting. Well written bug reports help us help you!
  236. ## About ant-design-vue
  237. As we all know, Ant Design, as a design language, has gone through many years of iteration and accumulation. Its UI design ideas have become a set of de facto standards and are sought after and loved by many front-end developers and enterprises, and it is also a magic weapon in the hands of React developers. I hope that ant-design-vue will allow Vue developers to enjoy the excellent design of Ant Design.
  238. The ant-design-vue is the Vue implementation of Ant Design. The style of the component is kept in sync with Ant Design. The html structure and css style of the component are also consistent. The style 0 modification is really achieved, and the component API is kept as consistent as possible.
  239. Ant Design Vue is committed to providing programmers with a ** pleasant ** development experience.
  240. ## THANK YOU
  241. [Ant Design Team](https://github.com/ant-design/ant-design/blob/master/AUTHORS.txt)
  242. </code></pre>
  243. `,lastUpdated:1748059052829}},r={class:"markdown"};function p(i,n,l,c,u,d){return a(),t("article",r,n[0]||(n[0]=[s(`<h1 id="ant-design-of-vue">Ant Design of Vue</h1><p>Following the Ant Design specification, we developed a Vue UI library <code>antd</code> that contains a set of high quality components and demos for building rich, interactive user interfaces.</p><div class="pic-plus"><img width="150" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"><span>+</span><img width="160" src="https://qn.antdv.com/vue.png"></div><h2 id="features">Features</h2><ul><li>An enterprise-class UI design language for web applications.</li><li>A set of high-quality Vue components out of the box.</li><li>Shared <a href="https://ant.design/docs/spec/introduce" target="_blank" rel="noopener noreferrer">Ant Design of React</a> design resources.</li></ul><h2 id="environment-support">Environment Support</h2><ul><li>Modern browsers. You can use <a href="https://1x.antdv.com/" target="_blank" rel="noopener noreferrer">1.x</a> for IE9+.</li><li>Server-side Rendering</li><li><a href="https://electronjs.org/" target="_blank" rel="noopener noreferrer">Electron</a></li></ul><table><thead><tr><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px"></a><br> Edge</th><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px"></a><br>Firefox</th><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px"></a><br>Chrome</th><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px"></a><br>Safari</th><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px"></a><br>Opera</th><th><a href="http://godban.github.io/browsers-support-badges/" target="_blank" rel="noopener noreferrer"><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px"></a><br>Electron</th></tr></thead><tbody><tr><td>Edge</td><td>last 2 versions</td><td>last 2 versions</td><td>last 2 versions</td><td>last 2 versions</td><td>last 2 versions</td></tr></tbody></table><h2 id="version">Version</h2><ul><li>Stable: <a href="https://www.npmjs.org/package/ant-design-vue" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/v/ant-design-vue/next.svg?style=flat-square" alt="npm package"></a></li></ul><p>You can subscribe to this feed for new version notifications: <a href="https://github.com/vueComponent/ant-design-vue/releases.atom" target="_blank" rel="noopener noreferrer">https://github.com/vueComponent/ant-design-vue/releases.atom</a></p><h2 id="installation">Installation</h2><h3 id="using-npm-or-yarn">Using npm or yarn</h3><p><strong>We recommend using npm or yarn to install</strong>\uFF0Cit not only makes development easier\uFF0Cbut also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.</p><pre class="language-bash"><code>$ <span class="token function">npm</span> <span class="token function">install</span> ant-design-vue@next <span class="token parameter variable">--save</span>
  244. </code></pre><pre class="language-bash"><code>$ <span class="token function">yarn</span> <span class="token function">add</span> ant-design-vue@next
  245. </code></pre><p>If you are in a bad network environment\uFF0Cyou can try other registries and tools like <a href="https://github.com/cnpm/cnpm" target="_blank" rel="noopener noreferrer">cnpm</a>.</p><h3 id="import-in-browser">Import in Browser</h3><p>Add <code>script</code> and <code>link</code> tags in your browser and use the global variable <code>antd</code>.</p><p>We provide <code>antd.js</code> <code>antd.css</code> and <code>antd.min.js</code> <code>antd.min.css</code> under <code>ant-design-vue/dist</code> in antd&#39;s npm package. You can also download these files directly from <a href="https://www.jsdelivr.com/package/npm/ant-design-vue" target="_blank" rel="noopener noreferrer"><img src="https://data.jsdelivr.com/v1/package/npm/ant-design-vue/badge" alt="jsdelivr"></a> or <a href="https://unpkg.com/ant-design-vue/dist/" target="_blank" rel="noopener noreferrer">unpkg</a>.</p><blockquote><p><strong>We strongly discourage loading the entire files</strong> this will add bloat to your application and make it more difficult to receive bugfixes and updates. Antd is intended to be used in conjunction with a build tool, such as <a href="https://webpack.github.io/" target="_blank" rel="noopener noreferrer">webpack</a>, which will make it easy to import only the parts of antd that you are using.</p></blockquote><blockquote><p>Note: you should import moment before using antd.js.</p></blockquote><h2 id="usage">Usage</h2><pre class="language-jsx"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> DatePicker <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;ant-design-vue&quot;</span><span class="token punctuation">;</span>
  246. app<span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span>DatePicker<span class="token punctuation">)</span><span class="token punctuation">;</span>
  247. </code></pre><p>And import stylesheets manually:</p><pre class="language-jsx"><code><span class="token keyword">import</span> <span class="token string">&quot;ant-design-vue/dist/antd.css&quot;</span><span class="token punctuation">;</span> <span class="token comment">// or &#39;ant-design-vue/dist/antd.less&#39;</span>
  248. </code></pre><h3 id="use-modularized-antd">Use modularized antd</h3><ul><li><p>Use <a href="https://github.com/ant-design/babel-plugin-import" target="_blank" rel="noopener noreferrer">babel-plugin-import</a> (Recommended)</p><pre class="language-jsx"><code><span class="token comment">// .babelrc or babel-loader option</span>
  249. <span class="token punctuation">{</span>
  250. <span class="token string-property property">&quot;plugins&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
  251. <span class="token punctuation">[</span><span class="token string">&quot;import&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token string-property property">&quot;libraryName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ant-design-vue&quot;</span><span class="token punctuation">,</span> <span class="token string-property property">&quot;libraryDirectory&quot;</span><span class="token operator">:</span> <span class="token string">&quot;es&quot;</span><span class="token punctuation">,</span> <span class="token string-property property">&quot;style&quot;</span><span class="token operator">:</span> <span class="token string">&quot;css&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">]</span> <span class="token comment">// \`style: true\` for less</span>
  252. <span class="token punctuation">]</span>
  253. <span class="token punctuation">}</span>
  254. </code></pre><blockquote><p>Note: Don&#39;t set <code>libraryDirectory</code> if you are using webpack 1.</p></blockquote><p>This allows you to import components from antd without having to manually import the corresponding stylesheet. The antd babel plugin will automatically import stylesheets.</p><pre class="language-jsx"><code><span class="token comment">// import js and css modularly, parsed by babel-plugin-import</span>
  255. <span class="token keyword">import</span> <span class="token punctuation">{</span> DatePicker <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;ant-design-vue&quot;</span><span class="token punctuation">;</span>
  256. </code></pre></li><li><p>Manually import</p><pre class="language-jsx"><code><span class="token keyword">import</span> DatePicker <span class="token keyword">from</span> <span class="token string">&quot;ant-design-vue/lib/date-picker&quot;</span><span class="token punctuation">;</span> <span class="token comment">// for js</span>
  257. <span class="token keyword">import</span> <span class="token string">&quot;ant-design-vue/lib/date-picker/style/css&quot;</span><span class="token punctuation">;</span> <span class="token comment">// for css</span>
  258. <span class="token comment">// import &#39;ant-design-vue/lib/date-picker/style&#39;; // that will import less</span>
  259. </code></pre></li><li><p>For Vite</p><pre class="language-js"><code><span class="token comment">// vite.config.js</span>
  260. <span class="token keyword">import</span> ViteComponents<span class="token punctuation">,</span> <span class="token punctuation">{</span> AntDesignVueResolver <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&#39;vite-plugin-components&#39;</span><span class="token punctuation">;</span>
  261. <span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  262. <span class="token literal-property property">plugins</span><span class="token operator">:</span> <span class="token punctuation">[</span>
  263. <span class="token comment">/* ... */</span>
  264. <span class="token function">ViteComponents</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  265. <span class="token literal-property property">customComponentResolvers</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token function">AntDesignVueResolver</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
  266. <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
  267. <span class="token punctuation">]</span><span class="token punctuation">,</span>
  268. <span class="token punctuation">}</span><span class="token punctuation">;</span>
  269. </code></pre></li></ul><pre class="language-"><code>
  270. ## Links
  271. - [Home Page](https://www.antdv.com/)
  272. - [Ant Design Of React](https://ant.design/)
  273. - [Components](https://www.antdv.com/docs/vue/introduce)
  274. - [Change Log](/docs/vue/changelog)
  275. - [CodeSandbox template](https://codesandbox.io/s/agitated-franklin-1w72v) for bug reports
  276. - [Customize Theme](/docs/vue/customize-theme)
  277. - [FAQ](/docs/vue/faq)
  278. - [Support US](/docs/vue/sponsor)
  279. - [Awesome Ant Design](https://github.com/vueComponent/ant-design-vue-awesome)
  280. ## Contributing
  281. If you&#39;d like to help us improve antd, just create a [Pull Request](https://github.com/vueComponent/ant-design-vue/pulls). Feel free to report bugs and issues [here](https://vuecomponent.github.io/issue-helper/).
  282. &gt; If you&#39;re new to posting issues, we ask that you read [_How To Ask Questions The Smart Way_](http://www.catb.org/~esr/faqs/smart-questions.html) and [How to Ask a Question in Open Source Community](https://github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) prior to posting. Well written bug reports help us help you!
  283. ## About ant-design-vue
  284. As we all know, Ant Design, as a design language, has gone through many years of iteration and accumulation. Its UI design ideas have become a set of de facto standards and are sought after and loved by many front-end developers and enterprises, and it is also a magic weapon in the hands of React developers. I hope that ant-design-vue will allow Vue developers to enjoy the excellent design of Ant Design.
  285. The ant-design-vue is the Vue implementation of Ant Design. The style of the component is kept in sync with Ant Design. The html structure and css style of the component are also consistent. The style 0 modification is really achieved, and the component API is kept as consistent as possible.
  286. Ant Design Vue is committed to providing programmers with a ** pleasant ** development experience.
  287. ## THANK YOU
  288. [Ant Design Team](https://github.com/ant-design/ant-design/blob/master/AUTHORS.txt)
  289. </code></pre>`,29)]))}var h=e(o,[["render",p]]);export{h as default};