From f30eac2195119bac861799026f0faec08eb9704e Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 6 Dec 2024 18:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dwkit1.12.3,=20=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/index.js | 2 +- src/router/router-components.js | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index c0ae27a..451c3cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wkitd", - "version": "1.3.10", + "version": "1.3.11", "type": "module", "main": "dist/index.js", "files": [ diff --git a/src/index.js b/src/index.js index 99cf407..9da3eb6 100644 --- a/src/index.js +++ b/src/index.js @@ -92,7 +92,7 @@ export function createApp({ } } } - App.reg('app') + App.reg('app', 'v') } })() } diff --git a/src/router/router-components.js b/src/router/router-components.js index 790507a..d266365 100644 --- a/src/router/router-components.js +++ b/src/router/router-components.js @@ -191,10 +191,5 @@ class RouterLink extends Component { } } -if (!customElements.get('router-view')) { - customElements.define('router-view', RouterView) -} - -if (!customElements.get('router-link')) { - customElements.define('router-link', RouterLink) -} +RouterView.reg('view', 'router') +RouterLink.reg('link', 'router')