Blame view

public/assets/libs/bootstrap-table/src/extensions/print/README.md 1.85 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  # Print
  
  Adds a button to the toolbar for printing the table in a predefined configurable format.
  
  ## Usage
  
  ```html
  <script src="extensions/print/bootstrap-table-print.js"></script>
  ```
  
  ## Options
  
  ### showPrint
  
  * type: Boolean
  * description: Set true to show the Print button on the toolbar.
  * default: `false`
  
  ### printAsFilteredAndSortedOnUI
  
  * type: Boolean
  * description: When true - print table as sorted and filtered on UI. Please note that if true is set, along with explicit predefined print options for filtering and sorting (printFilter, printSortOrder, printSortColumn)- then they will be applied on data already filtered and sorted by UI controls. For printing data as filtered and sorted on UI - do not set these 3 options: printFilter, printSortOrder, printSortColumn
  * default: `true`
  
  ### printSortColumn
  
  * type: String
  * description: set column field name to sort by for the printed table 
  * default: `undefined`
  
  ### printSortOrder
  
  * type: String
  * description: Valid values: 'asc', 'desc'. Relevant only if printSortColumn is set 
  * default: `'asc'`
  
  ### printPageBuilder
  
  * type: Function
  * description: Receive html `<table>` element as string parameter, returns html string for printing. Used for styling and adding header or footer.
  * default: `function(table){return printPageBuilderDefault(table)}`
  
  ## Column options
  
  ### printFilter
  
  * type: String
  * description: set value to filter the printed data by this column. 
  * default: `undefined`
  
  ### printIgnore
  
  * type: Boolean
  * description: set true to hide this column in the printed page. 
  * default: `false`
  
  ### printFormatter
  
  * type: Function
  * description: function(value, row, index) - returns a string. Formats the cell values for this column in the printed table. Function behaviour is similar to the 'formatter' column option
  * default: `undefined`
  
  ## Icons
  
  * print: `'glyphicon-print icon-share'`