We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fd0a27 commit f3bee13Copy full SHA for f3bee13
1 file changed
docs/guide/common-problems.md
@@ -58,14 +58,18 @@ pnpm add sass@1.78.0 -D
58
<wd-button type="primary">主要按钮</wd-button>
59
```
60
61
+`Vue 3.2` 及以下版本可以使用如下配置开启`styleIsolation: 'shared'`选项:
62
```ts
63
+// vue
64
<script lang="ts">
65
export default {
66
options: {
67
styleIsolation: 'shared'
68
}
69
70
</script>
71
+<script lang="ts" setup>
72
+</script>
73
74
75
```scss
@@ -74,21 +78,14 @@ export default {
78
color: red !important;
79
76
80
77
-
-什么?还有人想问:这样写还我怎么使用`script setup`啊!
-**_简单,这样写两个就行了_**
81
+`Vue 3.3+` 可以通过`defineOptions`开启`styleIsolation: 'shared'`选项:
82
83
-<script lang="ts">
84
-export default {
+defineOptions({
85
86
87
88
-}
89
-</script>
90
91
-<script lang="ts" setup>
+})
92
93
94
0 commit comments