SListLayout2.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. const e = `<template>
  2. <div class="list-layout" ref="layoutRef">
  3. <div class="tools">
  4. <div class="title">
  5. {{ title }}
  6. </div>
  7. <div class="btns">
  8. <a-space :size="spaceSize">
  9. <span class="item-btn" v-for="btn in renderButtons" :key="btn.key">
  10. <a-button
  11. class="btn"
  12. v-action="btn.action || btn.key"
  13. v-show="btn.show !== false"
  14. :disabled="!!btn.disabled"
  15. :type="btn.type || btn.key === 'add' ? 'primary' : 'default'"
  16. @click="btnCallback(btn)"
  17. >
  18. <template #icon>
  19. <component v-if="renderIcon(btn)" :is="renderIcon(btn)" />
  20. </template>
  21. {{ $l(btn.name) }}
  22. </a-button>
  23. </span>
  24. <slot name="otherBtns" :selections="selectedRowKeys" />
  25. </a-space>
  26. </div>
  27. </div>
  28. <div class="list-layout-main">
  29. <div
  30. class="side s-side-tree"
  31. ref="side"
  32. :style="{ width: sideWidth + 'px' }"
  33. style="overflow-y: auto"
  34. v-if="$slots.tree"
  35. >
  36. <slot name="tree" />
  37. </div>
  38. <div class="side-bar s-theme-bg" v-if="$slots.tree" v-sidedrag />
  39. <div class="layout-list-content" v-if="!$slots.empty">
  40. <div class="desc-wrap" v-if="$slots.desc">
  41. <slot name="desc" />
  42. </div>
  43. <div class="list-filter-wrap" ref="filters" v-if="!!$slots.filter || !!$slots.filterMore">
  44. <div class="filter-content" v-if="$slots.filter">
  45. <div class="filter">
  46. <slot name="filter" />
  47. </div>
  48. <a class="filter-more-btn" v-if="$slots.filterMore" @click="toggleFilter">
  49. {{ !isMoreFilter ? $l('更多') : $l('收起') }}
  50. <double-right-outlined
  51. style="font-size: 12px; transform: rotate(90deg)"
  52. v-if="!isMoreFilter"
  53. />
  54. <double-right-outlined style="font-size: 12px; transform: rotate(-90deg)" v-else />
  55. </a>
  56. <div class="reset-wrap" v-if="$slots.filter">
  57. <a-tooltip
  58. placement="top"
  59. :overlayStyle="{ maxWidth: '500px' }"
  60. :mouseEnterDelay="1.5"
  61. :mouseLeaveDelay="0.5"
  62. >
  63. <template #title>
  64. <span>{{ $l('条件重置') }}</span>
  65. </template>
  66. <a-button style="padding-bottom: 2px" @click="filterReset">
  67. <template #icon>
  68. <sync-outlined />
  69. </template>
  70. </a-button>
  71. </a-tooltip>
  72. </div>
  73. </div>
  74. <div class="filter-more-content" v-if="$slots.filterMore" v-show="isMoreFilter">
  75. <slot name="filterMore" />
  76. </div>
  77. </div>
  78. <div class="table-content">
  79. <div class="tabs-wrap" v-if="$slots.tabs" ref="tabs">
  80. <slot name="tabs" />
  81. </div>
  82. <div class="table-container">
  83. <s-table
  84. ref="table"
  85. size="middle"
  86. :scroll="{ y: tableScrollPx, x: '100%' }"
  87. :pageSize="pageSize"
  88. :rowKey="rowKey"
  89. :columns="renderColumns"
  90. :data="loadData"
  91. v-model:expanded-row-keys="expandedRowKeys"
  92. :rowSelection="
  93. showSelection || isSelection
  94. ? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }
  95. : null
  96. "
  97. :showPagination="showPagination"
  98. >
  99. <!-- 自定义单元格:template 渲染同名插槽、isClick 渲染可点击、action 渲染操作列 -->
  100. <template #bodyCell="scope">
  101. <template v-if="scope.column">
  102. <!-- cell-template -->
  103. <slot
  104. v-if="isTemplateColumn(scope.column.dataIndex)"
  105. :name="scope.column.dataIndex"
  106. :text="scope.text"
  107. :record="scope.record"
  108. :index="scope.index"
  109. :item="getColumn(scope.column.dataIndex)"
  110. />
  111. <!-- cell-click -->
  112. <a
  113. v-else-if="isClickColumn(scope.column.dataIndex)"
  114. @click="tableColCallback(scope.column.dataIndex, scope.record)"
  115. >{{ getCellText(scope.text) }}</a
  116. >
  117. <!-- cell-action -->
  118. <slot
  119. v-else-if="scope.column.dataIndex === 'action'"
  120. name="action"
  121. :record="scope.record"
  122. />
  123. </template>
  124. </template>
  125. </s-table>
  126. </div>
  127. </div>
  128. </div>
  129. <div class="layout-list-content" v-else>
  130. <slot name="empty" />
  131. </div>
  132. </div>
  133. <div class="other">
  134. <slot name="other" />
  135. </div>
  136. <s-import-modal
  137. v-if="isShowImportModal"
  138. ref="importModalRef"
  139. :upload-url="importItem.importUploadUrl"
  140. v-model:value="importVisible"
  141. :columns="importItem.importColumns"
  142. :apis="importItem.importApis"
  143. @reload="reload"
  144. />
  145. </div>
  146. </template>
  147. <script setup>
  148. import { computed, h, nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue'
  149. import STable from '../Table/index'
  150. import { createSideDrag } from '../../utils/side-drag'
  151. defineOptions({ name: 'SListLayout' })
  152. const props = defineProps({
  153. // 页面标题
  154. title: {
  155. type: String,
  156. required: true
  157. },
  158. // 工具栏按钮配置(添加 / 批量删除 / 导入 / 导出)
  159. buttons: {
  160. type: Array,
  161. default: () => [
  162. {
  163. name: window.$l('添加'),
  164. key: 'add',
  165. show: true,
  166. type: 'primary',
  167. icon: true,
  168. api: null
  169. },
  170. {
  171. name: window.$l('批量删除'),
  172. key: 'remove',
  173. action: 'remove',
  174. show: true,
  175. icon: true,
  176. api: null
  177. },
  178. {
  179. name: window.$l('导入'),
  180. key: 'import',
  181. show: true,
  182. icon: true,
  183. importColumns: [], // 预览的表头信息
  184. importUploadUrl: null, // 上传url
  185. importApis: {
  186. templateDownload: null,
  187. importPreview: null,
  188. importData: null,
  189. exportExceptionData: null
  190. }
  191. },
  192. {
  193. name: window.$l('导出'),
  194. key: 'export',
  195. show: true,
  196. icon: true,
  197. api: null
  198. }
  199. ]
  200. },
  201. // 列表checkbox列
  202. isSelection: {
  203. type: Boolean,
  204. default: false
  205. },
  206. // 是否显示分页
  207. showPagination: {
  208. type: Boolean,
  209. default: true
  210. },
  211. // 表格列配置
  212. columns: {
  213. type: Array,
  214. default: () => []
  215. },
  216. // 行主键字段名
  217. rowKey: {
  218. type: [Function, String],
  219. default: 'id'
  220. },
  221. // 取数函数,返回 { list, total }
  222. loadData: {
  223. type: Function,
  224. required: true
  225. },
  226. // 每页条数
  227. pSize: {
  228. type: [String, Number],
  229. default: 20
  230. },
  231. // 初始勾选的表格行 key(选择表格弹窗等场景由外部带入)
  232. selectedRowKeysArr: {
  233. type: Array,
  234. default: () => []
  235. }
  236. })
  237. const emit = defineEmits(['reset', 'btnCallback', 'tableColCallback'])
  238. // ---------- 模板 ref ----------
  239. const layoutRef = ref(null)
  240. const filters = ref(null)
  241. const tabs = ref(null)
  242. const table = ref(null)
  243. const spaceSize = ref(8)
  244. // ---------- 状态 ----------
  245. const importVisible = ref(false)
  246. const isMoreFilter = ref(false)
  247. // 表体滚动高度:仅作为 scroll.y 同步值(初值兜底),布局高度完全由 CSS flex 决定
  248. const tableScrollPx = ref(300)
  249. const spinning = ref(false)
  250. const pageSize = ref(20)
  251. const sideWidth = ref(232)
  252. const showSelection = ref(false)
  253. const selectedRowKeys = ref([])
  254. const expandedRowKeys = ref([])
  255. const renderColumns = ref([])
  256. const renderButtons = ref([])
  257. const iconMap = {
  258. add: 'PlusCircleOutlined',
  259. edit: 'FormOutlined',
  260. delete: 'DeleteOutlined',
  261. remove: 'DeleteOutlined',
  262. import: 'UploadOutlined',
  263. export: 'DownloadOutlined',
  264. assign: 'ClusterOutlined',
  265. execute: 'PlayCircleOutlined',
  266. pause: 'PauseCircleOutlined',
  267. resume: 'PoweroffOutlined',
  268. approve: 'HighlightOutlined',
  269. setting: 'SettingOutlined',
  270. TopOfType: 'VerticalAlignTopOutlined',
  271. TOP: 'VerticalAlignTopOutlined',
  272. synchronize: 'SyncOutlined'
  273. }
  274. // ---------- computed ----------
  275. const isShowImportModal = computed(() => renderButtons.value.map((i) => i.key).includes('import'))
  276. const importItem = computed(() => renderButtons.value.find((i) => i.key === 'import') || {})
  277. // ---------- watch ----------
  278. watch(
  279. () => props.buttons,
  280. (v) => {
  281. if (v && v.length) initRenderButtons(v)
  282. },
  283. { immediate: true, deep: true }
  284. )
  285. watch(
  286. () => props.columns,
  287. () => initComponent()
  288. )
  289. // 外部带入的初始勾选行:变化时同步给表格
  290. watch(
  291. () => props.selectedRowKeysArr,
  292. (v) => {
  293. selectedRowKeys.value = v || []
  294. },
  295. { immediate: true }
  296. )
  297. // ---------- 方法 ----------
  298. function isFunction(fn, name = '') {
  299. if (fn && typeof fn === 'function') {
  300. return true
  301. }
  302. const is = import.meta.env.NODE_ENV === 'development'
  303. if (is) {
  304. console.error(\`\${name}按钮未绑定接口方法Api,请绑定接口或从按钮回调事件"btnCallback"中自行处理\`)
  305. }
  306. return false
  307. }
  308. function renderIcon(v) {
  309. if (typeof v.icon === 'string') {
  310. return v.icon
  311. }
  312. if (typeof v.icon === 'boolean' && v.icon) {
  313. return iconMap[v.key] || ''
  314. }
  315. return ''
  316. }
  317. function initRenderButtons(list) {
  318. // 后续可在这里对当前按钮集合编写逻辑
  319. renderButtons.value = list.map((i) => {
  320. if (i.key === 'remove') showSelection.value = true
  321. return i
  322. })
  323. }
  324. function initTable() {
  325. nextTick(() => {
  326. measureLayout()
  327. pageSize.value = props.pSize
  328. renderColumns.value = props.columns.map((i) => {
  329. if (
  330. (i.template || i.isClick || (i.dataIndex === 'action' && !i.customRender)) &&
  331. !i.scopedSlots
  332. ) {
  333. i.scopedSlots = { customRender: i.dataIndex }
  334. }
  335. return i
  336. })
  337. })
  338. setTimeout(() => {
  339. const th = document.querySelector('.ant-table-cell.ant-table-cell-scrollbar')
  340. const thead = document.querySelector('.ant-table-thead tr')
  341. if (th && thead) thead.removeChild(th)
  342. }, 100)
  343. }
  344. function initComponent() {
  345. initTable()
  346. }
  347. function toggleFilter() {
  348. isMoreFilter.value = !isMoreFilter.value
  349. measureLayout()
  350. }
  351. // 查询条件重置
  352. function filterReset() {
  353. emit('reset')
  354. }
  355. function reload() {
  356. table.value && table.value.refresh(true)
  357. }
  358. // 按钮回调
  359. function btnCallback(item) {
  360. emit('btnCallback', item.key, selectedRowKeys.value)
  361. const fn = actionMap[item.key]
  362. if (typeof fn === 'function') {
  363. fn(item)
  364. } else {
  365. handAction(item)
  366. }
  367. }
  368. // 其他未定义按钮方法生成
  369. function handAction(item) {
  370. if (item.selection !== false && !selectedRowKeys.value.length) {
  371. window.$message.warn(\`\${window.$l('请选择要')}\${window.$l(item.name)}\${window.$l('的数据')}\`)
  372. return
  373. }
  374. if (isFunction(item.api, item.name, item.key)) {
  375. if (item.confirm) {
  376. window.$confirm({
  377. title: \`\${item.name}\`,
  378. content: () =>
  379. h(
  380. 'div',
  381. { style: 'color:var(--s-color-error)' },
  382. \`\${window.$l('确认要')}{\${window.$l(item.name)}}\${window.$l('数据吗?')}\`
  383. ),
  384. onOk: () => {
  385. spinning.value = true
  386. item
  387. .api(selectedRowKeys.value)
  388. .then(() => {
  389. window.$message.success(\`\${window.$l(item.name)}\${window.$l('成功')}\`)
  390. emit('reset')
  391. })
  392. .finally(() => {
  393. spinning.value = false
  394. })
  395. }
  396. })
  397. return
  398. }
  399. spinning.value = true
  400. item
  401. .api(selectedRowKeys.value)
  402. .then(() => {
  403. window.$message.success(\`\${window.$l(item.name)}\${window.$l('成功')}\`)
  404. emit('reset')
  405. })
  406. .finally(() => {
  407. spinning.value = false
  408. })
  409. }
  410. }
  411. // 变更按钮状态
  412. function setStateBtn(action, opt) {
  413. if (typeof action === 'string') {
  414. setStateBtnItem(action, opt)
  415. } else {
  416. action.forEach((i) => {
  417. setStateBtnItem(i, opt)
  418. })
  419. }
  420. }
  421. function setStateBtnItem(action, opt) {
  422. const item = renderButtons.value.find((i) => i.key === action)
  423. if (!item) {
  424. console.error(\`按钮(\${action})未定义, 请确认该变更状态按钮是否设置正确\`)
  425. return
  426. }
  427. Object.keys(opt).forEach((i) => {
  428. item[i] = opt[i]
  429. })
  430. }
  431. // 添加方法(业务自行处理,这里只做占位,不再走 handAction)
  432. function addAction() {}
  433. // 删除方法
  434. function deleteAction(item) {
  435. handAction(item)
  436. }
  437. // 导入方法
  438. function importAction() {
  439. if (!isShowImportModal.value) {
  440. emit('btnCallback', 'import')
  441. return
  442. }
  443. importVisible.value = true
  444. }
  445. // 导出方法
  446. function exportAction(item) {
  447. if (isFunction(item.api, item.name, item.key)) {
  448. spinning.value = true
  449. item.api().then(() => {
  450. spinning.value = false
  451. })
  452. }
  453. }
  454. // 表格可点击列事件回调
  455. function tableColCallback(field, item) {
  456. emit('tableColCallback', field, item)
  457. }
  458. // 按 dataIndex 取列配置
  459. function getColumn(dataIndex) {
  460. return renderColumns.value.find((i) => i.dataIndex === dataIndex)
  461. }
  462. // 该列是否使用自定义插槽(列 dataIndex 即插槽名)
  463. function isTemplateColumn(dataIndex) {
  464. const col = getColumn(dataIndex)
  465. return !!(col && col.template)
  466. }
  467. // 该列是否为可点击列
  468. function isClickColumn(dataIndex) {
  469. const col = getColumn(dataIndex)
  470. return !!(col && col.isClick)
  471. }
  472. // 可点击列显示文本:对象取 name,其它原样
  473. function getCellText(text) {
  474. if (text === null || text === undefined) return ''
  475. if (typeof text === 'object') return text.name === undefined ? '' : text.name
  476. return text
  477. }
  478. function onSelectChange(keys) {
  479. selectedRowKeys.value = keys
  480. }
  481. // ---------- 高度 ----------
  482. // 布局高度全部交给 CSS flex(根 100% → 主区 flex:1 → 表格链条逐层贯通),
  483. // 这里只把 flex 撑出来的真实表体高度同步给 scroll.y —— antd 需要 scroll.y 才启用固定表头。
  484. // 算术法(父高 − 工具条 − 过滤区 − 分页)的死穴是首帧分页还没渲染,必然差十几像素;
  485. // 同步真实 clientHeight 没有这个问题,且值偏小也不影响布局(.ant-table-body 已 max-height:none)。
  486. function measureLayout() {
  487. nextTick(syncTableHeight)
  488. }
  489. function syncTableHeight() {
  490. const el = table.value && table.value.$el
  491. const bodyEl = el && el.querySelector('.ant-table-body')
  492. const h = bodyEl && bodyEl.clientHeight
  493. if (h) tableScrollPx.value = Math.max(h - 8, 0)
  494. }
  495. // 按钮 key → 处理函数(等价于原 Options API 里 this[item.key] 的语义)
  496. const actionMap = {
  497. add: addAction,
  498. delete: deleteAction,
  499. import: importAction,
  500. export: exportAction,
  501. reload,
  502. filterReset,
  503. toggleFilter,
  504. setStateBtn,
  505. handAction
  506. }
  507. // ---------- 拖拽分隔条指令 ----------
  508. const vSidedrag = createSideDrag(
  509. () => sideWidth.value,
  510. (width) => (sideWidth.value = width),
  511. { min: 232 }
  512. )
  513. // ---------- 生命周期 ----------
  514. let ro = null
  515. onMounted(() => {
  516. initComponent()
  517. // 过滤区折叠 / 侧栏拖拽 / 窗口缩放都会改变可用高度,统一由 RO 重新同步 scroll.y
  518. if (window.ResizeObserver && layoutRef.value) {
  519. ro = new ResizeObserver(() => syncTableHeight())
  520. ro.observe(layoutRef.value)
  521. }
  522. })
  523. // keep-alive 缓存页切回来时 DOM 重新可见,下一帧补同步一次
  524. onActivated(() => {
  525. nextTick(syncTableHeight)
  526. })
  527. onBeforeUnmount(() => {
  528. if (ro) {
  529. ro.disconnect()
  530. ro = null
  531. }
  532. })
  533. defineExpose({
  534. reload,
  535. spinning,
  536. selectedRowKeys,
  537. renderButtons,
  538. setStateBtn,
  539. btnCallback,
  540. filterReset,
  541. toggleFilter,
  542. table,
  543. importVisible
  544. })
  545. <\/script>
  546. <style lang="less" scoped>
  547. // 高度实现:纯 CSS flex,零 JS 测量。
  548. // 根节点撑满父容器 → 工具条定高 → 主区吃掉剩余高度 → 表格链条逐层贯通到表体。
  549. // 前提:父容器有确定高度(基座 BasicLayout 的 router-view 已带 height);
  550. // 父级高度不确定时退化为「按内容撑开」,不会像旧版那样测量成 0 直接塌掉。
  551. .list-layout {
  552. height: 100%;
  553. min-height: 0;
  554. display: flex;
  555. flex-direction: column;
  556. overflow: hidden;
  557. }
  558. .tools {
  559. flex: 0 0 60px;
  560. height: 60px;
  561. display: flex;
  562. justify-content: space-between;
  563. align-items: center;
  564. // border-bottom: 1px solid var(--s-bg-color);
  565. // padding: 0 0 0 16px;
  566. box-sizing: border-box;
  567. .title {
  568. font-size: 18px;
  569. font-weight: 500;
  570. }
  571. }
  572. .list-layout-main {
  573. flex: 1 1 auto;
  574. min-height: 0;
  575. display: flex;
  576. justify-content: flex-start;
  577. // stretch(默认)让左右两栏撑满主区高度;flex-start 会让子栏退回内容高度,表格就不吃剩余空间了
  578. align-items: stretch;
  579. border-radius: 6px;
  580. background-color: var(--s-bg-color-container);
  581. overflow: hidden;
  582. }
  583. .side {
  584. // 宽度由模板内联的 sideWidth 决定,不参与伸缩,否则拖拽后的宽度会被挤掉
  585. flex: 0 0 auto;
  586. min-width: 232px;
  587. padding: 10px;
  588. box-sizing: border-box;
  589. overflow: hidden;
  590. }
  591. .side-bar {
  592. // 必须禁止伸缩:主区和左树都带 flex-grow,空间不足时这根 10px 的分隔条会被压成 0 宽,
  593. // 表现就是「分隔条不见了、左侧树拖不动」
  594. flex: 0 0 10px;
  595. width: 10px;
  596. align-self: stretch;
  597. cursor: pointer;
  598. user-select: none;
  599. }
  600. .layout-list-content {
  601. flex: 1 1 auto;
  602. min-width: 0;
  603. min-height: 0;
  604. overflow: hidden;
  605. display: flex;
  606. flex-direction: column;
  607. justify-content: flex-start;
  608. align-items: flex-start;
  609. }
  610. .list-filter-wrap {
  611. flex: 0 0 auto;
  612. width: 100%;
  613. padding: 10px 16px;
  614. box-sizing: border-box;
  615. border-bottom: 1px solid var(--s-bg-color);
  616. .filter-content {
  617. height: 32px;
  618. display: flex;
  619. justify-content: flex-start;
  620. align-items: center;
  621. }
  622. .filter {
  623. // flex: 1;
  624. }
  625. }
  626. .table-content {
  627. width: 100%;
  628. flex: 1;
  629. // 表格区必须自身就是 flex 容器:让「表格主体」吸收剩余高度、
  630. // 分页固定贴在容器底边(数据不满页时分页不再浮在中间)。
  631. display: flex;
  632. flex-direction: column;
  633. min-height: 0;
  634. .tabs-wrap {
  635. padding: 0 20px;
  636. box-sizing: border-box;
  637. flex: 0 0 auto;
  638. }
  639. :deep(.ant-spin-nested-loading .ant-spin-blur) {
  640. opacity: 1;
  641. }
  642. :deep(.ant-table-pagination) {
  643. margin-top: 0;
  644. padding: 16px 16px 16px 0;
  645. border-top: 1px solid var(--s-border-color-split);
  646. // 不留底部外边距,否则分页与容器底边恒差一个 margin(实测 15~16px 空隙)
  647. margin-bottom: 0;
  648. flex: 0 0 auto;
  649. }
  650. // ---- 撑满链路:逐层放开高度约束,直到 antd 的 body 能拿到剩余空间 ----
  651. // .table-wrapper 是 STable 组件根节点,漏掉它整条链会断(实测 body 撑不开)
  652. :deep(.table-container),
  653. :deep(.table-wrapper),
  654. :deep(.ant-table-wrapper),
  655. :deep(.ant-spin-nested-loading),
  656. :deep(.ant-spin-container),
  657. :deep(.ant-table),
  658. :deep(.ant-table-container) {
  659. flex: 1 1 auto;
  660. min-height: 0;
  661. display: flex;
  662. flex-direction: column;
  663. }
  664. :deep(.ant-table-header) {
  665. flex: 0 0 auto;
  666. }
  667. :deep(.ant-table-body) {
  668. // 交由 flex 决定高度,取消 scroll.y 写入的 max-height 限制
  669. flex: 1 1 auto;
  670. min-height: 0;
  671. max-height: none !important;
  672. }
  673. }
  674. .table-container {
  675. box-sizing: border-box;
  676. }
  677. .filter-more-content {
  678. // border-bottom: 1px solid var(--s-border-color-light);
  679. margin-top: 16px;
  680. // padding-top: 16px;
  681. // box-sizing: border-box;
  682. }
  683. .other {
  684. flex: 0 0 auto;
  685. }
  686. .desc-wrap {
  687. width: 100%;
  688. padding: 16px 0 0;
  689. box-sizing: border-box;
  690. }
  691. .reset-wrap {
  692. margin-left: 24px;
  693. flex: 1;
  694. text-align: right;
  695. }
  696. .filter-more-btn {
  697. min-width: 60px;
  698. text-align: center;
  699. }
  700. </style>
  701. `;
  702. export {
  703. e as default
  704. };