Closed hehehai closed 2 years ago
身份认证页面,点击登录或注册按钮,没有 loading 状态。
loading
试着调了下,😓 加载按钮有点大,css 覆盖样式搞不懂覆盖规则 😵
state: State = { username: '', password: '', loading: true, }; #onSubmit = async () => { if (this.state.loading) return; this.setState({ loading: true }); try { if (!(await this.formRef.element!.valid())) return; const { username, password } = this.state; if (this.register) { await register({ username, password }); } else { await login({ username, password }); } } finally { this.setState({ loading: false }); } gotoRedirectUri(); };
<dy-button data-cy="submit" @click=${this.#onSubmit}> ${loading ? html`<dy-loading></dy-loading>` : this.register ? i18n.get('register') : i18n.get('login')} </dy-button>
<dy-button .icon=${icons.loading}></dy-button> 应该可以
<dy-button .icon=${icons.loading}></dy-button>
PR 里面有几行代码似乎的多余的。
还有以前那个添加官网链接的 PR,需要解决下冲突,另外也有几个建议你看下。
PR 里面有几行代码似乎的多余的。 还有以前那个添加官网链接的 PR,需要解决下冲突,另外也有几个建议你看下。
ok
身份认证页面,点击登录或注册按钮,没有
loading
状态。试着调了下,😓 加载按钮有点大,css 覆盖样式搞不懂覆盖规则 😵