javascript - 如何将滑动切换按钮添加到制表符列中的每个单元格
解决方案
我不使用角度,但我有自己的幻灯片切换,只使用格式化程序“html”。所以我认为您可以根据需要获取要插入的代码/对象
https://jsfiddle.net/o5whLz4j/
new Tabulator("#tabulator", {
data:[ {
"one": '<input id="oneone" type="checkbox" class="switch"><label id="oneonelabel" for="oneone">One</label>',
"two": "1",
},{
"one": '<input id="onetwo" type="checkbox" class="switch"><label id="onetwolabel" for="onetwo">Two</label>',
"two": "2",
},{
"one": '<input id="onethree" type="checkbox" class="switch"><label id="onethreelabel" for="onethree">Three</label>',
"two": "3",
},
],
columns: [{
title: "One",
field: "one",
formatter: "html",
},
{
title: "Two",
field: "two",
},
],
});
推荐阅读
- python - 为什么将列表转换为字典在 python 中不起作用?
- python - 在 Python 中使用具有 NaN 列的 mplfinance 绘制财务图
- html - 如何在 Angular 应用程序中自定义滚动条
- linux - Openwrt 写入 USB 串口 /dev/ttyACMO
- firefox - 辅助功能洞察 Windows 工具未检查登录对话框中的密码字段
- javascript - 为什么加粗字符串的特定字符不会在 React js 中呈现元素?
- javascript - Javascript onclick 开关名称不起作用
- android - 如何在弹出 0 类 SMS(flash SMS)时防止应用程序进入后台,从而阻止 UPI 验证
- c# - 从 json 文件中为测试项目中的 servicebuilder 设置配置和选项
- php - xampp 上的 PHP 自动加载命名空间