diff --git a/package.json b/package.json index a4892e0..93e1f35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.5.2", + "version": "1.5.3", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/html.js b/src/html.js index 84e2e8d..4ac62da 100644 --- a/src/html.js +++ b/src/html.js @@ -318,6 +318,7 @@ class TemplateInstance { } else if (templatePart.type === ELEMENT_PART) { part = new ElementPart(node, this, options) } + // console.log(node) if (node.nodeType === 1 && node.getAttribute('ref')) { if (options.host.$refs) { options.host.$refs[node.getAttribute('ref')] = node diff --git a/src/index.js b/src/index.js index 9377616..34b5ca6 100644 --- a/src/index.js +++ b/src/index.js @@ -38,7 +38,7 @@ export class Component extends HTMLElement { this.finalize() this[__props__].forEach((options, prop) => { - options.attribute && list.push(prop.toLowerCase()) + list.push(prop.toLowerCase()) }) return list } @@ -151,6 +151,7 @@ export class Component extends HTMLElement { let options = this.#getPropOptions(name) if (options.attribute === false) { + this.removeAttribute(name) return }