如何访问或确定哪些Tabulator参数是需要设置的?

问题描述 投票:0回答:1

http:/tabulator.infodocs4.6edit 显示了一个例子。

//define lookup function
function paramLookup(cell){
    //cell - the cell component

    //do some processing and return the param object
    return {param1:"green"};
}

//column definition
{title:"Rating", field:"rating", editor:"star", editorParams:paramLookup}

一旦设置了参数,你如何访问这些参数 甚至如何确定要设置什么参数?

tabulator
1个回答
1
投票

你可以看一下 table.options 哪儿 table 是制表机的实例,而 options 是当前所有Tabulator选项的对象。

这里有一个小技巧,你可以运行它。 它将把表选项写到文档体中,但很难读懂。 如果你看一下控制台,它还会记录表格实例和 table.options 对象。

https:/jsfiddle.netnrayburnj506cvea4。

你也可以看看原型,找到一些其他可能有用的方法。 例如: table.getColumnDefinitions() 返回表的当前列定义。

© www.soinside.com 2019 - 2024. All rights reserved.