corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 # 列参数 []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/column-options.md)
2  
3 ---
4  
5 The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
6  
7 <table class="table"
8 id="c"
9 data-search="true"
10 data-show-toggle="true"
11 data-show-columns="true"
12 data-mobile-responsive="true">
13 <thead>
14 <tr>
15 <th>Name</th>
16 <th>Attribute</th>
17 <th>Type</th>
18 <th>Default</th>
19 <th>Description</th>
20 </tr>
21 </thead>
22 <tbody>
23 <tr>
24 <td>radio</td>
25 <td>data-radio</td>
26 <td>Boolean</td>
27 <td>false</td>
28 <td>True to show a radio. The radio column has fixed width.</td>
29 </tr>
30 <tr>
31 <td>checkbox</td>
32 <td>data-checkbox</td>
33 <td>Boolean</td>
34 <td>false</td>
35 <td>True to show a checkbox. The checkbox column has fixed width.</td>
36 </tr>
37 <tr>
38 <td>field</td>
39 <td>data-field</td>
40 <td>String</td>
41 <td>undefined</td>
42 <td>The column field name.</td>
43 </tr>
44 <tr>
45 <td>title</td>
46 <td>data-title</td>
47 <td>String</td>
48 <td>undefined</td>
49 <td>The column title text.</td>
50 </tr>
51 <tr>
52 <td>titleTooltip</td>
53 <td>data-title-tooltip</td>
54 <td>String</td>
55 <td>undefined</td>
56 <td>The column title tooltip text. This option also support the title HTML attribute</td>
57 </tr>
58 <tr>
59 <td>class</td>
60 <td>class / data-class</td>
61 <td>String</td>
62 <td>undefined</td>
63 <td>The column class name.</td>
64 </tr>
65 <tr>
66 <td>rowspan</td>
67 <td>rowspan / data-rowspan</td>
68 <td>Number</td>
69 <td>undefined</td>
70 <td>Indicate how many rows a cell should take up.</td>
71 </tr>
72 <tr>
73 <td>colspan</td>
74 <td>colspan / data-colspan</td>
75 <td>Number</td>
76 <td>undefined</td>
77 <td>Indicate how many columns a cell should take up.</td>
78 </tr>
79 <tr>
80 <td>align</td>
81 <td>data-align</td>
82 <td>String</td>
83 <td>undefined</td>
84 <td>Indicate how to align the column data. 'left', 'right', 'center' can be used.</td>
85 </tr>
86 <tr>
87 <td>halign</td>
88 <td>data-halign</td>
89 <td>String</td>
90 <td>undefined</td>
91 <td>Indicate how to align the table header. 'left', 'right', 'center' can be used.</td>
92 </tr>
93 <tr>
94 <td>falign</td>
95 <td>data-falign</td>
96 <td>String</td>
97 <td>undefined</td>
98 <td>Indicate how to align the table footer. 'left', 'right', 'center' can be used.</td>
99 </tr>
100 <tr>
101 <td>valign</td>
102 <td>data-valign</td>
103 <td>String</td>
104 <td>undefined</td>
105 <td>Indicate how to align the cell data. 'top', 'middle', 'bottom' can be used.</td>
106 </tr>
107 <tr>
108 <td>width</td>
109 <td>data-width</td>
110 <td>Number {Pixels or Percentage}</td>
111 <td>undefined</td>
112 <td>The width of column. If not defined, the width will auto expand to fit its contents. Also you can add '%' to your number and
113 the bootstrapTable will use the percentage unit, otherwise, you can add or no the 'px' to your number and then the bootstrapTable will use the pixels</td>
114 </tr>
115 <tr>
116 <td>sortable</td>
117 <td>data-sortable</td>
118 <td>Boolean</td>
119 <td>false</td>
120 <td>True to allow the column can be sorted.
121 </td>
122 </tr>
123 <tr>
124 <td>order</td>
125 <td>data-order</td>
126 <td>String</td>
127 <td>'asc'</td>
128 <td>The default sort order, can only be 'asc' or 'desc'.</td>
129 </tr>
130 <tr>
131 <td>visible</td>
132 <td>data-visible</td>
133 <td>Boolean</td>
134 <td>true</td>
135 <td>False to hide the columns item.</td>
136 </tr>
137 <tr>
138 <td>cardVisible</td>
139 <td>data-card-visible</td>
140 <td>Boolean</td>
141 <td>true</td>
142 <td>False to hide the columns item in card view state.</td>
143 </tr>
144 <tr>
145 <td>switchable</td>
146 <td>data-switchable</td>
147 <td>Boolean</td>
148 <td>true</td>
149 <td>False to disable the switchable of columns item.</td>
150 </tr>
151 <tr>
152 <td>clickToSelect</td>
153 <td>data-click-to-select</td>
154 <td>Boolean</td>
155 <td>true</td>
156 <td>True to select checkbox or radiobox when the column is clicked.</td>
157 </tr>
158 <tr>
159 <td>formatter</td>
160 <td>data-formatter</td>
161 <td>Function</td>
162 <td>undefined</td>
163 <td>
164 The context (this) is the column Object. <br>
165 The cell formatter function, take three parameters: <br>
166 value: the field value. <br>
167 row: the row record data.<br>
168 index: the row index.</td>
169 </tr>
170 <tr>
171 <td>footerFormatter</td>
172 <td>data-footer-formatter</td>
173 <td>Function</td>
174 <td>undefined</td>
175 <td>
176 The context (this) is the column Object. <br>
177 The function, take one parameter: <br>
178 data: Array of all the data rows. <br>
179 the function should return a string with the text to show in the footer cell.
180 </tr>
181 <tr>
182 <td>events</td>
183 <td>data-events</td>
184 <td>Object</td>
185 <td>undefined</td>
186 <td>
187 The cell events listener when you use formatter function, take three parameters: <br>
188 event: the jQuery event. <br>
189 value: the field value. <br>
190 row: the row record data.<br>
191 index: the row index.
192 </td>
193 </tr>
194 <tr>
195 <td>sorter</td>
196 <td>data-sorter</td>
197 <td>Function</td>
198 <td>undefined</td>
199 <td>
200 The custom field sort function that used to do local sorting, take two parameters: <br>
201 a: the first field value.<br>
202 b: the second field value.
203 </td>
204 </tr>
205 <tr>
206 <td>sortName</td>
207 <td>data-sort-name</td>
208 <td>String</td>
209 <td>undefined</td>
210 <td>Provide a customizable sort-name, not the default sort-name in the header, or the field name
211 of the column. For example, a column might display the value of fieldName of "html" such as
212 "&lt;b&gt;&lt;span style="color:red"&gt;abc&lt;/span&gt;&lt;/b&gt;", but a fieldName to sort is "content" with the value of "abc".
213 </td>
214 </tr>
215 <tr>
216 <td>cellStyle</td>
217 <td>data-cell-style</td>
218 <td>Function</td>
219 <td>undefined</td>
220 <td>
221 The cell style formatter function, take three parameters: <br>
222 value: the field value.<br>
223 row: the row record data.<br>
224 index: the row index.<br>
225 field: the row field.<br>
226 Support classes or css.
227 </td>
228 </tr>
229 <tr>
230 <td>searchable</td>
231 <td>data-searchable</td>
232 <td>Boolean</td>
233 <td>true</td>
234 <td>
235 True to search data for this column.
236 </td>
237 </tr>
238 <tr>
239 <td>searchFormatter</td>
240 <td>data-search-formatter</td>
241 <td>Boolean</td>
242 <td>true</td>
243 <td>
244 True to search use formated data.
245 </td>
246 </tr>
247 </tbody>
248 </table>