[英]How to add a slide toggle button to every cell in tabulator column
我不使用 angular,但我有自己的幻灯片切换,只使用格式化程序“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",
},
],
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.