Merge pull request #223 in YR/star-web-components from fix-li-input-no-value to master

* commit '1f93aa5858770f24721f2ba41860b49c0ed90303':
  (fix)修复li在input类型下value值未绑定的问题
This commit is contained in:
汪昌棋 2023-01-13 14:38:32 +08:00
commit d89fc498b5
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')}
/>