表单组件调整, readyOnly时无焦点

master
yutent 2023-04-21 16:11:23 +08:00
parent 8d1e960d71
commit 0dab86987a
3 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ class CheckboxItem extends Component {
render() {
return html` <label
tabindex=${this.disabled ? 'none' : 0}
tabindex=${this.disabled || this.readOnly ? 'none' : 0}
@click=${this.handleClick}
@keydown=${this.handleClick}
>

View File

@ -247,7 +247,7 @@ class RadioItem extends Component {
render() {
return html` <label
tabindex=${this.disabled ? 'none' : 0}
tabindex=${this.disabled || this.readOnly ? 'none' : 0}
@click=${this.handleClick}
@keydown=${this.handleClick}
>

View File

@ -209,7 +209,7 @@ class Switch extends Component {
render() {
let classes = classMap({ dot: true, open: this.value })
return html` <label
tabindex=${this.disabled ? 'none' : 0}
tabindex=${this.disabled || this.readOnly ? 'none' : 0}
@click=${this.handleClick}
@keydown=${this.handleClick}
>