当我为yadcf列创建外部过滤器时,使用select2作为选择方法,选择中的字体不遵循包装器<div>
中指定的.body字体
有没有办法控制这个?
点击匹配字段中的http://codepen.io/louking/pen/rxKeob点击。你可以看到字体有serif但.body字体是Arial,Helvetica,sans-serif。
注意我使用的是yadcf 0.8.8+(通过提交https://github.com/vedmack/yadcf/commit/4b778d7747c5c1cd4f362e6a6154c172f4a88ad3)
html如下所示
<div class=body>
<label class="Label">Match:</label><span id="select"></span>
<table id=tbl class=DataList width=100%>
<thead>
<tr>
<th>col0</th>
<th>col1</th>
<th>col2</th>
</tr>
</thead>
<tbody>
<tr>
<td>text-obvious</td>
<td>b0</td>
<td>c0</td>
</tr>
<tr>
<td>more-text</td>
<td>b1</td>
<td>c1</td>
</tr>
</tbody>
</table>
</div>
js如下所示
options = {
dom: '<"H"lBpfr>t<"F"i>',
jQueryUI: true,
paging: false,
scrollY: true,
scrollCollapse: true,
scrollX: true,
};
var yadcffilters = [{
column_number: 0,
filter_container_id: "select",
column_data_type: "text",
filter_match_mode: "exact",
filter_type: "multi_select",
select_type: 'select2',
select_type_options: {
width: '20em',
},
filter_reset_button_text: 'all',
}];
var table = $('#tbl').dataTable(options)
.yadcf(yadcffilters);