From 408ba6ca2fc5fc9d9681f1d3d365abdd8f483ac6 Mon Sep 17 00:00:00 2001 From: yutent Date: Mon, 29 May 2023 10:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83adoptedStyleSheets=E7=9A=84?= =?UTF-8?q?=E8=B5=8B=E5=80=BC,=20=E5=85=BC=E5=AE=B9=E5=9B=BD=E4=BA=A7?= =?UTF-8?q?=E8=BE=A3=E9=B8=A1=E6=B5=8F=E8=A7=88=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 2 +- package.json | 2 +- src/css.js | 2 +- src/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 2027fa8..07718ff 100644 --- a/Readme.md +++ b/Readme.md @@ -37,7 +37,7 @@ class Hello extends Component { bar: String // 简写 } - // 若需要支持 scss, 则需要使用 @bd/wcui-cli,预处理。 + // 若需要支持 scss语法, 则需要使用构建工具编译。 // 可支持数组 static styles = css` button { color: #09f; } diff --git a/package.json b/package.json index 919a9c7..877cb40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkit", - "version": "1.9.5", + "version": "1.9.6", "type": "module", "description": "A library for building fast, lightweight web components.", "main": "dist/index.js", diff --git a/src/css.js b/src/css.js index 1aa4f1e..6eb4122 100644 --- a/src/css.js +++ b/src/css.js @@ -37,7 +37,7 @@ export function adoptStyles(root, styles = '') { styles = (RESET_CSS_STYLE + styles.join(' ')).trim() sheet.replaceSync(styles) if (root.adoptedStyleSheets) { - root.adoptedStyleSheets.push(sheet) + root.adoptedStyleSheets = [sheet] } else { root.appendChild(sheet.elem) } diff --git a/src/index.js b/src/index.js index b7c034a..bce5046 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /** - * {@bd/ui的核心库} + * { wkit library } * @author yutent * @date 2023/03/07 18:10:43 */