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])