fix: make LoginPage.render async to unify async render contract
This commit is contained in:
@@ -90,7 +90,7 @@ const App = {
|
||||
const pub = document.getElementById('public-page');
|
||||
pub.classList.remove('hidden');
|
||||
const comp = page === 'login' ? LoginPage : page === 'register' ? RegisterPage : page === 'install' ? InstallPage : HomePage;
|
||||
Promise.resolve(comp.render(param)).then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(param); });
|
||||
comp.render(param).then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(param); });
|
||||
},
|
||||
|
||||
showLayout() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const LoginPage = {
|
||||
render() {
|
||||
async render() {
|
||||
return `
|
||||
<div class="pub-card">
|
||||
<div class="logo"><i class="fas fa-shield-halved"></i><h2>欢迎回来</h2><p>登录您的账号</p></div>
|
||||
|
||||
Reference in New Issue
Block a user