master
yutent 2024-12-06 18:44:58 +08:00
parent 20918803a3
commit a811213f85
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "wkit",
"version": "1.12.2",
"version": "1.12.3",
"type": "module",
"description": "A library for building fast, lightweight web components.",
"main": "dist/index.js",

View File

@ -169,8 +169,8 @@ export class Component extends HTMLElement {
delete this.props
}
static reg(name = '', prefix = 'wc-') {
let key = prefix + name
static reg(name = '', prefix = 'wc') {
let key = prefix + '-' + name
if (!customElements.get(key)) {
customElements.define(key, this)
}