From 9e307aabf2e633499bf9db74a5de13fb9a84af36 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 15 Mar 2023 15:59:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/index.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index bf78394..dbb8678 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.2.0", + "version": "1.2.1", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/index.js b/src/index.js index 1f7092e..db70be2 100644 --- a/src/index.js +++ b/src/index.js @@ -106,7 +106,7 @@ export class Component extends HTMLElement { // 若无定义props时, 手动执行一次渲染 if (this[__pending__] === false) { this[__pending__] = true - this.performUpdate() + nextTick(_ => this[__updated__]()) } } @@ -178,8 +178,6 @@ export class Component extends HTMLElement { // 请求更新 #requestUpdate(name, oldValue) { - let shouldUpdate = true - this[__changed_props__].set(name, this[name]) this[__prop2attr__](name, this[name])