(fix)修复li在input类型下value值未绑定的问题

This commit is contained in:
wangchangqi 2023-01-09 11:42:06 +08:00
parent d3327c5809
commit 1f93aa5858
1 changed files with 2 additions and 0 deletions

View File

@ -303,6 +303,8 @@ export class StarLi extends StarBaseElement {
<input
placeholder=${ifDefined(this.placeholder)}
value=${ifDefined(this.value)}
@change=${(e: UIEvent) =>
(this.value = (e.target as HTMLInputElement).value)}
@focus=${() => this.setAttribute('active', '')}
@blur=${() => this.removeAttribute('active')}
/>