From 7439e98c17c2e7397aa5ecfdde806d750fad45e2 Mon Sep 17 00:00:00 2001
From: markthree <1801982702@qq.com>
Date: Wed, 10 Jan 2024 13:05:33 +0800
Subject: [PATCH 01/25] feat: add extractStyle
---
README.md | 24 +++-
playground/app.vue | 144 ++++++++++++-----------
src/config.ts | 3 +-
src/module.ts | 26 +++-
src/runtime/components/AExtractStyle.vue | 21 ++++
src/types.ts | 1 +
6 files changed, 143 insertions(+), 76 deletions(-)
create mode 100644 src/runtime/components/AExtractStyle.vue
diff --git a/README.md b/README.md
index 8c4f5ab..c7763c7 100644
--- a/README.md
+++ b/README.md
@@ -69,9 +69,11 @@ const handleMessage = () => {
}
-
- button
-
+
+
+ button
+
+
```
Reference [Nuxt documentation](https://nuxt.com/docs/guide/directory-structure/components) and [playground](./playground/app.vue) use.
@@ -99,6 +101,22 @@ If you wish to add automatically import content from Ant Design Vue, you can add
If there are components that are not imported automatically from @ant-design/icons-vue, you need to add the component name here.
+### extractStyle
+
+* Type: `boolean`
+
+Extract css on demand, start by default
+
+```vue
+
+
+
+
+
+
+```
+
+
## Development
```bash
diff --git a/playground/app.vue b/playground/app.vue
index cff7394..4cf6286 100644
--- a/playground/app.vue
+++ b/playground/app.vue
@@ -1,81 +1,83 @@
-
-
-
+
+
+
+
+
+
+ dark
+
+
+ light
+
+
+
+
+
+
-
- dark
+
+ message success
-
- light
+
+ message info
-
-
-
-
-
-
- message success
-
-
- message info
-
-
-
-
- modal success
-
-
- modal info
-
-
-
-
+
+ modal success
+
+
+ modal info
+
+
+
+
+ notification success
+
+
+ notification info
+
+
+
- notification success
-
-
- notification info
-
-
-
-
-
- horizontal
-
-
- vertical
-
-
-
-
+
+
+ horizontal
+
+
+ vertical
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/types.ts b/src/types.ts
index a6eea6c..a6f3d54 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -5,6 +5,7 @@ export interface Options {
icons: false | PresetImport[]
components: false | PresetImport[]
imports: PresetImport[]
+ extractStyle: boolean
}
From 48db824c47d77b27f0173a42e9f010f145697d2c Mon Sep 17 00:00:00 2001
From: markthree <1801982702@qq.com>
Date: Wed, 10 Jan 2024 14:09:52 +0800
Subject: [PATCH 02/25] fix!(extractStyle): close by default
---
README.md | 14 +++++++-------
playground/nuxt.config.ts | 4 +++-
src/config.ts | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index c7763c7..6a37e88 100644
--- a/README.md
+++ b/README.md
@@ -69,11 +69,9 @@ const handleMessage = () => {
}
-
-
- button
-
-
+
+ button
+
```
Reference [Nuxt documentation](https://nuxt.com/docs/guide/directory-structure/components) and [playground](./playground/app.vue) use.
@@ -105,10 +103,12 @@ If there are components that are not imported automatically from @ant-design/ico
* Type: `boolean`
-Extract css on demand, start by default
+> Solve page css flicker problem
+
+Extracts and injects css on demand, defaults to false
```vue
-
+
diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts
index 35f738f..f933af1 100644
--- a/playground/nuxt.config.ts
+++ b/playground/nuxt.config.ts
@@ -1,6 +1,8 @@
export default defineNuxtConfig({
modules: ['../src/module'],
- antd: {},
+ antd: {
+ extractStyle: true
+ },
imports:{
autoImport:true
},
diff --git a/src/config.ts b/src/config.ts
index cea1686..1b13b34 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -15,5 +15,5 @@ export const defaults:Options = {
components: allComponents,
icons: allIcons,
imports: allImports,
- extractStyle: true
+ extractStyle: false
}
From 314ef40a9025537f1739da4c27ff1d8829c62037 Mon Sep 17 00:00:00 2001
From: aibayanyu20
Date: Thu, 28 Dec 2023 20:28:54 +0800
Subject: [PATCH 03/25] chore(release): v1.3.0
---
CHANGELOG.md | 26 ++++++++++++++++++++++++++
package.json | 4 ++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9e0c34..4cffea0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,31 @@
# Changelog
+## v1.3.0
+
+[compare changes](https://github.com/vueComponent/ant-design-vue-nuxt/compare/v1.1.2...v1.3.0)
+
+### 🚀 Enhancements
+
+- Add flex component ([da86291](https://github.com/vueComponent/ant-design-vue-nuxt/commit/da86291))
+
+### 🩹 Fixes
+
+- Fix typo ([aebf62e](https://github.com/vueComponent/ant-design-vue-nuxt/commit/aebf62e))
+
+### 🏡 Chore
+
+- **release:** V1.2.0 ([30d89ec](https://github.com/vueComponent/ant-design-vue-nuxt/commit/30d89ec))
+- Test bundler module resolution ([bc5c5cf](https://github.com/vueComponent/ant-design-vue-nuxt/commit/bc5c5cf))
+
+### 🤖 CI
+
+- Eslint format ([7c43723](https://github.com/vueComponent/ant-design-vue-nuxt/commit/7c43723))
+
+### ❤️ Contributors
+
+- Aibayanyu20
+- Daniel Roe
+
## v1.2.0
[compare changes](https://github.com/vueComponent/ant-design-vue-nuxt/compare/v1.1.2...v1.2.0)
diff --git a/package.json b/package.json
index 5f46a39..b5e50b9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@ant-design-vue/nuxt",
- "version": "1.2.0",
+ "version": "1.3.0",
"description": "ant-design-vue-nuxt module",
"repository": "vueComponent/ant-design-vue-nuxt",
"license": "MIT",
@@ -52,4 +52,4 @@
"ant-design-vue": "^4.0.8",
"typescript": "5.1.6"
}
-}
+}
\ No newline at end of file
From ac10a8bcc17ca160a6499c80373a0d39ee4782c7 Mon Sep 17 00:00:00 2001
From: aibayanyu20
Date: Fri, 12 Jan 2024 06:52:29 +0800
Subject: [PATCH 04/25] chore(release): v1.4.0
---
CHANGELOG.md | 29 +++++++++++++++++++++++++++++
package.json | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4cffea0..9a3f56b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,34 @@
# Changelog
+## v1.4.0
+
+[compare changes](https://github.com/vueComponent/ant-design-vue-nuxt/compare/v1.1.2...v1.4.0)
+
+### 🚀 Enhancements
+
+- Add flex component ([da86291](https://github.com/vueComponent/ant-design-vue-nuxt/commit/da86291))
+- Add extractStyle ([7439e98](https://github.com/vueComponent/ant-design-vue-nuxt/commit/7439e98))
+
+### 🩹 Fixes
+
+- Fix typo ([aebf62e](https://github.com/vueComponent/ant-design-vue-nuxt/commit/aebf62e))
+
+### 🏡 Chore
+
+- **release:** V1.2.0 ([30d89ec](https://github.com/vueComponent/ant-design-vue-nuxt/commit/30d89ec))
+- Test bundler module resolution ([bc5c5cf](https://github.com/vueComponent/ant-design-vue-nuxt/commit/bc5c5cf))
+- **release:** V1.3.0 ([314ef40](https://github.com/vueComponent/ant-design-vue-nuxt/commit/314ef40))
+
+### 🤖 CI
+
+- Eslint format ([7c43723](https://github.com/vueComponent/ant-design-vue-nuxt/commit/7c43723))
+
+### ❤️ Contributors
+
+- Aibayanyu20
+- Markthree ([@markthree](http://github.com/markthree))
+- Daniel Roe
+
## v1.3.0
[compare changes](https://github.com/vueComponent/ant-design-vue-nuxt/compare/v1.1.2...v1.3.0)
diff --git a/package.json b/package.json
index b5e50b9..e52f0a6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@ant-design-vue/nuxt",
- "version": "1.3.0",
+ "version": "1.4.0",
"description": "ant-design-vue-nuxt module",
"repository": "vueComponent/ant-design-vue-nuxt",
"license": "MIT",
From 53961b348c555862e122f891a08d2324f9ca6d55 Mon Sep 17 00:00:00 2001
From: aibayanyu20
Date: Fri, 12 Jan 2024 06:53:52 +0800
Subject: [PATCH 05/25] chore: change config
---
playground/nuxt.config.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts
index f933af1..ba14eff 100644
--- a/playground/nuxt.config.ts
+++ b/playground/nuxt.config.ts
@@ -4,7 +4,7 @@ export default defineNuxtConfig({
extractStyle: true
},
imports:{
- autoImport:true
+ autoImport: true
},
vite:{
resolve:{
From 68275b77b85091ff15e04c8aebd24f2fc1a59ead Mon Sep 17 00:00:00 2001
From: aibayanyu20
Date: Fri, 12 Jan 2024 07:03:59 +0800
Subject: [PATCH 06/25] fix: runtime component is not found
---
src/runtime/components/AExtractStyle.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/runtime/components/AExtractStyle.vue b/src/runtime/components/AExtractStyle.vue
index 0ddf65a..91894b6 100644
--- a/src/runtime/components/AExtractStyle.vue
+++ b/src/runtime/components/AExtractStyle.vue
@@ -1,6 +1,6 @@