更新登录组件,支持多种登录方式,修改版本号至0.1.1,并更新示例代码

This commit is contained in:
abearxiong committed 2025-12-17 15:08:31 +08:00
1 parent 65ee31e8ca
commit 7db3f1f6dc
6 files changed
+50 -9

No files matched your search

+10 -2
View File
@@ -320,10 +320,18 @@ class KvLogin extends HTMLElement {
return this.renderPasswordForm()
}
}
createWeixinEl(){
const id = 'weixinLogin';
let el = this.querySelector('#' + id);
if (el) return el;
const weixinEl = document.createElement('div');
weixinEl.id = 'weixinLogin';
this.appendChild(weixinEl);
return weixinEl;
}
render() {
if (!this.shadowRoot) return
this.createWeixinEl();
const renderIcon = (icon: any) => {
// 如果是emoji字符,直接返回
if (typeof icon === 'string' && !icons[icon]) {