更新登录组件,支持多种登录方式,修改版本号至0.1.1,并更新示例代码
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user