zb-tables.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  1. <template>
  2. <!-- #ifdef H5 || APP-PLUS -->
  3. <view :class="['zb-table','zb-table-fixed-header',!border&&(bodyTableLeft>50||headerTableLeft>50)&&'scroll-left-fixed']">
  4. <view class="zb-table-content" style="flex: 1">
  5. <view class="zb-table-scroll" style="height: 100%;">
  6. <template v-if="showHeader">
  7. <view class="zb-table-header top-header-uni" :style="{paddingRight:`${scrollbarSize}rpx`}"
  8. >
  9. <scroll-view class="zb-table-headers"
  10. @touchmove.stop="getMove"
  11. @scroll="handleTableScrollLeft"
  12. scroll-x="true"
  13. scroll-y="false"
  14. id="tableHeaders"
  15. scroll-anchoring="true"
  16. :scroll-left="headerTableLeft"
  17. style="
  18. height: 100%">
  19. <view class="zb-table-fixed" >
  20. <view class="zb-table-thead" style="position: relative;" >
  21. <view class="item-tr">
  22. <view
  23. @click.stop="sortAction(item,index)"
  24. class="item-th"
  25. :style="[{
  26. width:`${item.width?item.width:'200'}rpx`,
  27. flex:index===transColumns.length-1?1:'none',
  28. minWidth:`${item.width?item.width:'200'}rpx`,
  29. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  30. borderRight:`${(scrollbarSize&&index===transColumns.length-1)?'':border?'2rpx solid #e8e8e8':''}`,
  31. borderTop:`${border?'2rpx solid #e8e8e8':''}`,
  32. textAlign:item.align||'left',
  33. paddingRight:`${item.paddingRight?item.paddingRight:'8'}rpx`,
  34. },getHeaderCellStyle(item,index)]"
  35. v-for="(item,index) in transColumns" :key="index">
  36. <template v-if="item.type==='selection'">
  37. <view class="checkbox-item">
  38. <tableCheckbox
  39. :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
  40. </view>
  41. </template>
  42. <template v-else>
  43. {{ item.label }}
  44. <block v-if="item.manfen">/{{item.manfen}}</block>
  45. <view class="sorter-table" v-if="item.sorter">
  46. <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
  47. <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
  48. </view>
  49. </template>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </scroll-view>
  55. </view>
  56. </template>
  57. <template v-if="!data.length">
  58. <view class="no-data">暂无数据~~</view>
  59. </template>
  60. <scroll-view
  61. class="zb-table-body" ref="tableBody" scroll-x="true" scroll-y="true" id="tableBody"
  62. :lower-threshold="40"
  63. :upper-threshold="10"
  64. @touchmove.stop="getMove"
  65. @scrolltolower="scrolltolower"
  66. @scrolltoupper="(e)=>debounce(scrollToLeft)(e)"
  67. @scroll="handleBodyScroll" :scroll-left="bodyTableLeft" :scroll-top="bodyScrollTop"
  68. :style=" `height: calc(100% - ${showSummary?160:80}rpx)`" >
  69. <view class="zb-table-fixed">
  70. <view class="zb-table-tbody">
  71. <view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
  72. @click.stop="rowClick(item,index)"
  73. v-for="(item,index) in transData" :key="item.key" >
  74. <view
  75. :style="[{
  76. width:`${ite.width?ite.width:'200'}rpx`,
  77. flex:i===transColumns.length-1?1:'none',
  78. minWidth:`${ite.width?ite.width:'200'}rpx`,
  79. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  80. textAlign:ite.align||'left',
  81. },cellStyle&&getCellStyle(item,ite,index,i)]"
  82. :class="['item-td',stripe?(index % 2) != 0?'odd':'even':'']"
  83. v-for="(ite,i) in transColumns" :key="i">
  84. <template v-if="ite.type==='operation'">
  85. <view style="display: flex;align-items: center;height: 100%">
  86. <view
  87. v-for="ren,ind in permission(item,ite.renders,index)"
  88. :key="ind"
  89. @click.stop="$emit(ren.func,item,index)"
  90. :style="{
  91. display:'flex',
  92. alignItems: 'center',
  93. marginRight:ite.renders.length>1?'16rpx':'0'
  94. }">
  95. <template v-if="ren.type==='custom'">
  96. <view :class="ren.class||''" style="cursor: pointer">
  97. {{ren.name}}
  98. </view>
  99. </template>
  100. <template v-else>
  101. <button
  102. :class="ren.class||''"
  103. :type="ren.type||'primary'" :size="ren.size||'mini'">{{ren.name}}</button>
  104. </template>
  105. </view>
  106. </view>
  107. </template>
  108. <!-- 格式化处理 -->
  109. <template v-else-if="ite.type==='format'">
  110. <view>{{kayType(itemFilter(item,ite),parameter[ite.key])}}</view>
  111. </template>
  112. <template v-else-if="ite.type==='selection'">
  113. <view class="checkbox-item">
  114. <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)" :cellData="item" :checked="item.checked"/>
  115. </view>
  116. </template>
  117. <template v-else-if="ite.type==='index'">
  118. {{index+1}}
  119. </template>
  120. <template v-else-if="ite.type==='img'">
  121. <view class="checkbox-item">
  122. <block v-if="item[ite.name]" >
  123. <image v-for="(pite,pidx) in getPhotoFn(item[ite.name])" :key="pidx"
  124. @click.stop="previewImage(getPhotoFn(item[ite.name]),pite,pidx)"
  125. :show-menu-by-longpress="false"
  126. :src="pite" style="width: 80rpx;height:60rpx; " mode="aspectFit"></image>
  127. </block>
  128. <!-- <image
  129. @click.stop="previewImage(item,item[ite.name],index)"
  130. v-if="item[ite.name]"
  131. :show-menu-by-longpress="false"
  132. :src="item[ite.name]" style="width: 80rpx;height:60rpx; " mode="aspectFit"></image> -->
  133. <text v-else>{{ite.emptyString}}</text>
  134. </view>
  135. </template>
  136. <template v-else>
  137. <!-- {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
  138. {{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
  139. </template>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </scroll-view>
  145. <table-h5-summary
  146. :scrollbarSize="scrollbarSize"
  147. :data="data"
  148. :handleFooterTableScrollLeft="handleFooterTableScrollLeft"
  149. :headerFooterTableLeft="headerFooterTableLeft"
  150. v-if="showSummary"
  151. :showSummary="showSummary"
  152. :transColumns="transColumns"
  153. :border="border"
  154. :summary-method="summaryMethod"
  155. :sumText="sumText"
  156. :fixedLeftColumns="fixedLeftColumns"/>
  157. </view>
  158. <view class="zb-table-fixed-left"
  159. v-if="isFixedLeft"
  160. :style=" {height: `calc(100% - ${scrollbarSize}rpx)`}"
  161. >
  162. <template v-if="showHeader">
  163. <view class="zb-table-header" style="display: flex">
  164. <view class="item-tr"
  165. style=""
  166. @click.stop="rowClick(item,index)"
  167. v-for="(item,index) in fixedLeftColumns" :key="index">
  168. <view
  169. :style="{
  170. width:`${item.width?item.width:'200'}rpx`,
  171. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  172. borderTop:`${border?'2rpx solid #e8e8e8':''}`,
  173. textAlign:item.align||'left'
  174. }"
  175. @click.stop="sortAction(item,index)"
  176. class="item-th"
  177. >
  178. <template v-if="item.type==='selection'">
  179. <view class="checkbox-item">
  180. <tableCheckbox
  181. :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
  182. </view>
  183. </template>
  184. <template v-else>
  185. {{ item.label }}
  186. <block v-if="item.manfen">/{{item.manfen}}</block>
  187. <view class="sorter-table" v-if="item.sorter">
  188. <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
  189. <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
  190. </view>
  191. </template>
  192. </view>
  193. </view>
  194. </view>
  195. </template>
  196. <scroll-view
  197. scroll-y="true"
  198. id="leftTableFixed"
  199. :upper-threshold="15"
  200. @scrolltoupper="(e)=>scrollToFixedLeft(e)"
  201. @scroll="leftFixedScrollAction"
  202. :scroll-top="leftFiexScrollTop"
  203. class="zb-table-body-inner"
  204. :style=" `height: calc(100% - ${showSummary?160:80}rpx)`">
  205. <view class="zb-table-fixed">
  206. <view class="zb-table-tbody">
  207. <view
  208. :class="['item-tr',stripe?(i % 2) != 0?'odd':'even':'',highlight&&isHighlight(ite,i)?'current-row':'']"
  209. v-for="(ite,i) in transData"
  210. @click.stop="rowClick(ite,i)"
  211. :key="ite.key"
  212. style="">
  213. <view class='item-td'
  214. :style="[{
  215. width:`${item.width?item.width:'200'}rpx`,
  216. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  217. textAlign:item.align||'left'
  218. },cellStyle&&getCellStyle(ite,item,i,index)]"
  219. :key="index"
  220. v-for="(item,index) in fixedLeftColumns">
  221. <template v-if="item.type==='selection'">
  222. <view class="checkbox-item">
  223. <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,ite)" :cellData="ite" :checked="ite.checked"/>
  224. </view>
  225. </template>
  226. <template v-else-if="item.type==='index'">
  227. {{i+1}}
  228. </template>
  229. <template v-else>
  230. {{ite[item.name]||item.emptyString}}
  231. </template>
  232. </view>
  233. </view>
  234. </view>
  235. </view>
  236. </scroll-view>
  237. <table-side-summary
  238. :scrollbarSize="scrollbarSize"
  239. v-if="showSummary&&!(scrollbarSize>0)"
  240. :data="data"
  241. :showSummary="showSummary"
  242. :transColumns="transColumns"
  243. :border="border"
  244. :summary-method="summaryMethod"
  245. :sumText="sumText"
  246. :fixedLeftColumns="fixedLeftColumns"/>
  247. </view>
  248. </view>
  249. <zb-load-more v-if="isLoadMore&&!completeLoading"/>
  250. </view>
  251. <!-- #endif -->
  252. <!-- #ifndef H5 || APP-PLUS -->
  253. <view class="zb-table-applet">
  254. <view class="zb-table-content">
  255. <scroll-view
  256. <!-- #ifdef MP-ALIPAY -->
  257. @scroll="scrollAlipay"
  258. <!-- #endif -->
  259. @scrolltolower="scrolltolower"
  260. <!-- #ifdef MP-ALIPAY -->
  261. style=" height: 100%;overflow-x:scroll"
  262. <!-- #endif -->
  263. <!-- #ifndef MP-ALIPAY -->
  264. style=" height: 100%"
  265. <!-- #endif -->
  266. scroll-y="true"
  267. scroll-x="true">
  268. <view class="zb-table-scroll" >
  269. <template v-if="showHeader">
  270. <view class="zb-table-header top-header-uni" style="">
  271. <view class="zb-table-fixed" >
  272. <view class="zb-table-thead" style="position: relative;" >
  273. <view class="item-tr">
  274. <view
  275. @click.stop="sortAction(item,index)"
  276. :class="['item-th',index <fixedLeftColumns.length&&'zb-stick-side']"
  277. :style="{
  278. left:`${item.left}rpx`,
  279. width:`${item.width?item.width:'200'}rpx`,
  280. flex:index===transColumns.length-1?1:'none',
  281. minWidth:`${item.width?item.width:'200'}rpx`,
  282. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  283. borderTop:`${border?'2rpx solid #e8e8e8':''}`,
  284. textAlign:item.align||'left'
  285. }"
  286. v-for="(item,index) in transColumns" :key="index">
  287. <template v-if="item.type==='selection'">
  288. <view class="checkbox-item">
  289. <tableCheckbox
  290. :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
  291. </view>
  292. </template>
  293. <template v-else>
  294. {{ item.label||'' }}
  295. <block v-if="item.manfen">/{{item.manfen}}</block>
  296. <view class="sorter-table" v-if="item.sorter">
  297. <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
  298. <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
  299. </view>
  300. </template>
  301. </view>
  302. </view>
  303. </view>
  304. </view>
  305. </view>
  306. </template>
  307. <template v-if="!data.length">
  308. <view class="no-data">暂无数据~~</view>
  309. </template>
  310. <view class="zb-table-fixed">
  311. <view class="zb-table-tbody">
  312. <view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
  313. @click.stop="rowClick(item,index)"
  314. v-for="(item,index) in transData" :key="item.key" >
  315. <view
  316. :style="[{
  317. left:`${ite.left}rpx`,
  318. width:`${ite.width?ite.width:'200'}rpx`,
  319. flex:i===transColumns.length-1?1:'none',
  320. minWidth:`${ite.width?ite.width:'200'}rpx`,
  321. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  322. textAlign:ite.align||'left',
  323. },getCellStyle(item,ite,index,i)]"
  324. :class="['item-td', i <fixedLeftColumns.length&&'zb-stick-side',stripe?(index % 2) != 0?'odd':'even':'']"
  325. v-for="(ite,i) in transColumns" :key="i">
  326. <template v-if="ite.type==='operation'">
  327. <view style="display: flex;align-items: center;height: 100%">
  328. <view
  329. v-for="ren,ind in permission(item,ite.renders,index)"
  330. :key="ind"
  331. @click.stop="$emit(ren.func,item,index)"
  332. :style="{
  333. display:'flex',
  334. alignItems: 'center',
  335. marginRight:ite.renders.length>1?'16rpx':'0'
  336. }">
  337. <template v-if="ren.type==='custom'">
  338. <view :class="ren.class||''" style="cursor: pointer">
  339. {{ren.name}}
  340. </view>
  341. </template>
  342. <template v-else>
  343. <button
  344. :class="ren.class||''"
  345. :type="ren.type||'primary'" :size="ren.size||'mini'">{{ren.name}}</button>
  346. </template>
  347. </view>
  348. </view>
  349. </template>
  350. <!-- 格式化处理 -->
  351. <template v-else-if="ite.type==='format'">
  352. <view>{{kayType(itemFilter(item,ite),parameter[ite.key])}}</view>
  353. </template>
  354. <template v-else-if="ite.type==='selection'">
  355. <view class="checkbox-item">
  356. <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)" :cellData="item" :checked="item.checked"/>
  357. </view>
  358. </template>
  359. <template v-else-if="ite.type==='img'">
  360. <block v-if="item[ite.name]" >
  361. <image v-for="(pite,pidx) in getPhotoFn(item[ite.name])" :key="pidx"
  362. @click.stop="previewImage(getPhotoFn(item[ite.name]),pite,pidx)"
  363. :show-menu-by-longpress="false"
  364. :src="pite" style="width: 80rpx;height:60rpx; " mode="aspectFit"></image>
  365. </block>
  366. <text v-else>{{ite.emptyString}}</text>
  367. </template>
  368. <template v-else-if="ite.type==='index'">
  369. {{index+1}}
  370. </template>
  371. <template v-else>
  372. <!-- {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
  373. {{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
  374. </template>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. <table-summary
  380. v-if="showSummary"
  381. :data="data"
  382. :showSummary="showSummary"
  383. :fixedLeftColumns="fixedLeftColumns"
  384. :transColumns="transColumns"
  385. :border="border"
  386. :summary-method="summaryMethod"
  387. :sumText="sumText"
  388. />
  389. </view>
  390. </scroll-view>
  391. </view>
  392. <zb-load-more v-if="isLoadMore&&!completeLoading"/>
  393. </view>
  394. <!-- #endif -->
  395. </template>
  396. <script>
  397. import TableCheckbox from './components/table-checkbox.vue'
  398. import TableSummary from "./components/table-summary.vue";
  399. import TableSideSummary from "./components/table-side-summary.vue";
  400. import TableH5Summary from './components/table-h5-summary'
  401. import ZbLoadMore from './components/zb-load-more'
  402. import config from '@/config'
  403. const baseUrl = config.baseUrl
  404. import {getScrollbarSize} from "./js/util";
  405. // fit 列的宽度是否自撑开
  406. // column 显示的列数据
  407. // stripe 是否为斑马纹 table
  408. // show-header 是否显示表头
  409. // parameter 格式化数据总对象
  410. export default {
  411. components:{
  412. TableCheckbox,
  413. TableSummary,
  414. TableSideSummary,
  415. TableH5Summary,
  416. ZbLoadMore
  417. },
  418. props:{
  419. parameter:{
  420. type:Object,
  421. default:null
  422. },
  423. highlight:{
  424. type:Boolean,
  425. default:false
  426. },
  427. itemDate:{
  428. type:Object,
  429. default:()=>{}
  430. },
  431. columns:{
  432. type:Array,
  433. default:()=>[]
  434. },
  435. showSummary:{
  436. type:Boolean,
  437. default:false
  438. },
  439. isShowLoadMore:{
  440. type:Boolean,
  441. default:false
  442. },
  443. data:{
  444. type:[Object,Array],
  445. default:()=>[]
  446. },
  447. sumText:{
  448. type:String,
  449. default:'合计'
  450. },
  451. showHeader:{
  452. type:Boolean,
  453. default:true
  454. },
  455. border:{
  456. type:Boolean,
  457. default:false
  458. },
  459. stripe:{
  460. type:Boolean,
  461. default:true
  462. },
  463. fit:{
  464. type:Boolean,
  465. default:false
  466. },
  467. rowKey:[String, Function],
  468. summaryMethod:Function,
  469. pullUpLoading:Function,
  470. formatter:Function,
  471. cellStyle:Function,
  472. cellHeaderStyle:Function,
  473. permissionBtn:Function,
  474. },
  475. watch: {
  476. isShowLoadMore(nList, oList){
  477. this.isLoadMore = nList;
  478. }
  479. },
  480. computed:{
  481. loadMoreHeight(){
  482. return this.isLoadMore?40:0
  483. },
  484. fixedLeftColumns(){
  485. let arr = []
  486. for(let i=0;i<this.columns.length;i++){
  487. let item = this.columns[i]
  488. if(item.fixed){
  489. arr.push(item)
  490. }else {
  491. break
  492. }
  493. }
  494. return arr
  495. },
  496. itemfilters(){
  497. return(item,ite)=>{
  498. if(item[ite.name]==null){
  499. return ite.emptyString
  500. }
  501. return item[ite.name]
  502. }
  503. },
  504. scrollbarSize(){
  505. // #ifdef H5
  506. return getScrollbarSize()
  507. // #endif
  508. // #ifndef H5
  509. return 0
  510. // #endif
  511. },
  512. isFixedLeft(){
  513. if(!this.columns.length){
  514. return false
  515. }
  516. if(!this.data.length){
  517. return false
  518. }
  519. let [firstArr] = this.columns
  520. return !!firstArr.fixed;
  521. },
  522. transColumns(){
  523. if(this.fit){
  524. this.columns.forEach(column=>{
  525. if(column.type==="operation"&&column.renders){
  526. let str = ''
  527. column.renders.map((item)=>{
  528. str+=item.name
  529. })
  530. column.width = this.getTextWidth(str)+column.renders.length*40
  531. }else if(column.type==="img"){
  532. }else if(column.type==="selection"){
  533. }else{
  534. let arr = [this.getTextWidth(column.label)]
  535. this.data.forEach(data=>{
  536. let str = (data[column.name]+'')
  537. if(str==='undefined'){
  538. arr.push(60)
  539. }else{
  540. let width = this.getTextWidth(str)
  541. arr.push(width)
  542. }
  543. })
  544. column.width = Math.max(...arr)+40
  545. }
  546. })
  547. }
  548. let number = 0
  549. this.columns.forEach((item,index)=>{
  550. if(item.type==="operation"&&item.renders&&!item.width){
  551. let str = ''
  552. item.renders.map((item)=>{
  553. str+=item.name
  554. })
  555. item.width = this.getTextWidth(str)+item.renders.length*40
  556. }
  557. if(item.fixed){
  558. if(index===0){
  559. item.left = 0
  560. number+=item.width
  561. }else {
  562. item.left = number
  563. number+=item.width
  564. }
  565. }
  566. item.emptyString = item.emptyString||'--'
  567. })
  568. return this.columns
  569. },
  570. transData(){
  571. let flag = this.columns.some(item=>item.type==='selection')
  572. this.data.forEach((item,index)=>{
  573. if(flag){
  574. if(item.checked){
  575. if(!this.selectArr.length){
  576. this.selectArr.push(item)
  577. }
  578. }
  579. }
  580. if(this.rowKey){
  581. if(typeof this.rowKey==='function'){
  582. item.key = Object.freeze(this.rowKey(item))||Date.now()
  583. }else {
  584. item.key = Object.freeze(item[this.rowKey])||Date.now()
  585. }
  586. }else {
  587. item.key = index
  588. }
  589. })
  590. if(flag&&this.data.length){
  591. let le = this.data.filter(item=>item.checked).length
  592. if(le){
  593. if(le===this.data.length){
  594. this.checkedAll = true
  595. }else {
  596. this.indeterminate = true
  597. }
  598. }
  599. }
  600. return this.data
  601. },
  602. isHighlight(){
  603. return (item,index)=>{
  604. if(this.rowKey){
  605. return item.key === this.currentRow['key']
  606. }else{
  607. return index === this.currentRowIndex
  608. }
  609. }
  610. },
  611. getHeaderCellStyle() {
  612. return (column, columnIndex,childIndex)=>{
  613. const cellStyle = this.cellHeaderStyle;
  614. if(typeof cellStyle==='function'){
  615. return cellStyle({ column, columnIndex})
  616. }
  617. return {}
  618. }
  619. },
  620. getCellStyle() {
  621. return (row, column, rowIndex, columnIndex)=>{
  622. const cellStyle = this.cellStyle;
  623. if(typeof cellStyle==='function'){
  624. return cellStyle({row, column, rowIndex, columnIndex})
  625. }
  626. return {}
  627. }
  628. },
  629. },
  630. data() {
  631. return {
  632. button:[],
  633. alipayScrollTop:0,
  634. alipayScrollOldTop:0,
  635. alipayFlag:false,
  636. bodyTableLeft:0,
  637. headerTableLeft:0,
  638. lastScrollLeft:0,
  639. isLoadMore:false,
  640. headerFooterTableLeft:0,
  641. leftFiexScrollTop:0,
  642. bodyScrollTop:0,
  643. currentDriver:null,
  644. currentDriver1:null,
  645. bodyTime:null,
  646. currentRowIndex:null,
  647. currentRow: {},
  648. bodyTime1:null,
  649. headerTime:null,
  650. debounceTime:null,
  651. operation:{},
  652. completedFlag:false,
  653. selectArr:[],
  654. indeterminate:false,
  655. checkedAll:false,
  656. completeLoading:false,
  657. aliTime:null,
  658. }
  659. },
  660. created(){
  661. },
  662. mounted(){
  663. },
  664. methods: {
  665. kayType(value,datas){
  666. var actions = [];
  667. var idx=0;
  668. Object.keys(datas).some((key) => {
  669. if (datas[key].value == ('' + value)) {
  670. actions.push(datas[key].label);
  671. return true;
  672. }
  673. })
  674. return actions.join('')
  675. },
  676. getMove(){
  677. },
  678. formatterAction(row,column,rowIndex,columnIndex){
  679. if(column.formatter&&typeof this.formatter==='function'){
  680. return this.formatter(row,column,rowIndex,columnIndex)
  681. }
  682. return (row[column.name]==null||row[column.name]==='')?column.emptyString:row[column.name]
  683. },
  684. permission(item,renders,index){
  685. if(this.permissionBtn&&typeof this.permissionBtn==='function'){
  686. return this.permissionBtn(item,renders,index)
  687. }
  688. return renders
  689. },
  690. pullUpCompleteLoading(type){
  691. this.isLoadMore = false
  692. if(type==='ok'){
  693. this.completeLoading = true
  694. }
  695. },
  696. scrollAlipay(e){
  697. if(!this.alipayScrollOldTop){
  698. this.alipayScrollOldTop = e.detail.scrollTop
  699. }
  700. this.aliTime&&clearTimeout(this.aliTime)
  701. this.aliTime = setTimeout(()=>{
  702. if(this.alipayFlag&&e.detail.scrollTop>this.alipayScrollOldTop){
  703. this.pullLoad()
  704. }
  705. this.alipayFlag = false
  706. this.alipayScrollOldTop = null
  707. },500)
  708. },
  709. pullLoad(){
  710. if(this.isShowLoadMore){
  711. this.isLoadMore = true
  712. this.$emit('pullUpLoading')
  713. let that = this
  714. this.pullUpLoading&&this.pullUpLoading.call(this.$parent.$parent, (type)=>{
  715. that.isLoadMore = false
  716. if(type==='ok'){
  717. that.completeLoading=true
  718. }
  719. })
  720. }
  721. },
  722. scrolltolower(e){
  723. this.alipayFlag = true
  724. if(e.detail.direction==='bottom'){
  725. this.pullLoad()
  726. }
  727. // this.pullUpLoading.call(this.$parent)
  728. },
  729. // 多张图片处理
  730. getPhotoFn(url){
  731. var list=url.split(',')
  732. var newArr=[];
  733. list.forEach(ite=>{
  734. var s=baseUrl+ite;
  735. newArr.push(s)
  736. })
  737. return newArr
  738. },
  739. previewImage(item,url,current){
  740. uni.previewImage({
  741. current,
  742. urls:item
  743. })
  744. },
  745. resetHighlight(){
  746. this.currentRowIndex = null
  747. this.currentRow = {}
  748. },
  749. rowClick(row,index){
  750. if(this.highlight){
  751. this.currentRowIndex = index
  752. this.currentRow = row
  753. this.$emit('currentChange',row,index)
  754. }
  755. this.$emit('rowClick',row,index)
  756. },
  757. checkboxSelectedAll(e){
  758. this.indeterminate = false
  759. if(e.checked){
  760. this.selectArr = []
  761. this.checkedAll = true
  762. this.data.forEach(item=>{
  763. // this.$set(item,'checked',true)
  764. item.checked = true
  765. this.selectArr.push(item)
  766. })
  767. }else{
  768. this.checkedAll = false
  769. this.data.forEach(item=>{
  770. this.$set(item,'checked',false)
  771. })
  772. this.selectArr = []
  773. }
  774. // #ifndef H5 || APP-PLUS
  775. this.$forceUpdate()
  776. // #endif
  777. this.$emit('toggleAllSelection',e.checked,this.selectArr)
  778. },
  779. checkboxSelected(e,item){
  780. // #ifdef H5 || APP-PLUS
  781. this.$set(item,'checked',e.checked)
  782. // #endif
  783. // #ifndef H5 || APP-PLUS
  784. this.data.forEach(item=>{
  785. if(item.key===e.data.key){
  786. item.checked = e.checked
  787. }
  788. })
  789. // #endif
  790. item.checked = e.checked
  791. e.data.checked = e.checked
  792. if(e.checked){
  793. this.selectArr.push(e.data)
  794. }else{
  795. this.selectArr = this.selectArr.filter(item=>item.key!==e.data.key)
  796. }
  797. if(this.selectArr.length===this.transData.length){
  798. this.indeterminate = false
  799. this.checkedAll = true
  800. }else{
  801. this.indeterminate = true
  802. this.checkedAll = false
  803. }
  804. if(!this.selectArr.length){
  805. this.checkedAll = false
  806. this.indeterminate = false
  807. }
  808. // #ifndef H5 || APP-PLUS
  809. this.$forceUpdate()
  810. // #endif
  811. this.$emit('toggleRowSelection',e.checked,this.selectArr)
  812. },
  813. itemFilter(item,ite){
  814. if(ite.filters&&ite.name){
  815. let key = item[ite.name]
  816. return ite.filters[key]||''
  817. }
  818. return item[ite.name]||ite.emptyString
  819. },
  820. // 默认字体为微软雅黑 Microsoft YaHei,字体大小为 14px
  821. getTextWidth(str) {
  822. if(str.length<3){
  823. return 80
  824. }
  825. let regx = /^[0-9]+.?[0-9]*$/
  826. let flexWidth = 0
  827. for (const char of str) {
  828. if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
  829. // 如果是英文字符,为字符分配8个单位宽度
  830. flexWidth += 20
  831. } else if (char >= '\u4e00' && char <= '\u9fa5') {
  832. // 如果是中文字符,为字符分配15个单位宽度
  833. flexWidth += 30
  834. } else if(regx.test(char)){
  835. flexWidth += 18
  836. }else {
  837. // 其他种类字符,为字符分配8个单位宽度
  838. flexWidth += 14
  839. }
  840. }
  841. return flexWidth
  842. },
  843. width(item){
  844. return `${item.width?item.width:'200'}rpx`
  845. },
  846. showStripe(index){
  847. if(this.currentDriver)return
  848. if(this.stripe){
  849. return (index % 2) != 0?'odd':'even'
  850. }else{
  851. return ''
  852. }
  853. },
  854. //验证字符串是否是数字
  855. checkNumber(theObj) {
  856. var reg = /^[0-9]+.?[0-9]*$/;
  857. if (reg.test(theObj)) {
  858. return true;
  859. }
  860. return false;
  861. },
  862. isDate(data){
  863. if(isNaN(data)&&!isNaN(Date.parse(data))){
  864. return true
  865. }
  866. return false
  867. },
  868. sortAction(item,index){
  869. if(!item.sorter){return false}
  870. this.$set(item,'sorterMode',item.sorterMode==='_asc'?'_desc':'_asc')
  871. if(item.sorter==='custom'){
  872. this.$emit('sort-change',item,item.sorterMode.replace('_',''),index)
  873. }else {
  874. this.sortData(item)
  875. }
  876. // #ifndef H5 || APP-PLUS
  877. this.$forceUpdate()
  878. // #endif
  879. },
  880. sortData(item){
  881. let key = item.name
  882. if(item.sorterMode==='_asc'){
  883. this.data.sort((a,b)=>{
  884. if(this.checkNumber(a[key])){
  885. return a[key]-b[key]
  886. }
  887. if(this.isDate(a[key])){
  888. let a1 = new Date(a[key]).getTime()
  889. let b1 = new Date(b[key]).getTime()
  890. return a1-b1
  891. }
  892. })
  893. }else {
  894. this.data.sort((a,b)=>{
  895. if(this.checkNumber(a[key])){
  896. return b[key]-a[key]
  897. }
  898. if(this.isDate(a[key])){
  899. let a1 = new Date(a[key]).getTime()
  900. let b1 = new Date(b[key]).getTime()
  901. return b1-a1
  902. }
  903. })
  904. }
  905. },
  906. throttle(method,delay=60){
  907. let time = null
  908. return (...args)=>{
  909. if(!time){
  910. time = setTimeout(()=>{
  911. method(...args)
  912. time = null;
  913. },delay)
  914. }
  915. }
  916. },
  917. debounce(method,delay=1000){
  918. return (...args)=>{
  919. this.debounceTime&&clearTimeout(this.debounceTime)
  920. this.debounceTime = setTimeout(()=>{
  921. method(...args)
  922. },delay)
  923. }
  924. },
  925. handleBodyScroll(e){
  926. if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
  927. this.currentDriver = e.currentTarget.id
  928. this.headerTableLeft = e.detail.scrollLeft
  929. this.headerFooterTableLeft = e.detail.scrollLeft
  930. this.leftFiexScrollTop = e.detail.scrollTop
  931. this.bodyTime&&clearTimeout(this.bodyTime)
  932. this.bodyTime = setTimeout(()=>{
  933. this.currentDriver=null
  934. },200)
  935. },
  936. leftFixedScrollAction(e){
  937. if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
  938. this.currentDriver = e.currentTarget.id
  939. this.bodyScrollTop = e.detail.scrollTop
  940. this.bodyTime&&clearTimeout(this.bodyTime)
  941. this.bodyTime = setTimeout(()=>{
  942. this.currentDriver=null
  943. },200)
  944. },
  945. scrollToLeft(e){
  946. if(this.currentDriver1&&this.currentDriver1!==e.currentTarget.id)return
  947. this.currentDriver1 = e.currentTarget.id
  948. if(e.detail.direction==='left'&&this.headerTableLeft<10){
  949. this.headerTableLeft = 0
  950. }else if(e.detail.direction==='top'&&this.leftFiexScrollTop<10){
  951. this.leftFiexScrollTop = 0
  952. }
  953. this.bodyTime&&clearTimeout(this.bodyTime)
  954. this.bodyTime = setTimeout(()=>{
  955. this.currentDriver1=null
  956. },200)
  957. },
  958. scrollToFixedLeft(e){
  959. if(this.currentDriver1&&this.currentDriver1!==e.currentTarget.id)return
  960. this.currentDriver1 = e.currentTarget.id
  961. if(e.detail.direction==='top'&&this.bodyScrollTop<10){
  962. this.bodyScrollTop = 0
  963. }
  964. this.bodyTime&&clearTimeout(this.bodyTime)
  965. this.bodyTime = setTimeout(()=>{
  966. this.currentDriver1=null
  967. },200)
  968. },
  969. handleTableScrollLeft(e,type){
  970. if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
  971. this.currentDriver = e.currentTarget.id
  972. this.bodyTableLeft = e.detail.scrollLeft
  973. this.headerFooterTableLeft = e.detail.scrollLeft
  974. this.bodyTime&&clearTimeout(this.bodyTime)
  975. this.bodyTime = setTimeout(()=>{
  976. this.currentDriver=null
  977. },200)
  978. },
  979. handleFooterTableScrollLeft(e){
  980. if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
  981. this.currentDriver = e.currentTarget.id
  982. this.bodyTableLeft = e.detail.scrollLeft
  983. this.headerTableLeft = e.detail.scrollLeft
  984. this.bodyTime&&clearTimeout(this.bodyTime)
  985. this.bodyTime = setTimeout(()=>{
  986. this.currentDriver=null
  987. },200)
  988. }
  989. }
  990. }
  991. </script>
  992. <style lang="scss">
  993. .zb-table-fixed-left{
  994. /*去除左边滚动条 */
  995. scroll-view ::-webkit-scrollbar {
  996. display: none !important;
  997. width: 0 !important;
  998. height: 0 !important;
  999. -webkit-appearance: none;
  1000. background: transparent;
  1001. }
  1002. }
  1003. .zb-table-header{
  1004. ///*去除头部滚动条 */
  1005. scroll-view ::-webkit-scrollbar {
  1006. display: none !important;
  1007. width: 0 !important;
  1008. height: 0 !important;
  1009. -webkit-appearance: none;
  1010. background: transparent;
  1011. }
  1012. }
  1013. </style>
  1014. <style lang="scss" scoped>
  1015. .sorter-table{
  1016. position: absolute;
  1017. right: 2rpx;
  1018. top:50%;
  1019. transform:translateY(-50%);
  1020. .sorter-table-icon{
  1021. width: 0;
  1022. height: 0;
  1023. color: #dcdcdc;
  1024. border-right: 8rpx solid transparent;
  1025. border-left: 8rpx solid transparent;
  1026. }
  1027. .sorter-table-icon:first-child{
  1028. border-bottom: 14rpx solid currentColor;
  1029. }
  1030. .sorter-table-icon:last-child{
  1031. margin-top: 3rpx;
  1032. border-top: 14rpx solid currentColor;
  1033. }
  1034. .sorting_desc{
  1035. color: #2979ff;
  1036. }
  1037. .sorting_asc{
  1038. color: #2979ff;
  1039. }
  1040. }
  1041. .checkbox-item{
  1042. display: flex;align-items: center;justify-content: center;width: 100%;height: 100%
  1043. }
  1044. .no-data{
  1045. width: 100%;
  1046. height: 80rpx;
  1047. display: flex;
  1048. justify-content: center;
  1049. align-items: center;
  1050. // border-bottom: 1px solid #e8e8e8;
  1051. }
  1052. .item-th{
  1053. position: relative;
  1054. flex-shrink: 0;
  1055. width: 200rpx;
  1056. overflow-wrap: break-word;
  1057. border-bottom: 2rpx solid #e8e8e8;
  1058. transition: background 0.3s;
  1059. padding-right: 8rpx;
  1060. word-break:keep-all; /* 不换行 */
  1061. white-space:nowrap; /* 不换行 */
  1062. overflow:hidden; /* 内容超出宽度时隐藏超出部分的内容 */
  1063. text-overflow:ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
  1064. overflow-wrap: break-word;
  1065. font-weight: bold;
  1066. font-size: 26rpx;
  1067. color: #161616;
  1068. }
  1069. .zb-table{
  1070. height: 100%;
  1071. overflow: hidden;
  1072. width: 100%;
  1073. display: flex;
  1074. flex-direction: column;
  1075. font-size: 28rpx;
  1076. position: relative;
  1077. .zb-table-content{
  1078. //height: 100%;
  1079. //flex: 1;
  1080. position: relative;
  1081. overflow: hidden;
  1082. }
  1083. .zb-table-fixed{
  1084. min-width: 100%;
  1085. }
  1086. .zb-table-body{
  1087. position: relative;
  1088. background: #fff;
  1089. transition: opacity 0.3s;
  1090. }
  1091. .item-tr{
  1092. display: flex;
  1093. //height: 41px;
  1094. }
  1095. .item-td{
  1096. flex-shrink: 0;
  1097. width:200rpx;
  1098. padding-left: 8rpx;
  1099. height: 80rpx;
  1100. line-height: 80rpx;
  1101. padding-right: 8rpx;
  1102. box-sizing: border-box;
  1103. word-break:keep-all; /* 不换行 */
  1104. white-space:nowrap; /* 不换行 */
  1105. overflow:hidden; /* 内容超出宽度时隐藏超出部分的内容 */
  1106. text-overflow:ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
  1107. overflow-wrap: break-word;
  1108. border-bottom: 2rpx solid #e8e8e8;
  1109. //transition: background 0.3s;
  1110. }
  1111. .zb-table-fixed-left .zb-table-header{
  1112. overflow-y: hidden;
  1113. }
  1114. .zb-table-header {
  1115. overflow: hidden;
  1116. background: #F4F9FC;
  1117. .item-th{
  1118. padding-left: 8rpx;
  1119. line-height: 78rpx;
  1120. height: 80rpx;
  1121. //display: flex;
  1122. //align-items: center;
  1123. box-sizing: border-box;
  1124. }
  1125. }
  1126. .zb-table-fixed-left .zb-table-fixed{
  1127. background: #fff;
  1128. }
  1129. .zb-table-fixed-right .zb-table-fixed{
  1130. background: #fff;
  1131. }
  1132. .zb-table-body-inner{
  1133. height: 100%;
  1134. // overflow: scroll;
  1135. }
  1136. .zb-table-fixed-left{
  1137. position: absolute;
  1138. top: 0;
  1139. z-index: 1;
  1140. overflow: hidden;
  1141. border-radius: 0;
  1142. height: 100%;
  1143. //transition: box-shadow 0.3s ease;
  1144. }
  1145. .odd{
  1146. background: #F4F9FC;
  1147. //height: 100%;
  1148. width: 100%;
  1149. }
  1150. .even{
  1151. background-color:white ;
  1152. //height: 100%;
  1153. width: 100%;
  1154. }
  1155. }
  1156. .scroll-left-fixed{
  1157. .zb-table-fixed-left {
  1158. left: 0;
  1159. box-shadow: 12rpx 0 12rpx -8rpx #ccc;
  1160. }
  1161. }
  1162. .zb-table-applet{
  1163. height: 100%;
  1164. //overflow: hidden;
  1165. width: 100%;
  1166. position: relative;
  1167. display: flex;
  1168. flex-direction: column;
  1169. font-size: 28rpx;
  1170. .zb-table-content{
  1171. //height: 100%;
  1172. flex: 1;
  1173. overflow: hidden;
  1174. position: relative;
  1175. }
  1176. .zb-table-fixed{
  1177. min-width: 100%;
  1178. width: fit-content;
  1179. }
  1180. .zb-table-body{
  1181. position: relative;
  1182. background: #fff;
  1183. transition: opacity 0.3s;
  1184. }
  1185. .item-tr{
  1186. display: flex;
  1187. //height: 41px;
  1188. }
  1189. .item-td{
  1190. flex-shrink: 0;
  1191. width: 200rpx;
  1192. padding-left: 8rpx;
  1193. height: 80rpx;
  1194. line-height: 80rpx;
  1195. padding-right:8rpx;
  1196. box-sizing: border-box;
  1197. word-break:keep-all; /* 不换行 */
  1198. white-space:nowrap; /* 不换行 */
  1199. overflow:hidden; /* 内容超出宽度时隐藏超出部分的内容 */
  1200. text-overflow:ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
  1201. overflow-wrap: break-word;
  1202. border-bottom: 2rpx solid #e8e8e8;
  1203. //transition: background 0.3s;
  1204. }
  1205. .zb-table-header {
  1206. //overflow: hidden;
  1207. position: sticky;
  1208. top: 0;
  1209. z-index: 2;
  1210. //width: fit-content;
  1211. .item-th{
  1212. padding-left: 8rpx;
  1213. line-height: 78rpx;
  1214. height: 80rpx;
  1215. box-sizing: border-box;
  1216. background: #fafafa;
  1217. }
  1218. .zb-stick-side{
  1219. position: sticky;
  1220. top: 0;
  1221. left: 0;
  1222. z-index: 2;
  1223. //border-right: solid 1rpx #dbdbdb;
  1224. box-sizing: border-box;
  1225. background: #fafafa;
  1226. //box-shadow: 6px 0 6px -4px #ccc;
  1227. }
  1228. }
  1229. .zb-table-fixed-left .zb-table-fixed{
  1230. background: #fff;
  1231. }
  1232. .zb-table-fixed-right .zb-table-fixed{
  1233. background: #fff;
  1234. }
  1235. .zb-table-fixed-header .zb-table-body-inner{
  1236. height: 100%;
  1237. // overflow: scroll;
  1238. }
  1239. .zb-table-fixed-left{
  1240. position: absolute;
  1241. top: 0;
  1242. z-index: 1;
  1243. overflow: hidden;
  1244. border-radius: 0;
  1245. height: 100%;
  1246. //transition: box-shadow 0.3s ease;
  1247. }
  1248. .scroll-left-fixed{
  1249. .zb-table-fixed-left {
  1250. left: 0;
  1251. box-shadow: 12rpx 0 12rpx -8rpx #ccc;
  1252. }
  1253. }
  1254. .odd{
  1255. background-color:rgba(249,249,249,0.6);
  1256. //height: 100%;
  1257. width: 100%;
  1258. }
  1259. .even{
  1260. background-color:white ;
  1261. //height: 100%;
  1262. width: 100%;
  1263. }
  1264. .zb-table-tbody {
  1265. .zb-stick-side{
  1266. position: sticky;
  1267. left: 0;
  1268. z-index: 1;
  1269. box-sizing: border-box;
  1270. background:white;
  1271. //box-shadow: 6px 0 6px -2px #ccc;
  1272. }
  1273. .odd{
  1274. background:#f9f9f9;
  1275. //height: 100%;
  1276. width: 100%;
  1277. }
  1278. .even{
  1279. background:white ;
  1280. //height: 100%;
  1281. width: 100%;
  1282. }
  1283. }
  1284. .current-row{
  1285. .item-td{
  1286. background-color: #ecf5ff;
  1287. }
  1288. }
  1289. }
  1290. .current-row{
  1291. .item-td{
  1292. background-color: #ecf5ff;
  1293. }
  1294. }
  1295. .zb-table-header{
  1296. height: 80rpx;
  1297. }
  1298. </style>