Blame view

public/assets/libs/bootstrap-table/src/extensions/click-edit-row/README.md 1.19 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
  # Table click-edit-row
  
  Use Plugin: [bootstrap-click-edit-row](https://github.com/wenzhixin/bootstrap-table/tree/develop/src/extensions/click-edit-row) </br>
  You must include the bootstrap-table-click-editable.css file in order to get the appropriate style.
  Ps. Used this plugin is better on table columns not more than five.
  
  ## Usage
  
  ```html
  <link rel="stylesheet" href="bootstrap-table-click-edit-row.css"></style>
  <script src="bootstrap-table-click-edit-row.js"></script>
  ```
  
  ## Options
  
  ### editable
  
  * type: input、select
  * default: `input`
  * description: Set select must setup `$.selectArray` for select options.
  * $.selectArray example: `$.selectArray= {price: [{idxNum: '$', name: '100'}, {idxNum: '$', name: '500'}, {idxNum: '$', name: '5000'}]}`, obj name must same as 'data-field' value.
  
  All options can be defined via `data-editable-*` HTML attributes. Table wide options are used for every row but can be overridden:
  
  ````html
  <table id="my_table_id"
    data-url="data.json">
    <thead>
      <tr>
        <th data-field="id">ID</th>
        <th data-field="name" data-editable="input">Item Name</th>
        <th data-field="price" data-editable="select">Item Price</th>
      </tr>
    </thead>
  </table>
  ````