@@ -14,7 +14,7 @@ Find and replace all on all files (CMD+SHIFT+F):
14
14
[ ![ License] [ license-src ]] [ license-href ]
15
15
[ ![ Nuxt] [ nuxt-src ]] [ nuxt-href ]
16
16
17
- My new Nuxt module for doing amazing things.
17
+ [ Ant Design Vue ] ( https://www.antdv.com ) module for [ Nuxt ] ( https://nuxt.com/ )
18
18
19
19
- [ ✨   ; Release Notes] ( /CHANGELOG.md )
20
20
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
@@ -23,13 +23,13 @@ My new Nuxt module for doing amazing things.
23
23
## Features
24
24
25
25
<!-- Highlight some of the features your module provide here -->
26
- - ⛰   ; Foo
27
- - 🚠   ; Bar
28
- - 🌲   ; Baz
26
+ - ⛰   ; Automatically import components on demand.
27
+ - 🚠   ; Automatically import icons from [ @ ant-design/icons-vue ] ( https://github.com/ant-design/ant-design-icons/tree/master/packages/icons-vue ) .
28
+ - 🌲   ; Automatically import of message, notification and Modal methods.
29
29
30
30
## Quick Setup
31
31
32
- 1 . Add ` my-module ` dependency to your project
32
+ 1 . Add ` @ant-design-vue/nuxt ` dependency to your project
33
33
34
34
``` bash
35
35
# Using pnpm
@@ -48,11 +48,54 @@ npm install --save-dev @ant-design-vue/nuxt
48
48
export default defineNuxtConfig ({
49
49
modules: [
50
50
' @ant-design-vue/nuxt'
51
- ]
51
+ ],
52
+ antd: {
53
+ // Options
54
+ }
52
55
})
53
56
```
54
57
55
- That's it! You can now use My Module in your Nuxt app ✨
58
+ That's it! You can now use ant-design-vue in your Nuxt app ✨
59
+
60
+
61
+ ## Usage
62
+
63
+ ``` vue
64
+ <script lang="ts" setup>
65
+ const hanldeMessage = () => {
66
+ message.info("This is a normal message");
67
+ }
68
+ </script>
69
+ <template>
70
+ <a-button @click="hanldeMessage">
71
+ button
72
+ </a-button>
73
+ </template>
74
+ ```
75
+ Reference [ Nuxt documentation] ( https://nuxt.com/docs/guide/directory-structure/components ) and [ playground] ( ./playground/app.vue ) use.
76
+
77
+ ## Options
78
+
79
+ ### components
80
+
81
+ * Type: ` array `
82
+
83
+ If there are components that are not imported automatically from Ant Design Vue, you need to add the component name here.
84
+
85
+ e.g.` ['Button'] `
86
+
87
+ ### imports
88
+
89
+ * Type: ` array `
90
+
91
+ If you wish to add automatically import content from Element Plus, you can add it here.
92
+
93
+ ### icons
94
+
95
+ * Type: ` array `
96
+
97
+ If there are components that are not imported automatically from @ant-design/icons-vue , you need to add the component name here.
98
+
56
99
57
100
## Development
58
101
@@ -69,6 +112,9 @@ npm run dev
69
112
# Build the playground
70
113
npm run dev:build
71
114
115
+ # Build for production
116
+ npm run build
117
+
72
118
# Run ESLint
73
119
npm run lint
74
120
0 commit comments