1

例: LongTextEditor は幅と高さが固定されています。

$input = $("<TEXTAREA hidefocus rows=5 style='backround:white;width:250px;height:80px;border:0;outline:0'>")
      .appendTo($wrapper);

次のようにパラメータ化するとよいでしょう。

$input = $("<TEXTAREA hidefocus rows=5 style='backround:white;width:"+options.width+";height:"+options.height+";border:0;outline:0'>")
      .appendTo($wrapper);
4

1 に答える 1

3

はい、次のように達成できます。

オプション リストを列配列に渡す

var columns = [
        { id: "Id", name: "NAME", field: "FIELD", options: YourList, editor: Slick.Editors.YourEditor,},
              ];

次に、エディターでアクセスできます(エディターのデフォルトファイルSlick.editors.js

 function YourEditor(args) {
     //Access columns list using "args.column.options"
 }
于 2013-08-27T15:44:28.920 に答える