| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta name="description" content="The column options API of Bootstrap Table.">
- <meta name="author" content="Zhixin Wen, and Bootstrap Table contributors">
- <meta name="generator" content="Jekyll v3.8.7">
- <meta name="keywords" content="bootstrap,table,pagination,checkbox,radio,datatables,css,css-framework,semantic,semantic-ui,bulma,material,material-design,materialize,foundation">
- <meta name="docsearch:language" content="en">
- <title>Column Options · Bootstrap Table</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"><!-- Documentation extras -->
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
- <link rel="stylesheet" href="/assets/css/docs.min.css">
- <link rel="stylesheet" href="/assets/css/style.css?m=9">
- <!-- Favicons -->
- <link rel="icon" href="/favicon.png">
- <script type="text/javascript">
- if (window !== top) // 判断当前的 window 对象是否是 top 对象
- top.location.href = window.location.href // 如果不是,将 top 对象的网址自动导向被嵌入网页的网址
- </script>
- </head>
- <body>
- <a class="skippy sr-only sr-only-focusable" href="#content">
- <span class="skippy-text">Skip to main content</span>
- </a>
- <header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
- <a class="navbar-brand mr-0 mr-md-2" href="/" aria-label="Bootstrap">
- <img src="/favicon.png" width="36" height="36">
- </a>
- <div class="navbar-nav-scroll">
- <ul class="navbar-nav bd-navbar-nav flex-row">
- <li class="nav-item">
- <a class="nav-link "
- href="/">Home</a>
- </li>
- <li class="nav-item">
- <a class="nav-link active"
- href="/docs/getting-started/introduction/">
- Documentation
- </a>
- </li>
- <li class="nav-item ">
- <a class="nav-link" href="/themes">
- Themes
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link "
- href="https://examples.bootstrap-table.com">
- Examples
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link"
- href="https://live.bootstrap-table.com"
- target="_blank">
- Online Editor
- </a>
- </li>
- <li class="nav-item ">
- <a class="nav-link" href="/news">
- News
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link"
- href="https://blog.bootstrap-table.com"
- target="_blank">
- Blog
- </a>
- </li>
- </ul>
- </div>
- <ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
- <li class="nav-item dropdown">
- <a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- v1.23.5
- </a>
- <div class="dropdown-menu dropdown-menu-md-right" aria-labelledby="bd-versions">
- <a class="dropdown-item active" href="/">Latest (1.23.5)</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.21.4/" target="_blank">v1.21.4</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.20.2/" target="_blank">v1.20.2</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.19.1/" target="_blank">v1.19.1</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.18.3/" target="_blank">v1.18.3</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.17.1/" target="_blank">v1.17.1</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.16.0/" target="_blank">v1.16.0</a>
-
- <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.15.5/" target="_blank">v1.15.5</a>
-
- </div>
- </li>
- <li class="nav-item">
- <a class="nav-link p-2" href="https://github.com/wenzhixin/bootstrap-table" target="_blank" rel="noopener" aria-label="GitHub"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 499.36" focusable="false" role="img"><path d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z" fill="currentColor" fill-rule="evenodd"/></svg>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link p-2" href="https://twitter.com/wenzhixin2010" target="_blank" rel="noopener" aria-label="Twitter"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 416.32" focusable="false" role="img"><path d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92" fill="currentColor"/></svg>
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link p-2" href="https://opencollective.com/bootstrap-table" target="_blank" rel="noopener" aria-label="Open Collective"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 40 41" focusable="false" role="img" fill="currentColor" fill-rule="evenodd"><title>Open Collective</title><path d="M32.8 21c0 2.4-.8 4.9-2 6.9l5.1 5.1c2.5-3.4 4.1-7.6 4.1-12 0-4.6-1.6-8.8-4-12.2L30.7 14c1.2 2 2 4.3 2 7z" fill-opacity=".4"/><path d="M20 33.7a12.8 12.8 0 0 1 0-25.6c2.6 0 5 .7 7 2.1L32 5a20 20 0 1 0 .1 31.9l-5-5.2a13 13 0 0 1-7 2z"/></svg>
- </a>
- </li>
- </ul>
- <a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3"
- href="/docs/getting-started/download/">Download</a>
- </header>
- <div class="container-fluid">
- <div class="row flex-xl-nowrap">
- <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
- <form class="bd-search d-flex align-items-center">
- <input type="search" class="form-control"
- id="search-input" placeholder="Search..."
- aria-label="Search for..." autocomplete="off">
- <button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"
- type="button" data-toggle="collapse" data-target="#bd-docs-nav"
- aria-controls="bd-docs-nav" aria-expanded="false"
- aria-label="Toggle docs navigation"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 30 30" width="30" height="30" focusable="false" role="img"><title>Menu</title><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" d="M4 7h22M4 15h22M4 23h22"/></svg>
- </button>
- </form>
- <nav class="collapse bd-links" id="bd-docs-nav"><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/getting-started/introduction/">
- Getting started
- </a>
- <ul class="nav bd-sidenav"><li>
- <a href="/docs/getting-started/introduction/">
- Introduction
- </a>
- </li><li>
- <a href="/docs/getting-started/download/">
- Download
- </a>
- </li><li>
- <a href="/docs/getting-started/contents/">
- Contents
- </a>
- </li><li>
- <a href="/docs/getting-started/usage/">
- Usage
- </a>
- </li><li>
- <a href="/docs/getting-started/browsers-devices/">
- Browsers & devices
- </a>
- </li><li>
- <a href="/docs/getting-started/build-tools/">
- Build tools
- </a>
- </li></ul>
- </div><div class="bd-toc-item active">
- <a class="bd-toc-link" href="/docs/api/table-options/">
- API
- </a>
- <ul class="nav bd-sidenav"><li>
- <a href="/docs/api/table-options/">
- Table Options
- </a>
- </li><li class="active bd-sidenav-active">
- <a href="/docs/api/column-options/">
- Column Options
- </a>
- </li><li>
- <a href="/docs/api/events/">
- Events
- </a>
- </li><li>
- <a href="/docs/api/methods/">
- Methods
- </a>
- </li><li>
- <a href="/docs/api/localizations/">
- Localizations
- </a>
- </li></ul>
- </div><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/extensions/addrbar/">
- Extensions
- </a>
- <ul class="nav bd-sidenav"><li>
- <a href="/docs/extensions/addrbar/">
- Addrbar
- </a>
- </li><li>
- <a href="/docs/extensions/auto-refresh/">
- Auto Refresh
- </a>
- </li><li>
- <a href="/docs/extensions/cookie/">
- Cookie
- </a>
- </li><li>
- <a href="/docs/extensions/copy-rows/">
- Copy Rows
- </a>
- </li><li>
- <a href="/docs/extensions/custom-view/">
- Custom View
- </a>
- </li><li>
- <a href="/docs/extensions/defer-url/">
- Defer URL
- </a>
- </li><li>
- <a href="/docs/extensions/editable/">
- Editable
- </a>
- </li><li>
- <a href="/docs/extensions/export/">
- Export
- </a>
- </li><li>
- <a href="/docs/extensions/filter-control/">
- Filter Control
- </a>
- </li><li>
- <a href="/docs/extensions/fixed-columns/">
- Fixed Columns
- </a>
- </li><li>
- <a href="/docs/extensions/group-by-v2/">
- Group By v2
- </a>
- </li><li>
- <a href="/docs/extensions/i18n-enhance/">
- i18n Enhance
- </a>
- </li><li>
- <a href="/docs/extensions/key-events/">
- Key Events
- </a>
- </li><li>
- <a href="/docs/extensions/mobile/">
- Mobile
- </a>
- </li><li>
- <a href="/docs/extensions/multiple-sort/">
- Multiple Sort
- </a>
- </li><li>
- <a href="/docs/extensions/page-jump-to/">
- Page Jump To
- </a>
- </li><li>
- <a href="/docs/extensions/pipeline/">
- Pipeline
- </a>
- </li><li>
- <a href="/docs/extensions/print/">
- Print
- </a>
- </li><li>
- <a href="/docs/extensions/reorder-columns/">
- Reorder Columns
- </a>
- </li><li>
- <a href="/docs/extensions/reorder-rows/">
- Reorder Rows
- </a>
- </li><li>
- <a href="/docs/extensions/resizable/">
- Resizable
- </a>
- </li><li>
- <a href="/docs/extensions/sticky-header/">
- Sticky Header
- </a>
- </li><li>
- <a href="/docs/extensions/toolbar/">
- Toolbar
- </a>
- </li><li>
- <a href="/docs/extensions/treegrid/">
- Treegrid
- </a>
- </li></ul>
- </div><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/vuejs/introduction/">
- VueJS
- </a>
- <ul class="nav bd-sidenav"><li>
- <a href="/docs/vuejs/introduction/">
- Introduction
- </a>
- </li><li>
- <a href="/docs/vuejs/browser/">
- Browser
- </a>
- </li><li>
- <a href="/docs/vuejs/webpack/">
- Webpack
- </a>
- </li><li>
- <a href="/docs/vuejs/component/">
- Component
- </a>
- </li></ul>
- </div><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/online-editor/">
- Online Editor
- </a>
- <ul class="nav bd-sidenav"></ul>
- </div><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/faq/">
- FAQ
- </a>
- <ul class="nav bd-sidenav"></ul>
- </div><div class="bd-toc-item">
- <a class="bd-toc-link" href="/docs/about/overview/">
- About
- </a>
- <ul class="nav bd-sidenav"><li>
- <a href="/docs/about/overview/">
- Overview
- </a>
- </li><li>
- <a href="/docs/about/team/">
- Team
- </a>
- </li><li>
- <a href="/docs/about/license/">
- License
- </a>
- </li><li>
- <a href="/docs/about/translations/">
- Translations
- </a>
- </li></ul>
- </div></nav>
- </div>
-
- <div class="d-none d-xl-block col-xl-2 bd-toc">
- <ul class="section-nav">
- <li class="toc-entry toc-h2"><a href="#align">align</a></li>
- <li class="toc-entry toc-h2"><a href="#cardvisible">cardVisible</a></li>
- <li class="toc-entry toc-h2"><a href="#cellstyle">cellStyle</a></li>
- <li class="toc-entry toc-h2"><a href="#checkbox">checkbox</a></li>
- <li class="toc-entry toc-h2"><a href="#checkboxenabled">checkboxEnabled</a></li>
- <li class="toc-entry toc-h2"><a href="#class">class</a></li>
- <li class="toc-entry toc-h2"><a href="#clicktoselect">clickToSelect</a></li>
- <li class="toc-entry toc-h2"><a href="#colspan">colspan</a></li>
- <li class="toc-entry toc-h2"><a href="#detailformatter">detailFormatter</a></li>
- <li class="toc-entry toc-h2"><a href="#escape">escape</a></li>
- <li class="toc-entry toc-h2"><a href="#events">events</a></li>
- <li class="toc-entry toc-h2"><a href="#falign">falign</a></li>
- <li class="toc-entry toc-h2"><a href="#field">field</a></li>
- <li class="toc-entry toc-h2"><a href="#footerformatter">footerFormatter</a></li>
- <li class="toc-entry toc-h2"><a href="#footerstyle">footerStyle</a></li>
- <li class="toc-entry toc-h2"><a href="#formatter">formatter</a></li>
- <li class="toc-entry toc-h2"><a href="#halign">halign</a></li>
- <li class="toc-entry toc-h2"><a href="#order">order</a></li>
- <li class="toc-entry toc-h2"><a href="#radio">radio</a></li>
- <li class="toc-entry toc-h2"><a href="#rowspan">rowspan</a></li>
- <li class="toc-entry toc-h2"><a href="#searchable">searchable</a></li>
- <li class="toc-entry toc-h2"><a href="#searchformatter">searchFormatter</a></li>
- <li class="toc-entry toc-h2"><a href="#searchhighlightformatter">searchHighlightFormatter</a></li>
- <li class="toc-entry toc-h2"><a href="#showselecttitle">showSelectTitle</a></li>
- <li class="toc-entry toc-h2"><a href="#sortable">sortable</a></li>
- <li class="toc-entry toc-h2"><a href="#sorter">sorter</a></li>
- <li class="toc-entry toc-h2"><a href="#sortname">sortName</a></li>
- <li class="toc-entry toc-h2"><a href="#switchable">switchable</a></li>
- <li class="toc-entry toc-h2"><a href="#switchablelabel">switchableLabel</a></li>
- <li class="toc-entry toc-h2"><a href="#title">title</a></li>
- <li class="toc-entry toc-h2"><a href="#titletooltip">titleTooltip</a></li>
- <li class="toc-entry toc-h2"><a href="#valign">valign</a></li>
- <li class="toc-entry toc-h2"><a href="#visible">visible</a></li>
- <li class="toc-entry toc-h2"><a href="#width">width</a></li>
- <li class="toc-entry toc-h2"><a href="#widthunit">widthUnit</a></li>
- </ul>
- </div>
-
- <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content api" role="main">
- <div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
- <a class="btn btn-sm btn-bd-light mb-2 mb-md-0"
-
- href="https://github.com/wenzhixin/bootstrap-table/blob/develop/site/docs/api/column-options.md"
-
- title="View and edit this file on GitHub" target="_blank" rel="noopener">
- View on GitHub
- </a>
- <h1 class="bd-title" id="content">
- Column Options
- </h1>
- </div>
- <p class="bd-lead">The column options API of Bootstrap Table.</p>
- <div id="gg"></div>
- <p>The column options is defined in <code class="highlighter-rouge">jQuery.fn.bootstrapTable.columnDefaults</code>.</p>
- <h2 id="align">align</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-align</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how to align the column data. <code class="highlighter-rouge">'left'</code>, <code class="highlighter-rouge">'right'</code>, <code class="highlighter-rouge">'center'</code> can be used.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/aligning-columns.html">Aligning Columns</a></p>
- </li>
- </ul>
- <h2 id="cardvisible">cardVisible</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-card-visible</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">false</code> to hide the columns item in the card view state.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/card-visible.html">Card Visible</a></p>
- </li>
- </ul>
- <h2 id="cellstyle">cellStyle</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-cell-style</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The cell style formatter function, take four parameters:</p>
- <ul>
- <li><code class="highlighter-rouge">value</code>: the field value.</li>
- <li><code class="highlighter-rouge">row</code>: the row record data.</li>
- <li><code class="highlighter-rouge">index</code>: the row index.</li>
- <li><code class="highlighter-rouge">field</code>: the row field.</li>
- </ul>
- <p>Support classes or css.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/cell-style.html">Cell Style</a></p>
- </li>
- </ul>
- <h2 id="checkbox">checkbox</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-checkbox</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to show a checkbox. The checkbox column has a fixed width.</p>
- <p>If a value is given, the checkbox is automatically checked.
- Its also possible to check/uncheck the checkbox by using a formatter (return <code class="highlighter-rouge">true</code> to check, return <code class="highlighter-rouge">false</code> to uncheck).</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">false</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/checkbox.html">Column Checkbox</a></p>
- </li>
- </ul>
- <h2 id="checkboxenabled">checkboxEnabled</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-checkbox-enabled</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">false</code> to disable the checkboxes/radio boxes.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/checkbox-enabled.html">Checkbox Enabled</a> and <a href="https://examples.bootstrap-table.com/#column-options/checkbox-disabled.html">Checkbox Disabled</a></p>
- </li>
- </ul>
- <h2 id="class">class</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">class | data-class</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The column class name.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/class.html">Column Class</a></p>
- </li>
- </ul>
- <h2 id="clicktoselect">clickToSelect</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-click-to-select</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to select the checkbox or radio box when clicking rows.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/click-to-select.html">Click to Select</a></p>
- </li>
- </ul>
- <h2 id="colspan">colspan</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">colspan | data-colspan</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Number</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how many columns a cell should take up.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html">Rowspan Colspan</a></p>
- </li>
- </ul>
- <h2 id="detailformatter">detailFormatter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-detail-formatter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Format your detail view when <code class="highlighter-rouge">detailView</code> and <code class="highlighter-rouge">detailViewByClick</code> is set to <code class="highlighter-rouge">true</code>. Return a <code class="highlighter-rouge">String</code> and it will be appended into the detail view cell, optionally render the element directly using the third parameter, which is a jQuery element of the target cell.</p>
- <p>Fallback is the detail-formatter of the table.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">function(index, row, $element) { return '' }</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/detail-formatter.html">Detail Formatter</a></p>
- </li>
- </ul>
- <h2 id="escape">escape</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-escape</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Escapes a string for insertion into HTML, replacing &, <, >, “, `, and ‘ characters.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/escape.html">Column Escape</a></p>
- </li>
- </ul>
- <h2 id="events">events</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-events</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Object</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The cell events listener, when you use formatter function, take four parameters:</p>
- <ul>
- <li><code class="highlighter-rouge">event</code>: the jQuery event.</li>
- <li><code class="highlighter-rouge">value</code>: the field value.</li>
- <li><code class="highlighter-rouge">row</code>: the row record data.</li>
- <li><code class="highlighter-rouge">index</code>: the row index.</li>
- </ul>
- <p>Example code:</p>
- </li>
- </ul>
- <figure class="highlight"><pre><code class="language-html" data-lang="html"> <span class="nt"><th</span> <span class="err">..</span> <span class="na">data-events=</span><span class="s">"operateEvent"</span><span class="nt">></span>
- var operateEvents = {
- 'click .like': function (e, value, row, index) {}
- }
- </code></pre></figure>
- <ul>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/events.html">Column Events</a>
- <h2 id="falign">falign</h2>
- </li>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-falign</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how to align the table footer. <code class="highlighter-rouge">'left'</code>, <code class="highlighter-rouge">'right'</code>, <code class="highlighter-rouge">'center'</code> can be used.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/aligning-footer.html">Aligning Footer</a></li>
- </ul>
- <h2 id="field">field</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-field</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The column field name. This field must be unique, or some unknown problems may occur.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/field.html">Column Field</a></p>
- </li>
- </ul>
- <h2 id="footerformatter">footerFormatter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-footer-formatter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The context (this) is the column Object.</p>
- <p>The function, takes two parameters:</p>
- <ul>
- <li><code class="highlighter-rouge">data</code>: Array of all the data rows.</li>
- <li><code class="highlighter-rouge">value</code>: If footer data is set, the value of the footer column.</li>
- </ul>
- <p>The expected return data type is <code class="highlighter-rouge">jQuery</code>, <code class="highlighter-rouge">String</code> or <code class="highlighter-rouge">HTMLElement</code>. Other types will be forced to the <code class="highlighter-rouge">String</code> type.</p>
- <p>If you fetch data from a server and set the footer value from the server response, please use the <code class="highlighter-rouge">footerField</code> Option.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/footer-formatter.html">Footer Formatter</a></p>
- </li>
- </ul>
- <h2 id="footerstyle">footerStyle</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-footer-style</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The footer style formatter function, takes one parameter:</p>
- <ul>
- <li><code class="highlighter-rouge">column</code>: the column object.</li>
- </ul>
- <p>Support <code class="highlighter-rouge">classes</code> or <code class="highlighter-rouge">css</code>. Example usage:</p>
- </li>
- </ul>
- <figure class="highlight"><pre><code class="language-javascript" data-lang="javascript"> <span class="kd">function</span> <span class="nx">footerStyle</span><span class="p">(</span><span class="nx">column</span><span class="p">)</span> <span class="p">{</span>
- <span class="k">return</span> <span class="p">{</span>
- <span class="na">css</span><span class="p">:</span> <span class="p">{</span> <span class="dl">'</span><span class="s1">font-weight</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">normal</span><span class="dl">'</span> <span class="p">},</span>
- <span class="na">classes</span><span class="p">:</span> <span class="dl">'</span><span class="s1">my-class</span><span class="dl">'</span>
- <span class="p">}</span>
- <span class="p">}</span>
- </code></pre></figure>
- <ul>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">{}</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#options/footer-style.html">Footer Style</a></p>
- </li>
- </ul>
- <h2 id="formatter">formatter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-formatter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The context (this) is the column Object.</p>
- <p>The cell formatter function, take four parameters:</p>
- <ul>
- <li><code class="highlighter-rouge">value</code>: the field value.</li>
- <li><code class="highlighter-rouge">row</code>: the row record data.</li>
- <li><code class="highlighter-rouge">index</code>: the row index.</li>
- <li><code class="highlighter-rouge">field</code>: the row field.</li>
- </ul>
- <p>The expected return data type is <code class="highlighter-rouge">jQuery</code>, <code class="highlighter-rouge">String</code> or <code class="highlighter-rouge">HTMLElement</code>. Other types will be forced to the <code class="highlighter-rouge">String</code> type.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/formatter.html">Column Formatter</a></p>
- </li>
- </ul>
- <h2 id="halign">halign</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-halign</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how to align the table header. <code class="highlighter-rouge">'left'</code>, <code class="highlighter-rouge">'right'</code>, <code class="highlighter-rouge">'center'</code> can be used.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/aligning-columns.html">Aligning Columns</a></p>
- </li>
- </ul>
- <h2 id="order">order</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-order</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The default sort order, can only be <code class="highlighter-rouge">'asc'</code> or <code class="highlighter-rouge">'desc'</code>.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">'asc'</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/sort-name-order.html">Sort Name Order</a></p>
- </li>
- </ul>
- <h2 id="radio">radio</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-radio</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to show a radio. The radio column has a fixed width.</p>
- <p>If a value is given, the checkbox is automatically checked.
- Its also possible to check/uncheck the radio by using a formatter (return <code class="highlighter-rouge">true</code> to check, return <code class="highlighter-rouge">false</code> to uncheck).</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">false</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/radio.html">Column Radio</a></p>
- </li>
- </ul>
- <h2 id="rowspan">rowspan</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">rowspan | data-rowspan</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Number</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how many rows a cell should take up.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html">Rowspan Colspan</a></p>
- </li>
- </ul>
- <h2 id="searchable">searchable</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-searchable</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to search data for this column.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/searchable.html">Column Searchable</a></p>
- </li>
- </ul>
- <h2 id="searchformatter">searchFormatter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-search-formatter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to search using formatted data.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/search-formatter.html">Search Formatter</a></p>
- </li>
- </ul>
- <h2 id="searchhighlightformatter">searchHighlightFormatter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-search-highlight-formatter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean|Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Define a <code class="highlighter-rouge">function</code> to use a custom highlight formatter for the <a href="https://bootstrap-table.com/docs/api/table-options/#searchhighlight">search highlight</a> option.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/search-highlight-formatter.html">Searchable Highlight Formatter</a></p>
- </li>
- </ul>
- <h2 id="showselecttitle">showSelectTitle</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-show-select-title</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to show the title of column with ‘radio’ or ‘singleSelect’ ‘checkbox’ option.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">false</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/show-select-title.html">Show Select Title</a></p>
- </li>
- </ul>
- <h2 id="sortable">sortable</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-sortable</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">true</code> to allow the column can be sorted.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">false</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/sortable.html">Column Sortable</a></p>
- </li>
- </ul>
- <h2 id="sorter">sorter</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-sorter</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Function</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The custom field sort function that is used to do local sorting, take four parameters:</p>
- <ul>
- <li><code class="highlighter-rouge">fieldA</code>: the first field value.</li>
- <li><code class="highlighter-rouge">fieldB</code>: the second field value.</li>
- <li><code class="highlighter-rouge">rowA</code>: the first row.</li>
- <li><code class="highlighter-rouge">rowB</code>: the second row.</li>
- </ul>
- <p>Expected return values: <code class="highlighter-rouge">-1, 0, 1</code>.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/sorter.html">Column Sorter</a></p>
- </li>
- </ul>
- <h2 id="sortname">sortName</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-sort-name</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Provide a customizable sort-name, not the default sort-name in the header, or the field name of the column. For example, a column might display the value of fieldName of ‘html’ such as <code class="highlighter-rouge"><b><span style="color:red">abc</span></b></code>, but a fieldName to sort is ‘content’ with the value of <code class="highlighter-rouge">'abc'</code>.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/sort-name-order.html">Sort Name Order</a></p>
- </li>
- </ul>
- <h2 id="switchable">switchable</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-switchable</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">false</code> to disable the switchable of columns item.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/switchable.html">Column Switchable</a></p>
- </li>
- </ul>
- <h2 id="switchablelabel">switchableLabel</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-switchable-label</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The label of the switchable column in the dropdown. If not specified uses the column title.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/switchable.html">Column Switchable</a></p>
- </li>
- </ul>
- <h2 id="title">title</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-title</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The column title text.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/title.html">Column Title</a></p>
- </li>
- </ul>
- <h2 id="titletooltip">titleTooltip</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-title-tooltip</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The column title tooltip text. This option also supports the title HTML attribute.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/title-tooltip.html">Title Tooltip</a></p>
- </li>
- </ul>
- <h2 id="valign">valign</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-valign</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Indicate how to align the cell data. <code class="highlighter-rouge">'top'</code>, <code class="highlighter-rouge">'middle'</code>, <code class="highlighter-rouge">'bottom'</code> can be used.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/aligning-columns.html">Aligning Columns</a></p>
- </li>
- </ul>
- <h2 id="visible">visible</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-visible</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Boolean</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Set <code class="highlighter-rouge">false</code> to hide the columns item.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">true</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/visible.html">Column Visible</a></p>
- </li>
- </ul>
- <h2 id="width">width</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-width</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">Number</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>The width of the column. If not defined, the width will auto expand to fit its contents. Though if the table is left responsive and sized too small, this <code class="highlighter-rouge">'width'</code> might be ignored (use min/max-width via class or such then). The default used unit is ‘px’. Use <code class="highlighter-rouge">widthUnit</code> to change it!</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">undefined</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/width.html">Column Width</a></p>
- </li>
- </ul>
- <h2 id="widthunit">widthUnit</h2>
- <ul>
- <li>
- <p><strong>Attribute:</strong> <code class="highlighter-rouge">data-width-unit</code></p>
- </li>
- <li>
- <p><strong>Type:</strong> <code class="highlighter-rouge">String</code></p>
- </li>
- <li>
- <p><strong>Detail:</strong></p>
- <p>Defines the unit which is used for the option <code class="highlighter-rouge">width</code>.</p>
- </li>
- <li>
- <p><strong>Default:</strong> <code class="highlighter-rouge">px</code></p>
- </li>
- <li>
- <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#column-options/width-unit.html">Width Unit</a></p>
- </li>
- </ul>
- </main>
- </div>
- </div>
- <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"></script>
- <script async defer src="https://buttons.github.io/buttons.js"></script><script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
- <script>
- $(function () {
- $('.bd-content.api a').attr('target', '_blank')
- })
- </script><script src="https://gg.wenzhixin.net.cn/bootstrap-table/gg.js"></script>
- <script src="/assets/js/docs.min.js?m=1"></script>
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-132747866-1"></script>
- <script>
- window.dataLayer = window.dataLayer || []
- function gtag() {window.dataLayer.push(arguments)}
- gtag('js', new Date())
- gtag('config', 'UA-132747866-1')
- </script>
- </body>
- </html>
|