表格行操作列

查看源码

属性参考

注册名 data-controller="tr-actions"
Targets
Values
Outlets
结构示意:该组件依赖外部运行时或会在挂载时产生副作用, 下方用 <template> 展示真实 DOM 结构(不会被 Stimulus 连接)。 在具备条件的环境中去掉 <template> 包裹即可运行。

表格行操作列:读取 data value(含 position / title / icon / href / action / method / confirm 等),用 template_tr_action / template_tr_link 两个

<tr data-controller="tr-actions" data-tr-actions-data-value='[{"position":1,"title":"编辑","href":"/edit"}]'></tr>

connect 即依赖 #template_tr_action / #template_tr_link,缺失会报错;常与 tree / show 组合使用。示例用结构示意。