ソースを参照

Merge pull request #1861 from thornomad/rowStyle-cellStyle-docs

Added example to docs for rowStyle and cellStyle
wenzhixin 10 年 前
コミット
5224eb761e

+ 9 - 1
docs/_i18n/en/documentation/column-options.md

@@ -224,7 +224,15 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
         value: the field value.<br>
         row: the row record data.<br>
         index: the row index.<br>
-        Support classes or css.
+        Support classes or css. Example usage:<br>
+<pre>
+function cellStyle(value, row, index) {
+  return {
+    classes: 'text-nowrap another-class',
+    css: {"color": "blue", "font-size": "50px"}
+  };
+}
+</pre>
         </td>
     </tr>
     <tr>

+ 9 - 1
docs/_i18n/en/documentation/table-options.md

@@ -521,7 +521,15 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
         The row style formatter function, takes two parameters: <br>
         row: the row record data.<br>
         index: the row index.<br>
-        Support classes or css.
+        Support classes or css. Example usage:<br>
+<pre>
+function rowStyle(value, row, index) {
+  return {
+    classes: 'text-nowrap another-class',
+    css: {"color": "blue", "font-size": "50px"}
+  };
+}
+</pre>
         </td>
     </tr>
     <tr>