产品一张表luckysheet前端代码库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

220 lines
5.6 KiB

5 years ago
# Basic Configuration
5 years ago
## container
5 years ago
- Type: String
- Default: "luckysheet"
- Usage: Container ID
5 years ago
------------
## title
5 years ago
- Type: String
- Default: "Luckysheet Demo"
- Usage: Table's name
5 years ago
------------
## column
5 years ago
- Type: Number
- Default: 60
- Usage: The default number of columns in an empty table
5 years ago
------------
## row
5 years ago
- Type: Number
- Default: 84
- Usage: The default number of rows in an empty table
5 years ago
------------
## data
5 years ago
- Type: Array
- Default: [{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }]
- Usage: Client sheet data `[shee1, sheet2, sheet3]`
5 years ago
------------
## fullscreenmode
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether full-screen mode. In non-full-screen mode, the marker box is not forced to be selected
5 years ago
------------
## autoFormatw
5 years ago
- Type: Boolean
- Default: false
- Usage: Automatically format numbers with more than 4 digits as 'billion format', for example: true or "true" or "TRUE"
5 years ago
------------
## accuracy
5 years ago
- Type: Number
- Default: undefined
- Usage: Set the accuracy,the number of digits after the decimal point. Pass the parameter as a number or numeric string, for example: "0" or 0
5 years ago
------------
## allowCopy
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to allow copying
5 years ago
------------
## showtoolbar
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to display the toolbar in the second row
5 years ago
------------
## showinfobar
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to display the top name bar
5 years ago
------------
## showsheetbar
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to display the bottom table name area
5 years ago
------------
## showstatisticBar
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to display the bottom count bar
5 years ago
------------
## allowEdit
5 years ago
- Type: Boolean
- Default: true
- Usage: Whether to allow frontend editing(Not implemented yet)
5 years ago
------------
## enableAddRow
5 years ago
- Type: Boolean
- Default: true
- Usage: Allow add line
5 years ago
------------
## enableAddCol
5 years ago
- Type: Boolean
- Default: true
- Usage: Allow add column
5 years ago
------------
## pointEdit
5 years ago
- Type: Boolean
- Default: false
- Usage: Whether the editor inserts table mode
5 years ago
------------
## pointEditUpdate
5 years ago
- Type: Function
- Default: null
- Usage: Editor table update function
5 years ago
------------
## pointEditZoom
5 years ago
- Type: Number
- Default: 1
- Usage: Editor table scaling when editing
5 years ago
------------
## userInfo
5 years ago
- Type: String
- Default: `'<i style="font-size:16px;color:#ff6a00;" class="fa fa-taxi" aria-hidden="true"></i> rabbit'`
- Usage: User information display style in the upper right corner
5 years ago
------------
## userMenuItem
5 years ago
- Type: Array
- Default: `[{url:"www.baidu.com", "icon":'<i class="fa fa-folder" aria-hidden="true"></i>', "name":"My Table"}, {url:"www.baidu.com", "icon":'<i class="fa fa-sign-out" aria-hidden="true"></i>', "name":"Sign Out"}]`
- Usage: The menu, which popped up by clicking the user information in the upper right corner
5 years ago
------------
## myFolderUrl
5 years ago
- Type: String
- Default: "www.baidu.com"
- Usage: Back button link in the upper left corner
5 years ago
------------
## config
5 years ago
- Type: Object
- Default: {}
- Usage: Table row height, column width, merged cells, formulas and other settings
5 years ago
------------
## devicePixelRatio
5 years ago
- Type: Number
- Default: window.devicePixelRatio
- Usage: Device Pixel Ratio, the larger the ratio, the higher the table resolution
5 years ago
------------
## gridKey
5 years ago
- Type: String
- Default: ""
- Usage: Form unique identifier
5 years ago
------------
## loadUrl
5 years ago
- Type: String
- Default: ""
- Usage: Configure the address of `loadUrl`, Luckysheet will request the table data through ajax. By default, all `data` in the sheet data with status 1 is loaded, and the rest of the sheet loads all fields except the `data` field.
5 years ago
------------
## loadSheetUrl
5 years ago
- Type: String
- Default: ""
- Usage: Configure the address of `loadSheetUrl`, the parameters are `gridKey` (table primary key) and `index` (sheet primary key collection, format is `[1,2,3]`), the returned data is the `data` field set of sheet
5 years ago
------------
## updateUrl
5 years ago
- Type: String
- Default: ""
- Usage: Update URL of table data
5 years ago
------------
## updateImageUrl
5 years ago
- Type: String
- Default: ""
- Usage: Update URL of thumbnail
5 years ago
------------
## allowUpdate
5 years ago
- Type: Boolean
- Default: false
- Usage: Whether to allow background updates after editing
5 years ago
------------
## functionButton
5 years ago
- Type: String
- Default: ""
- Usage: Function buttons in the upper right corner, for example`'<button id="" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">Download</button> <button id="" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">Share</button> <button id="luckysheet-share-btn-title" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">Show Data</button>'`
5 years ago
------------
## showConfigWindowResize
5 years ago
- Type: Boolean
- Default: true
- Usage: The configuration of the chart or pivot table will pop up on the right. Set whether the table will be automatically indented after popping up
5 years ago
------------
## enablePage
5 years ago
- Type: Boolean
- Default: false
- Usage: Allow next page to load
5 years ago
------------
## chartConfigChange
5 years ago
- Type: Function
- Default: null
- Usage: Custom method for triggering chart update in chart plugin
5 years ago
------------
## beforeCreateDom
5 years ago
- Type: Function
- Default: null
- Usage: Custom method before table creation
5 years ago
------------
## fireMousedown
5 years ago
- Type: Function
- Default: null
- Usage: Custom method for drilling down cell data
5 years ago
------------