UNPKG

ysj-plus-table

Version:

A Vue 3 table component based on Element Plus

5 lines (4 loc) 26.8 kB
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.PlusTable={},h.Vue))})(this,function(h,e){"use strict";var N=document.createElement("style");N.textContent=`@charset "UTF-8";.right-main[data-v-12910e8a]{padding:20px;background-color:#fff;border-radius:4px}.search-base-block[data-v-12910e8a]{margin-bottom:20px;padding:20px;background-color:#f5f7fa;border-radius:4px}.table-base-block[data-v-12910e8a]{background-color:#fff;border-radius:4px}.table-base-buttom[data-v-12910e8a]{margin-bottom:20px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.pagination-container[data-v-12910e8a]{margin-top:20px;text-align:right}.search-btn[data-v-12910e8a],.reset-btn[data-v-12910e8a]{margin-right:8px}[data-v-12910e8a] .el-table .el-table__header-wrapper th{background-color:#f5f7fa;color:#606266;font-weight:500;height:50px}[data-v-12910e8a] .el-table .el-table__row td{padding:8px 0}[data-v-12910e8a] .el-pagination .el-pagination__total,[data-v-12910e8a] .el-pagination .el-pagination__sizes{margin-right:16px}[data-v-12910e8a] .el-form .el-form-item{margin-bottom:18px;margin-right:18px}[data-v-12910e8a] .el-form .el-form-item:last-child{margin-right:0}:root{--el-color-primary: #D40000 !important;--el-color-primary-light-3: #ff4d4d !important;--el-color-primary-light-5: #ff8080 !important;--el-color-primary-light-7: #ffb3b3 !important;--el-color-primary-light-8: #ffcccc !important;--el-color-primary-light-9: #ffe6e6 !important;--el-color-primary-dark-2: #a30000 !important}.right-main{padding:20px;background-color:#fff;border-radius:4px}.search-base-block{margin-bottom:20px;padding:20px;background-color:#f5f7fa;border-radius:4px}.table-base-block{background-color:#fff;border-radius:4px}.table-base-buttom{margin-bottom:20px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.pagination-container{margin-top:20px;text-align:right}.search-btn,.reset-btn{margin-right:8px}.ysj-plus-table :deep(.el-table) .el-table__header-wrapper th{background-color:#f5f7fa;color:#606266;font-weight:500;height:50px}.ysj-plus-table :deep(.el-table) .el-table__row td{padding:8px 0}.ysj-plus-table :deep(.el-table) .cell{padding:0 2px!important}.ysj-plus-table :deep(.el-table__header-wrapper) th,.ysj-plus-table :deep(.el-table__fixed-header-wrapper) th{word-break:break-word;background-color:#f8f8f9!important;color:#515a6e;height:30px;font-size:14px}.ysj-plus-table :deep(.el-table__body-wrapper) .el-button [class*=el-icon-]+span{margin-left:1px}.ysj-plus-table :deep(.el-pagination) .el-pagination__total{margin-right:16px}.ysj-plus-table :deep(.el-pagination) .el-pagination__sizes{margin-right:16px}.ysj-plus-table :deep(.el-pagination).is-background .el-pager li:not(.is-disabled).is-active{background-color:var(--el-color-primary)!important;border-radius:6px!important}.ysj-plus-table :deep(.el-pagination).is-background .btn-next,.ysj-plus-table :deep(.el-pagination).is-background .btn-prev,.ysj-plus-table :deep(.el-pagination).is-background .el-pager li{border-radius:6px!important}.ysj-plus-table :deep(.el-form) .el-form-item{margin-bottom:18px;margin-right:18px}.ysj-plus-table :deep(.el-form) .el-form-item:last-child{margin-right:0}.ysj-plus-table :deep(.el-button--primary){--el-button-bg-color: var(--el-color-primary) !important;--el-button-border-color: var(--el-color-primary) !important;--el-button-hover-bg-color: var(--el-color-primary-light-3) !important;--el-button-hover-border-color: var(--el-color-primary-light-3) !important;--el-button-active-bg-color: var(--el-color-primary-dark-2) !important;--el-button-active-border-color: var(--el-color-primary-dark-2) !important;background-color:var(--el-color-primary)!important;border:0!important;color:#fff!important}.ysj-plus-table :deep(.el-button--primary):hover{background-color:var(--el-color-primary-light-3)!important;border-color:var(--el-color-primary-light-3)!important;color:#fff!important}.ysj-plus-table :deep(.el-button--text){background:unset!important;border:unset!important;border-radius:unset!important;font-size:14px!important;color:var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--text) span{font-size:14px!important}.ysj-plus-table :deep(.el-button--text):hover{background-color:unset!important;color:var(--el-color-primary)!important;border-color:var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--primary.is-plain){background-color:unset!important;color:var(--el-color-primary)!important;border-color:var(--el-color-primary)!important;border:1px solid var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--primary.is-plain):hover{background-color:var(--el-color-primary)!important;color:#fff!important}.ysj-plus-table .table-operation{display:flex;justify-content:center;gap:8px}.ysj-plus-table .table-operation :deep(.el-button){padding:4px 8px;font-size:12px}.ysj-plus-table :deep(.el-table) .cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ysj-plus-table .table-image{width:50px;height:50px;object-fit:cover;border-radius:4px}.ysj-plus-table .table-tag{margin-right:4px;margin-bottom:4px}.ysj-plus-table .table-status{display:inline-block;padding:2px 8px;border-radius:2px;font-size:12px}::-webkit-scrollbar-track-piece{background:#fff}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#cbcbcb;border-radius:20px}.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.fr{float:right}.fl{float:left}.pr-5{padding-right:5px}.pl-5{padding-left:5px}.block{display:block}.pointer{cursor:pointer}.inlineBlock{display:block}@media (max-width: 768px){.pagination-container .el-pagination>.el-pagination__jump{display:none!important}.pagination-container .el-pagination>.el-pagination__sizes{display:none!important}} `,document.head.appendChild(N);const fe="",ue="",M=(d,S)=>{const f=d.__vccOpts||d;for(const[u,a]of S)f[u]=a;return f},v={class:"right-main ysj-plus-table"},L={key:0,class:"search-base-block"},Y={key:1,class:"search-base-block"},H={class:"table-base-block"},K={key:0,class:"table-base-buttom"},q={key:1,class:"table-base-buttom"},Q={key:0,class:"table-operation"},W={key:2,class:"pagination-container"},y=M({__name:"index",props:{columns:{type:Array,default:()=>[]},searchColumns:{type:Array,default:()=>[]},toolBarRender:{type:Array,default:()=>[]},showIndex:{type:Boolean,default:!0},selection:{type:Boolean,default:!1},pagination:{type:[Boolean,Object],default:!0},dataSource:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!0},height:{type:[String,Number],default:null},maxHeight:{type:[String,Number],default:null},rowKey:{type:[String,Function],default:"id"},treeProps:{type:Object,default:()=>({})},defaultExpandAll:{type:Boolean,default:!1},expandRowKeys:{type:Array,default:()=>[]},rowClassName:{type:[String,Function],default:null},rowStyle:{type:[Object,Function],default:null},cellClassName:{type:[String,Function],default:null},cellStyle:{type:[Object,Function],default:null},headerRowClassName:{type:[String,Function],default:null},headerRowStyle:{type:[Object,Function],default:null},headerCellClassName:{type:[String,Function],default:null},headerCellStyle:{type:[Object,Function],default:null},highlightCurrentRow:{type:Boolean,default:!1},currentRowKey:{type:[String,Number],default:null},emptyText:{type:String,default:"暂无数据"},defaultSort:{type:Object,default:()=>({prop:"",order:""})},tooltipEffect:{type:String,default:"dark"},showSummary:{type:Boolean,default:!1},sumText:{type:String,default:"合计"},summaryMethod:{type:Function,default:null},spanMethod:{type:Function,default:null},selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},lazy:{type:Boolean,default:!1},load:{type:Function,default:null},style:{type:[String,Object],default:null},class:{type:[String,Object],default:null},tableLayout:{type:String,default:"auto"},scrollbarAlwaysOn:{type:Boolean,default:!1},showOverflowTooltip:{type:Boolean,default:!0},fit:{type:Boolean,default:!0},size:{type:String,default:"default"},resizeObserver:{type:Boolean,default:!0},flex:{type:Boolean,default:!1},initSearchParam:{type:Object,default:()=>({})},requestApi:{type:Function,required:!0},pagerCount:{type:Number,default:5},treeApiUrl:{type:[String,Function],default:""}},emits:["update:dataSource","update:loading","update:pagination","select","select-all","selection-change","cell-click","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","expand-change","current-change","size-change","page-change"],setup(d,{expose:S,emit:f}){const u=e.getCurrentInstance(),a=d,i=f,C=e.ref(!1),P=e.ref([]),E=e.ref(0),x=e.ref(1),k=e.ref(10),n=e.ref({...a.initSearchParam}),B=e.ref(null),g=e.ref(!1),R=e.ref(!0),j=e.ref(3),I=e.computed(()=>({children:"children",label:"label"}));e.watch(()=>a.initSearchParam,l=>{n.value={...l}},{deep:!0}),e.watch(()=>a.searchColumns,l=>{l&&l.length>0&&(R.value=!0)},{immediate:!0}),e.watch(()=>a.toolBarRender,l=>{console.log("toolBarRender changed:",l)},{immediate:!0});const V=()=>{x.value=1,w()},T=()=>{B.value&&B.value.resetFields(),n.value={...a.initSearchParam},V()},J=()=>{g.value=!g.value},X=(l,r)=>{i("select",l,r)},Z=l=>{i("select-all",l)},ee=l=>{i("selection-change",l)},te=(l,r,p,_)=>{i("cell-click",l,r,p,_)},ae=(l,r,p)=>{i("row-click",l,r,p)},le=(l,r,p)=>{i("row-contextmenu",l,r,p)},re=(l,r,p)=>{i("row-dblclick",l,r,p)},oe=(l,r)=>{i("header-click",l,r)},ne=(l,r)=>{i("header-contextmenu",l,r)},ie=({column:l,prop:r,order:p})=>{i("sort-change",{column:l,prop:r,order:p})},pe=l=>{i("filter-change",l)},se=(l,r)=>{i("expand-change",l,r)},U=l=>{i("current-change",l)},de=l=>{k.value=l,w()},w=async()=>{try{C.value=!0;const l={pageNum:x.value,pageSize:k.value,...n.value},r=await a.requestApi(l);r.code===200&&(P.value=r.rows||[],E.value=r.total||0)}catch(l){console.error("获取表格数据失败:",l)}finally{C.value=!1}};return S({resetQuery:T,handleQuery:V,getTableData:w}),e.onMounted(()=>{w()}),(l,r)=>{const p=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),O=e.resolveComponent("el-tree-select"),D=e.resolveComponent("el-date-picker"),A=e.resolveComponent("el-input"),z=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-button"),ce=e.resolveComponent("el-form"),he=e.resolveComponent("el-upload"),$=e.resolveComponent("el-table-column"),be=e.resolveComponent("el-table"),me=e.resolveComponent("el-pagination"),ye=e.resolveDirective("hasPermi"),ge=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",v,[e.unref(u).slots.searchBar?(e.openBlock(),e.createElementBlock("div",L,[e.renderSlot(l.$slots,"searchBar",{},void 0,!0)])):d.columns&&d.columns.length>0?(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(ce,{model:n.value,ref_key:"searchRef",ref:B,inline:!0},{default:e.withCtx(()=>[R.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.columns,(t,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[t.showSearch&&b<j.value?(e.openBlock(),e.createBlock(z,{key:0,label:t.title,prop:t.dataIndex},{default:e.withCtx(()=>{var c,s;return[t.showSearch.type==="select"?(e.openBlock(),e.createBlock(_,{key:0,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请选择${t.title}`,clearable:((c=t==null?void 0:t.showSearch)==null?void 0:c.clearable)!=="false",style:e.normalizeStyle(`width: ${t.showSearch.width}px`)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.valueEnum,o=>(e.openBlock(),e.createBlock(p,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable","style"])):t.showSearch.type==="treeSelect"?(e.openBlock(),e.createBlock(O,{key:1,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请选择${t.title}`,data:t.showSearch.data,"value-key":"areaCode","node-key":"areaCode",props:((s=t.showSearch)==null?void 0:s.treeSelectProps)||I.value,filterable:"","render-after-expand":!1,"check-strictly":!0,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","data","props"])):t.showSearch.type==="dateRange"?(e.openBlock(),e.createBlock(D,{key:2,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":t.showSearch.startPlaceholder||"开始日期","end-placeholder":t.showSearch.endPlaceholder||"结束日期"},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):(e.openBlock(),e.createBlock(A,{key:3,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请输入${t.title}`,clearable:"",style:e.normalizeStyle(`width: ${t.showSearch.width}px`)},null,8,["modelValue","onUpdate:modelValue","placeholder","style"]))]}),_:2},1032,["label","prop"])):t.showSearch&&b>=j.value&&g.value?(e.openBlock(),e.createBlock(z,{key:1,label:t.title,prop:t.dataIndex},{default:e.withCtx(()=>{var c,s;return[t.showSearch.type==="select"?(e.openBlock(),e.createBlock(_,{key:0,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请选择${t.title}`,clearable:((c=t==null?void 0:t.showSearch)==null?void 0:c.clearable)!=="false",style:e.normalizeStyle(`width: ${t.showSearch.width}px`)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.valueEnum,o=>(e.openBlock(),e.createBlock(p,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","clearable","style"])):t.showSearch.type==="treeSelect"?(e.openBlock(),e.createBlock(O,{key:1,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请选择${t.title}`,data:t.showSearch.data,"value-key":"areaCode","node-key":"areaCode",props:((s=t.showSearch)==null?void 0:s.treeSelectProps)||I.value,filterable:"","render-after-expand":!1,"check-strictly":!0,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","data","props"])):t.showSearch.type==="dateRange"?(e.openBlock(),e.createBlock(D,{key:2,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":t.showSearch.startPlaceholder||"开始日期","end-placeholder":t.showSearch.endPlaceholder||"结束日期"},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):(e.openBlock(),e.createBlock(A,{key:3,modelValue:n.value[t.dataIndex],"onUpdate:modelValue":o=>n.value[t.dataIndex]=o,placeholder:t.showSearch.placeholder||`请输入${t.title}`,clearable:"",style:e.normalizeStyle(`width: ${t.showSearch.width}px`)},null,8,["modelValue","onUpdate:modelValue","placeholder","style"]))]}),_:2},1032,["label","prop"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(z,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",icon:"Search",onClick:V,class:"search-btn"},{default:e.withCtx(()=>r[2]||(r[2]=[e.createTextVNode("搜索")])),_:1,__:[2]}),e.createVNode(m,{icon:"RefreshLeft",onClick:T,type:"warning",class:"reset-btn"},{default:e.withCtx(()=>r[3]||(r[3]=[e.createTextVNode("重置")])),_:1,__:[3]}),d.columns.filter(t=>t.showSearch).length>j.value?(e.openBlock(),e.createBlock(m,{key:0,icon:g.value?"ArrowUp":"ArrowDown",type:"text",size:"small",onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value?"收起":"展开"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)]),_:1})],64)):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0),e.createElementVNode("div",H,[e.unref(u).slots.toolBar?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(l.$slots,"toolBar",{},void 0,!0)])):a.toolBarRender&&a.toolBarRender.length>0?(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.toolBarRender,(t,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[t.toolBarProps&&t.toolBarProps.type==="el-upload"?(e.openBlock(),e.createBlock(he,{key:0,accept:".xlsx, .xls",action:t.toolBarProps.action,headers:t.toolBarProps.headers,"on-progress":t.toolBarProps.handleProgress,"show-file-list":!1,"on-success":t.toolBarProps.handleUploadSuccess,style:{"margin-right":"8px"}},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(m,{plain:"",icon:t.icon||"Upload",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title||"导入"),1)]),_:2},1032,["icon"])),[[ye,[`${t==null?void 0:t.hasPermission}`]]])]),_:2},1032,["action","headers","on-progress","on-success"])):(e.openBlock(),e.createBlock(m,{key:1,type:t.type||"primary",icon:t.icon,plain:"",onClick:t.handleClick,style:{"margin-right":"8px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1032,["type","icon","onClick"]))],64))),128))])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(be,{data:P.value,border:a.border,stripe:a.stripe,height:a.height,"max-height":a.maxHeight,"row-key":a.rowKey,"tree-props":a.treeProps,"default-expand-all":a.defaultExpandAll,"expand-row-keys":a.expandRowKeys,"row-class-name":a.rowClassName,"row-style":a.rowStyle,"cell-class-name":a.cellClassName,"cell-style":a.cellStyle,"header-row-class-name":a.headerRowClassName,"header-row-style":a.headerRowStyle,"header-cell-class-name":a.headerCellClassName,"header-cell-style":a.headerCellStyle,"highlight-current-row":a.highlightCurrentRow,"current-row-key":a.currentRowKey,"empty-text":a.emptyText,"default-sort":a.defaultSort,"tooltip-effect":a.tooltipEffect,"show-summary":a.showSummary,"sum-text":a.sumText,"summary-method":a.summaryMethod,"span-method":a.spanMethod,"select-on-indeterminate":a.selectOnIndeterminate,indent:a.indent,lazy:a.lazy,load:a.load,style:e.normalizeStyle(a.style),class:e.normalizeClass(a.class),"table-layout":a.tableLayout,"scrollbar-always-on":a.scrollbarAlwaysOn,"show-overflow-tooltip":a.showOverflowTooltip,fit:a.fit,size:a.size,"resize-observer":a.resizeObserver,flex:a.flex,onSelect:X,onSelectAll:Z,onSelectionChange:ee,onCellClick:te,onRowClick:ae,onRowContextmenu:le,onRowDblclick:re,onHeaderClick:oe,onHeaderContextmenu:ne,onSortChange:ie,onFilterChange:pe,onExpandChange:se,onCurrentChange:U},{default:e.withCtx(()=>[a.selection?(e.openBlock(),e.createBlock($,{key:0,type:"selection",width:"55",align:"center",fixed:"left"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,(t,b)=>(e.openBlock(),e.createBlock($,{key:b,prop:t.dataIndex,label:t.title,type:t.type,width:t.width,"min-width":t.minWidth,fixed:t.fixed,sortable:t.sorter,"sort-method":t.sortMethod,"sort-by":t.sortBy,"sort-orders":t.sortOrders,resizable:t.resizable,formatter:t.formatter,"show-overflow-tooltip":t.showOverflowTooltip,align:t.align,"header-align":t.headerAlign,"class-name":t.className,"label-class-name":t.labelClassName,"reserve-selection":t.reserveSelection,filters:t.filters,"filter-placement":t.filterPlacement,"filter-multiple":t.filterMultiple,"filter-method":t.filterMethod,"filtered-value":t.filteredValue},{default:e.withCtx(c=>[t.render?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.columnsType==="operate"?(e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.render(c.row),(s,o)=>(e.openBlock(),e.createBlock(m,{key:o,type:s.type||"text",icon:s.icon,plain:s.plain,onClick:s.handleFun},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.title),1)]),_:2},1032,["type","icon","plain","onClick"]))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.render(c.row).text),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.row[t.dataIndex]),1)],64))]),_:2},1032,["prop","label","type","width","min-width","fixed","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"]))),128))]),_:1},8,["data","border","stripe","height","max-height","row-key","tree-props","default-expand-all","expand-row-keys","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","highlight-current-row","current-row-key","empty-text","default-sort","tooltip-effect","show-summary","sum-text","summary-method","span-method","select-on-indeterminate","indent","lazy","load","style","class","table-layout","scrollbar-always-on","show-overflow-tooltip","fit","size","resize-observer","flex"])),[[ge,C.value]]),a.pagination?(e.openBlock(),e.createElementBlock("div",W,[e.createVNode(me,{"current-page":x.value,"onUpdate:currentPage":r[0]||(r[0]=t=>x.value=t),"page-size":k.value,"onUpdate:pageSize":r[1]||(r[1]=t=>k.value=t),"page-sizes":[10,20,30,40],small:a.pagination.small,background:a.pagination.background,layout:a.pagination.layout||"total, sizes, prev, pager, next, jumper",total:E.value,onSizeChange:de,onCurrentChange:U},null,8,["current-page","page-size","small","background","layout","total"])])):e.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-12910e8a"]]),ke="",we=`@charset "UTF-8";:root{--el-color-primary: #D40000 !important;--el-color-primary-light-3: #ff4d4d !important;--el-color-primary-light-5: #ff8080 !important;--el-color-primary-light-7: #ffb3b3 !important;--el-color-primary-light-8: #ffcccc !important;--el-color-primary-light-9: #ffe6e6 !important;--el-color-primary-dark-2: #a30000 !important}.right-main{padding:20px;background-color:#fff;border-radius:4px}.search-base-block{margin-bottom:20px;padding:20px;background-color:#f5f7fa;border-radius:4px}.table-base-block{background-color:#fff;border-radius:4px}.table-base-buttom{margin-bottom:20px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.pagination-container{margin-top:20px;text-align:right}.search-btn,.reset-btn{margin-right:8px}.ysj-plus-table :deep(.el-table) .el-table__header-wrapper th{background-color:#f5f7fa;color:#606266;font-weight:500;height:50px}.ysj-plus-table :deep(.el-table) .el-table__row td{padding:8px 0}.ysj-plus-table :deep(.el-table) .cell{padding:0 2px!important}.ysj-plus-table :deep(.el-table__header-wrapper) th,.ysj-plus-table :deep(.el-table__fixed-header-wrapper) th{word-break:break-word;background-color:#f8f8f9!important;color:#515a6e;height:30px;font-size:14px}.ysj-plus-table :deep(.el-table__body-wrapper) .el-button [class*=el-icon-]+span{margin-left:1px}.ysj-plus-table :deep(.el-pagination) .el-pagination__total{margin-right:16px}.ysj-plus-table :deep(.el-pagination) .el-pagination__sizes{margin-right:16px}.ysj-plus-table :deep(.el-pagination).is-background .el-pager li:not(.is-disabled).is-active{background-color:var(--el-color-primary)!important;border-radius:6px!important}.ysj-plus-table :deep(.el-pagination).is-background .btn-next,.ysj-plus-table :deep(.el-pagination).is-background .btn-prev,.ysj-plus-table :deep(.el-pagination).is-background .el-pager li{border-radius:6px!important}.ysj-plus-table :deep(.el-form) .el-form-item{margin-bottom:18px;margin-right:18px}.ysj-plus-table :deep(.el-form) .el-form-item:last-child{margin-right:0}.ysj-plus-table :deep(.el-button--primary){--el-button-bg-color: var(--el-color-primary) !important;--el-button-border-color: var(--el-color-primary) !important;--el-button-hover-bg-color: var(--el-color-primary-light-3) !important;--el-button-hover-border-color: var(--el-color-primary-light-3) !important;--el-button-active-bg-color: var(--el-color-primary-dark-2) !important;--el-button-active-border-color: var(--el-color-primary-dark-2) !important;background-color:var(--el-color-primary)!important;border:0!important;color:#fff!important}.ysj-plus-table :deep(.el-button--primary):hover{background-color:var(--el-color-primary-light-3)!important;border-color:var(--el-color-primary-light-3)!important;color:#fff!important}.ysj-plus-table :deep(.el-button--text){background:unset!important;border:unset!important;border-radius:unset!important;font-size:14px!important;color:var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--text) span{font-size:14px!important}.ysj-plus-table :deep(.el-button--text):hover{background-color:unset!important;color:var(--el-color-primary)!important;border-color:var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--primary.is-plain){background-color:unset!important;color:var(--el-color-primary)!important;border-color:var(--el-color-primary)!important;border:1px solid var(--el-color-primary)!important}.ysj-plus-table :deep(.el-button--primary.is-plain):hover{background-color:var(--el-color-primary)!important;color:#fff!important}.ysj-plus-table .table-operation{display:flex;justify-content:center;gap:8px}.ysj-plus-table .table-operation :deep(.el-button){padding:4px 8px;font-size:12px}.ysj-plus-table :deep(.el-table) .cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ysj-plus-table .table-image{width:50px;height:50px;object-fit:cover;border-radius:4px}.ysj-plus-table .table-tag{margin-right:4px;margin-bottom:4px}.ysj-plus-table .table-status{display:inline-block;padding:2px 8px;border-radius:2px;font-size:12px}::-webkit-scrollbar-track-piece{background:#fff}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#cbcbcb;border-radius:20px}.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.fr{float:right}.fl{float:left}.pr-5{padding-right:5px}.pl-5{padding-left:5px}.block{display:block}.pointer{cursor:pointer}.inlineBlock{display:block}@media (max-width: 768px){.pagination-container .el-pagination>.el-pagination__jump{display:none!important}.pagination-container .el-pagination>.el-pagination__sizes{display:none!important}} `;y.name="YsjPlusTable";const F=function(d){d.component(y.name,y)};typeof window<"u"&&window.Vue&&F(window.Vue);const G={install:F,PlusTable:y};h.PlusTable=y,h.default=G,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); //# sourceMappingURL=plus-table.umd.js.map