启用 / 禁用输入
查看源码属性参考
| 注册名 | data-controller="enter" |
|---|---|
| Targets | |
| Values | |
| Outlets |
启用 / 禁用:open() 把挂载元素内所有 input 解禁,close() 全部禁用。常与 field(嵌套表单行)组合,做「编辑这一行」的开关。
<div data-controller="enter">
<input disabled>
<button data-action="click->enter#open">编辑</button>
<button data-action="click->enter#close">锁定</button>
</div>