8000 fix!(extractStyle): close by default · vueComponent/ant-design-vue-nuxt@48db824 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit 48db824

Browse files
committed
fix!(extractStyle): close by default
1 parent 7439e98 commit 48db824

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ const handleMessage = () => {
6969
}
7070
</script>
7171
<template>
72-
<a-extract-style>
73-
<a-button @click="handleMessage">
74-
button
75-
</a-button>
76-
</a-extract-style>
72+
<a-button @click="handleMessage">
73+
button
74+
</a-button>
7775
</template>
7876
```
7977
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
105103

106104
* Type: `boolean`
107105

108-
Extract css on demand, start by default
106+
> Solve page css flicker problem
107+
108+
Extracts and injects css on demand, defaults to false
109109

110110
```vue
111-
<!-- If launched, we can wrap the component or page in the app.vue outermost layer -->
111+
<!-- If the extractStyle option is enabled, we can use a-extract-style on the outermost level of the template in app.vue -->
112112
<template>
113113
<a-extract-style>
114114
<!-- Your page or component -->

playground/nuxt.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export default defineNuxtConfig({
22
modules: ['../src/module'],
3-
antd: {},
3+
antd: {
4+
extractStyle: true
5+
},
46
imports:{
57
autoImport:true
68
},

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export const defaults:Options = {
1515
components: allComponents,
1616
icons: allIcons,
1717
imports: allImports,
18-
extractStyle: true
18+
extractStyle: false
1919
}

0 commit comments

Comments
 (0)
0