回到前台刷新

查看源码

属性参考

注册名 data-controller="appear-visible"
Targets
Values
Outlets
刷新时机
从其它标签页切回时
复用样式
bulma/expand/preview.scss 的 .as-show

页面从后台回到前台时,移除自身 controller 并用 Turbo.replace 重新访问当前地址,用于刷新需要实时性的数据块。

<dl data-controller="appear-visible" class="as-show as-boxed"> … </dl>

组件会 Turbo.visit(location, { action: “replace” }),需要 Turbo 环境。