From f3bee13b46ccbb8856b9051a99ed2b5356dc0d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=91=B8=E9=B1=BC=E5=8E=BB?= <1780903673@qq.com> Date: Sun, 15 Dec 2024 22:55:11 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20=20=E5=B8=B8?= =?UTF-8?q?=E8=A7=81=E9=97=AE=E9=A2=98=E6=B7=BB=E5=8A=A0Vue=203.3+?= =?UTF-8?q?=E4=BD=BF=E7=94=A8defineOptions=E8=AE=BE=E7=BD=AEstyleIsolation?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=9A=84=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #784 --- docs/guide/common-problems.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/guide/common-problems.md b/docs/guide/common-problems.md index 1bc68018a..31fdd94ad 100644 --- a/docs/guide/common-problems.md +++ b/docs/guide/common-problems.md @@ -58,7 +58,9 @@ pnpm add sass@1.78.0 -D 主要按钮 ``` +`Vue 3.2` 及以下版本可以使用如下配置开启`styleIsolation: 'shared'`选项: ```ts +// vue + ``` ```scss @@ -74,21 +78,14 @@ export default { color: red !important; } ``` - -什么?还有人想问:这样写还我怎么使用`script setup`啊! - -**_简单,这样写两个就行了_** - +`Vue 3.3+` 可以通过`defineOptions`开启`styleIsolation: 'shared'`选项: ```ts - - - ```