修复一处更新

pull/1/head
yutent 2023-03-15 15:59:53 +08:00
parent f1830910aa
commit 9e307aabf2
2 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@bd/core", "name": "@bd/core",
"version": "1.2.0", "version": "1.2.1",
"type": "module", "type": "module",
"description": "百搭UI组件库的核心", "description": "百搭UI组件库的核心",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -106,7 +106,7 @@ export class Component extends HTMLElement {
// 若无定义props时, 手动执行一次渲染 // 若无定义props时, 手动执行一次渲染
if (this[__pending__] === false) { if (this[__pending__] === false) {
this[__pending__] = true this[__pending__] = true
this.performUpdate() nextTick(_ => this[__updated__]())
} }
} }
@ -178,8 +178,6 @@ export class Component extends HTMLElement {
// 请求更新 // 请求更新
#requestUpdate(name, oldValue) { #requestUpdate(name, oldValue) {
let shouldUpdate = true
this[__changed_props__].set(name, this[name]) this[__changed_props__].set(name, this[name])
this[__prop2attr__](name, this[name]) this[__prop2attr__](name, this[name])