快速入门
表格选项
-
ajax
ajaxOptions
buttons
buttonsAlign
buttonsClass
buttonsOrder
buttonsPrefix
buttonsToolbar
cache
cardView
checkboxHeader
classes
clickToSelect
columns
contentType
customSearch
customSort
data
dataField
dataType
detailFilter
detailFormatter
detailView
detailViewAlign
detailViewByClick
detailViewIcon
escape
filterOptions
footerField
footerStyle
headerStyle
height
icons
iconSize
iconsPrefix
idField
ignoreClickToSelectOn
loadingFontSize
loadingTemplate
locale
maintainMetaData
method
minimumCountColumns
multipleSelectRow
pageList
pageNumber
pageSize
pagination
paginationDetailHAlign
paginationHAlign
paginationLoop
paginationNextText
paginationPagesBySide
paginationParts
paginationPreText
paginationSuccessivelySize
paginationUseIntermediate
paginationVAlign
queryParams
queryParamsType
regexSearch
rememberOrder
responseHandler
rowAttributes
rowStyle
search
searchAccentNeutralise
searchAlign
searchHighlight
searchOnEnterKey
searchSelector
searchText
searchTimeOut
selectItemName
serverSort
showButtonIcons
showButtonText
showColumns
showColumnsSearch
showColumnsToggleAll
showExtendedPagination
showFooter
showFullscreen
showHeader
showPaginationSwitch
showRefresh
showSearchButton
showSearchClearButton
showToggle
sidePagination
silentSort
singleSelect
smartDisplay
sortable
sortClass
sortEmptyLast
sortName
sortOrder
sortReset
sortResetPage
sortStable
strictSearch
theadClasses
toolbar
toolbarAlign
totalField
totalNotFiltered
totalNotFilteredField
totalRows
trimOnSearch
undefinedText
uniqueId
url
virtualScroll
virtualScrollItemHeight
visibleSearch
列表选项
align
cardVisible
cellStyle
checkbox
checkboxEnabled
class
clickToSelect
colspan
detailFormatter
escape
events
falign
field
footerFormatter
formatter
halign
order
radio
rowspan
searchable
searchFormatter
searchHighlightFormatter
showSelectTitle
sortable
sorter
sortName
switchable
title
titleTooltip
valign
visible
width
widthUnit
事件
onAll
onCheck
onCheckAll
onCheckSome
onClickCell
onClickRow
onCollapseRow
onColumnSwitch
onColumnSwitchAll
onDblClickCell
onDblClickRow
onExpandRow
onLoadError
onLoadSuccess
onPageChange
onPostBody
onPostFooter
onPostHeader
onPreBody
onRefresh
onRefreshOptions
onResetView
onScrollBody
onSearch
onSort
onToggle
onTogglePagination
onUncheck
onUncheckAll
onUncheckSome
onVirtualScroll
方法
append
check
checkAll
checkBy
checkInvert
collapseAllRows
collapseRow
collapseRowByUniqueId
destroy
expandAllRows
expandRow
expandRowByUniqueId
filterBy
getData
getHiddenColumns
getHiddenRows
getOptions
getRowByUniqueId
getScrollPosition
getSelections
getVisibleColumns
hideAllColumns
hideColumn
hideLoading
hideRow
insertRow
load
mergeCells
nextPage
prepend
prevPage
refresh
refreshOptions
remove
removeAll
removeByUniqueId
resetSearch
resetView
scrollTo
selectPage
showAllColumns
showColumn
showLoading
showRow
toggleDetailView
toggleFullscreen
togglePagination
toggleView
uncheck
uncheckAll
uncheckBy
updateByUniqueId
updateCell
updateCellByUniqueId
updateColumnTitle
updateFormatText
updateRow
本地化
扩展
地址栏
自动刷新
Cookie
复制行
自定义视图
延迟Url
编辑表
导出
过滤器控制
固定列
按v2分组
I18n 增强
关键事件
移动
多重排序
页面跳转
Pipeline
打印
重新排序列
重新排序行
调整大小
粘性标题(Sticky Header)
工具条
树形网格(Table Treegrid)
buttons - Bootstrap-table中文文档 - 笔下光年
网站首页
buttons
使用 `buttons` 添加可高度配置和排序的自定义按钮。 - 属性: `data-buttons` - 类型: `Function` - 详情: 此选项允许在 "buttons bar"(表格右上方)中创建/添加自定义按钮。这些按钮可以用表格选项按钮排序。顺序,事件的使用键/名称应该用于此! 自定义按钮高度可配置,存在以下选项: - `text` - 描述: This options is used for the showButtonText table option. - 类型: `String` - `icon` - 描述: This option is used for the showButtonIcons table option. - 类型: `String` - Only needs the icon class e.g. `fa-users` - `render` - 描述: Set this option to false to hide the button by default, the button is visible again when you add the data attribute `data-show-BUTTONNAME="true"`. - `attributes` - 描述: This option allows adding additional html attributes e.g. `title` - 类型: `Object` - 示例: `{title: 'Button title'}` - `html` - 描述: If you don’t want to autogenerate the html, you can use this option to insert your custom html. The `event` option only works if you custom HTML contains `name="BUTTONNAME"`. If this option is used the following options will be ignored: - `text` - `icon` - `attributes` - 类型: `Function|String` - `event` - 描述: Should be used if you want to add an event to the button - 类型: `Function|Object|String` 可以通过三种方式配置 `event` 选项。一个带有点击事件的事件: ```javascript { 'event': () => { } } ``` One event with a self-defined event type: ```javascript { 'event': { 'mouseenter': () => { } } } ``` Multiple events with self-defined event types: ```javascript { 'event': { 'click': () => { }, 'mouseenter': () => { }, 'mouseleave': () => { } } } ``` Hint: Instead of inline functions, you also can use function names. A configured custom button could look like this: ```javascript { btnRemoveEvenRows: { 'text': 'Remove even Rows', 'icon': 'fa-trash', 'event': () => { //DO STUFF TO REMOVE EVEN ROWS }, 'attributes': { 'title': 'Remove all rows which has a even id' } } } ``` 默认值: `{}`
上一篇:
ajaxOptions
下一篇:
buttonsAlign