vxe-table 4.7.71 → 4.7.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +29 -14
- package/es/table/module/export/export-panel.js +13 -4
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +32 -14
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +20 -9
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/export-panel.js +9 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/custom/panel.ts +29 -14
- package/packages/table/module/export/export-panel.ts +13 -4
- /package/es/{iconfont.1724652383108.ttf → iconfont.1724722752271.ttf} +0 -0
- /package/es/{iconfont.1724652383108.woff → iconfont.1724722752271.woff} +0 -0
- /package/es/{iconfont.1724652383108.woff2 → iconfont.1724722752271.woff2} +0 -0
- /package/lib/{iconfont.1724652383108.ttf → iconfont.1724722752271.ttf} +0 -0
- /package/lib/{iconfont.1724652383108.woff → iconfont.1724722752271.woff} +0 -0
- /package/lib/{iconfont.1724652383108.woff2 → iconfont.1724722752271.woff2} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_ui=require("../../../ui"),_utils=require("../../../ui/src/utils"),_dom=require("../../../ui/src/dom"),_log=require("../../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const{getI18n,getIcon}=_ui.VxeUI;var _default=exports.default=(0,_vue.defineComponent)({name:"TableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(B){const L=_ui.VxeUI.getComponent("VxeModal"),y=_ui.VxeUI.getComponent("VxeDrawer"),A=_ui.VxeUI.getComponent("VxeButton"),F=_ui.VxeUI.getComponent("VxeInput"),M=_ui.VxeUI.getComponent("VxeTooltip"),H=_ui.VxeUI.getComponent("VxeRadioGroup"),d=(0,_vue.inject)("$xeTable",{}),R=d["reactData"],{computeCustomOpts:D,computeColumnOpts:U,computeIsMaxFixedColumn:S}=d.getComputeMaps(),K=(0,_vue.ref)(),z=(0,_vue.ref)(),W=(0,_vue.ref)(),X=(0,_vue.ref)();let r;const q=e=>{var t=B["customStore"];t.activeWrapper=!0,d.customOpenEvent(e)},j=e=>{const t=B["customStore"];t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||d.customCloseEvent(e)},300)},G=({$event:e})=>{var t=R["customColumnList"];const{allowVisible:s,allowSort:a,allowFixed:n,allowResizable:r}=D.value;_xeUtils.default.eachTree(t,(e,t,o,l,i)=>{i||(a&&(e.renderSortNumber=t+1),n&&(e.fixed=e.renderFixed)),r&&e.renderVisible&&(!e.children||e.children.length)&&e.renderResizeWidth!==e.renderWidth&&(e.resizeWidth=e.renderResizeWidth,e.renderWidth=e.renderResizeWidth),s&&(e.visible=e.renderVisible)}),d.closeCustom(),d.emitCustomEvent("confirm",e),d.saveCustomStore("confirm")},$=({$event:e})=>{var t=B["customStore"],o=R["customColumnList"];const{oldSortMaps:i,oldFixedMaps:s,oldVisibleMaps:a}=t,{allowVisible:n,allowSort:r,allowFixed:c,allowResizable:u}=D.value;_xeUtils.default.eachTree(o,e=>{var t=e.getKey(),o=!!a[t],l=s[t]||"";n&&(e.renderVisible=o,e.visible=o),c&&(e.renderFixed=l,e.fixed=l),r&&(e.renderSortNumber=i[t]||0),u&&(e.renderResizeWidth=e.renderWidth)},{children:"children"}),d.closeCustom(),d.emitCustomEvent("cancel",e)},o=e=>{d.resetColumn(!0),d.closeCustom(),d.emitCustomEvent("reset",e)},P=({$event:t})=>{_ui.VxeUI.modal?_ui.VxeUI.modal.confirm({content:getI18n("vxe.custom.cstmConfirmRestore"),className:"vxe-table--ignore-clear",escClosable:!0}).then(e=>{"confirm"===e&&o(t)}):o(t)},l=t=>{var e=R["customColumnList"],e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e["parent"],e.children)&&e.children.length&&(e.renderVisible=e.children.every(e=>e.renderVisible),e.halfVisible=!e.renderVisible&&e.children.some(e=>e.renderVisible||e.halfVisible),l(e))},Y=e=>{const t=!e.renderVisible;var o=D.value;_xeUtils.default.eachTree([e],e=>{e.renderVisible=t,e.halfVisible=!1}),l(e),o.immediate&&(d.handleCustom(),d.saveCustomStore("update:visible")),d.checkCustomStatus()},Z=(e,t)=>{var o=S.value;e.renderFixed===t?e.renderFixed="":o&&!e.renderFixed||(e.renderFixed=t)},J=()=>{var e=B["customStore"],t=R["customColumnList"];const o=D.value["checkMethod"],l=!e.isAll;_xeUtils.default.eachTree(t,e=>{o&&!o({column:e})||(e.renderVisible=l,e.halfVisible=!1)}),e.isAll=l,d.checkCustomStatus()},Q=e=>{var e=e.currentTarget.parentNode.parentNode,t=e.getAttribute("colid"),t=d.getColumnById(t);e.draggable=!0,X.value=t,(0,_dom.addClass)(e,"active--drag-origin")},ee=e=>{var e=e.currentTarget.parentNode.parentNode,t=W.value;e.draggable=!1,(X.value=null,_dom.removeClass)(e,"active--drag-origin"),t&&(t.style.display="")},te=e=>{var t=new Image;e.dataTransfer&&e.dataTransfer.setDragImage(t,0,0)},oe=e=>{var t=R["customColumnList"],e=e.currentTarget,o=W.value;if(r){if(r!==e){var l=r.getAttribute("drag-pos"),i=e.getAttribute("colid");const a=d.getColumnById(i);if(!a)return;var i=_xeUtils.default.findIndexOf(t,e=>e.id===a.id),s=r.getAttribute("colid");const n=d.getColumnById(s);if(!n)return;t.splice(i,1);s=_xeUtils.default.findIndexOf(t,e=>e.id===n.id);t.splice(s+("bottom"===l?1:0),0,a)}r.draggable=!1,r.removeAttribute("drag-pos"),(0,_dom.removeClass)(r,"active--drag-target")}X.value=null,e.draggable=!1,e.removeAttribute("drag-pos"),o&&(o.style.display=""),(0,_dom.removeClass)(e,"active--drag-target"),(0,_dom.removeClass)(e,"active--drag-origin")},le=e=>{var t=e.currentTarget,o=(r!==t&&(0,_dom.removeClass)(r,"active--drag-target"),t.getAttribute("colid")),o=d.getColumnById(o);o&&1===o.level&&(e.preventDefault(),o=e.clientY-t.getBoundingClientRect().y<t.clientHeight/2?"top":"bottom",(0,_dom.addClass)(t,"active--drag-target"),t.setAttribute("drag-pos",o),r=t);{o=e;var l=W.value,i=z.value;i&&l&&(e=(t=i.parentNode).getBoundingClientRect(),l.style.display="block",l.style.top=Math.min(t.clientHeight-t.scrollTop-l.clientHeight,o.clientY-e.y)+"px",l.style.left=Math.min(t.clientWidth-t.scrollLeft-l.clientWidth-16,o.clientX-e.x)+"px")}};return"development"===process.env.NODE_ENV&&(0,_vue.nextTick)(()=>{L||(0,_log.errLog)("vxe.error.reqComp",["vxe-modal"]),A||(0,_log.errLog)("vxe.error.reqComp",["vxe-button"]),F||(0,_log.errLog)("vxe.error.reqComp",["vxe-input"]),M||(0,_log.errLog)("vxe.error.reqComp",["vxe-tooltip"]),H||(0,_log.errLog)("vxe.error.reqComp",["vxe-radio-group"])}),()=>{var e=D.value;if(["modal","drawer","popup"].includes(""+e.mode)){const a=B["customStore"];e=R["customColumnList"];const n=D.value,{modalOptions:r,drawerOptions:c,allowVisible:u,allowSort:d,allowFixed:v,allowResizable:m,checkMethod:h,visibleMethod:x}=n,p=U.value["maxFixedSize"];var t=n["mode"],o=Object.assign({},r),l=Object.assign({},c);const _=S.value,g=[],b=(_xeUtils.default.eachTree(e,(t,e,o,l,i)=>{if(!x||x({column:t})){var s=t.renderVisible,a=t.halfVisible,n=(0,_utils.formatText)(t.getTitle(),1),r=t.children&&t.children.length;const c=!!h&&!h({column:t});g.push((0,_vue.h)("tr",{key:t.id,colid:t.id,class:["vxe-table-custom-popup--row level--"+t.level,{"is--group":r}],onDragstart:te,onDragend:oe,onDragover:le},[u?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--visible"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":s,"is--indeterminate":a,"is--disabled":c}],title:getI18n("vxe.custom.setting.colVisible"),onClick:()=>{c||Y(t)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",a?getIcon().TABLE_CHECKBOX_INDETERMINATE:s?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})])]):(0,_vue.createCommentVNode)(),d?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--sort"},[1===t.level?(0,_vue.h)("span",{class:"vxe-table-custom-popup--column-sort-btn",title:getI18n("vxe.custom.setting.sortHelpTip"),onMousedown:Q,onMouseup:ee},[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})]):(0,_vue.h)("span","-")]):(0,_vue.createCommentVNode)(),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--name"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--name",title:n},n)]),m?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--resizable"},[!s||t.children&&t.children.length?(0,_vue.h)("span","-"):F?(0,_vue.h)(F,{type:"integer",modelValue:t.renderResizeWidth,"onUpdate:modelValue"(e){t.renderResizeWidth=Math.max(0,Number(e))}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--fixed"},[i?(0,_vue.h)("span","-"):H?(0,_vue.h)(H,{modelValue:t.renderFixed||"",type:"button",size:"mini",options:[{label:getI18n("vxe.custom.setting.fixedLeft"),value:"left",disabled:_},{label:getI18n("vxe.custom.setting.fixedUnset"),value:""},{label:getI18n("vxe.custom.setting.fixedRight"),value:"right",disabled:_}],"onUpdate:modelValue"(e){t.renderFixed=e}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}}),a.isAll),C=a.isIndeterminate;e={default:()=>(0,_vue.h)("div",{ref:z,class:"vxe-table-custom-popup--body"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-wrapper"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[u?(0,_vue.h)("col",{style:{width:"80px"}}):(0,_vue.createCommentVNode)(),d?(0,_vue.h)("col",{style:{width:"80px"}}):(0,_vue.createCommentVNode)(),(0,_vue.h)("col",{style:{minWidth:"120px"}}),m?(0,_vue.h)("col",{style:{width:"140px"}}):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("col",{style:{width:"200px"}}):(0,_vue.createCommentVNode)()]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[u?(0,_vue.h)("th",{},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":b,"is--indeterminate":C}],title:getI18n("vxe.table.allTitle"),onClick:J},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",C?getIcon().TABLE_CHECKBOX_INDETERMINATE:b?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))])]):(0,_vue.createCommentVNode)(),d?(0,_vue.h)("th",{},[(0,_vue.h)("span",{class:"vxe-table-custom-popup--table-sort-help-title"},getI18n("vxe.custom.setting.colSort")),M?(0,_vue.h)(M,{enterable:!0,content:getI18n("vxe.custom.setting.sortHelpTip"),popupClassName:"vxe-table--ignore-clear"},{default:()=>(0,_vue.h)("i",{class:"vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill"})}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colTitle")),m?(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colResizable")):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("th",{},getI18n("vxe.custom.setting."+(p?"colFixedMax":"colFixed"),[p])):(0,_vue.createCommentVNode)()])]),(0,_vue.h)(_vue.TransitionGroup,{class:"vxe-table-custom--body",tag:"tbody",name:"vxe-table-custom--list"},{default:()=>g})])]),(0,_vue.h)("div",{ref:W,class:"vxe-table-custom-popup--drag-hint"},getI18n("vxe.custom.cstmDragTarget",[X.value?X.value.getTitle():""]))]),footer:()=>(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[A?(0,_vue.h)(A,{content:n.resetButtonText||getI18n("vxe.custom.cstmRestore"),onClick:P}):(0,_vue.createCommentVNode)(),A?(0,_vue.h)(A,{content:n.resetButtonText||getI18n("vxe.custom.cstmCancel"),onClick:$}):(0,_vue.createCommentVNode)(),A?(0,_vue.h)(A,{status:"primary",content:n.confirmButtonText||getI18n("vxe.custom.cstmConfirm"),onClick:G}):(0,_vue.createCommentVNode)()])};return"drawer"===t?y?(0,_vue.h)(y,{key:"drawer",className:["vxe-table-custom-drawer-wrapper","vxe-table--ignore-clear",l.className||""].join(" "),modelValue:a.visible,title:l.title||getI18n("vxe.custom.cstmTitle"),width:l.width||Math.min(880,document.documentElement.clientWidth),position:l.position,escClosable:!!l.escClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){a.visible=e}},e):(0,_vue.createCommentVNode)():L?(0,_vue.h)(L,{key:"modal",className:["vxe-table-custom-modal-wrapper","vxe-table--ignore-clear",o.className||""].join(" "),modelValue:a.visible,title:o.title||getI18n("vxe.custom.cstmTitle"),width:o.width||Math.min(880,document.documentElement.clientWidth),minWidth:o.minWidth||700,height:o.height||Math.min(680,document.documentElement.clientHeight),minHeight:o.minHeight||400,showZoom:o.showZoom,showMaximize:o.showMaximize,showMinimize:o.showMinimize,mask:o.mask,lockView:o.lockView,resize:o.resize,escClosable:!!o.escClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){a.visible=e}},e):(0,_vue.createCommentVNode)()}{t=B["customStore"],l=R["customColumnList"],o=D.value,e=t["maxHeight"];const{checkMethod:f,visibleMethod:I,allowVisible:T,allowSort:V,allowFixed:E,trigger:N,placement:w}=o,O=S.value,k=[];var i={},l=("hover"===N&&(i.onMouseenter=q,i.onMouseleave=j),_xeUtils.default.eachTree(l,(e,t,o,l,i)=>{if(!I||I({column:e})){var s=e.renderVisible,a=e.halfVisible,n=e.children&&e.children.length,r=(0,_utils.formatText)(e.getTitle(),1);const c=!!f&&!f({column:e});k.push((0,_vue.h)("li",{key:e.id,colid:e.id,class:["vxe-table-custom--option","level--"+e.level,{"is--group":n}],onDragstart:te,onDragend:oe,onDragover:le},[T?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":s,"is--indeterminate":a,"is--disabled":c}],title:getI18n("vxe.custom.setting.colVisible"),onClick:()=>{c||Y(e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",a?getIcon().TABLE_CHECKBOX_INDETERMINATE:s?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]):(0,_vue.createCommentVNode)(),V&&1===e.level?(0,_vue.h)("div",{class:"vxe-table-custom--sort-option"},[(0,_vue.h)("span",{class:"vxe-table-custom--sort-btn",title:getI18n("vxe.custom.setting.sortHelpTip"),onMousedown:Q,onMouseup:ee},[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-table-custom--checkbox-label",title:r},r),!i&&E?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[(0,_vue.h)("span",{class:["vxe-table-custom--fixed-left-option","left"===e.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":"left"===e.renderFixed,"is--disabled":O&&!e.renderFixed}],title:getI18n("left"===e.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedLeft"),onClick:()=>{Z(e,"left")}}),(0,_vue.h)("span",{class:["vxe-table-custom--fixed-right-option","right"===e.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":"right"===e.renderFixed,"is--disabled":O&&!e.renderFixed}],title:getI18n("right"===e.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedRight"),onClick:()=>{Z(e,"right")}})]):(0,_vue.createCommentVNode)()]))}}),t.isAll),s=t.isIndeterminate;return(0,_vue.h)("div",{ref:K,key:"simple",class:["vxe-table-custom-wrapper","placement--"+w,{"is--active":t.visible}],style:e&&!["left","right"].includes(w)?{maxHeight:e+"px"}:{}},t.visible?[(0,_vue.h)("ul",{class:"vxe-table-custom--header"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[T?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":l,"is--indeterminate":s}],title:getI18n("vxe.table.allTitle"),onClick:J},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:l?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))]):(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.table.customTitle"))])]),(0,_vue.h)("div",{ref:z,class:"vxe-table-custom--list-wrapper"},[(0,_vue.h)(_vue.TransitionGroup,Object.assign({class:"vxe-table-custom--body",name:"vxe-table-custom--list",tag:"ul"},i),{default:()=>k}),(0,_vue.h)("div",{ref:W,class:"vxe-table-custom-popup--drag-hint"},getI18n("vxe.custom.cstmDragTarget",[X.value?X.value.getTitle():""]))]),o.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},[(0,_vue.h)("button",{class:"btn--reset",onClick:P},o.resetButtonText||getI18n("vxe.table.customRestore")),o.immediate?(0,_vue.createCommentVNode)():(0,_vue.h)("button",{class:"btn--cancel",onClick:$},o.resetButtonText||getI18n("vxe.table.customCancel")),(0,_vue.h)("button",{class:"btn--confirm",onClick:G},o.confirmButtonText||getI18n("vxe.table.customConfirm"))]):null]:[]);return}}}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_ui=require("../../../ui"),_utils=require("../../../ui/src/utils"),_dom=require("../../../ui/src/dom"),_log=require("../../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const{getI18n,getIcon}=_ui.VxeUI;var _default=exports.default=(0,_vue.defineComponent)({name:"TableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(L){const A=_ui.VxeUI.getComponent("VxeModal"),M=_ui.VxeUI.getComponent("VxeDrawer"),F=_ui.VxeUI.getComponent("VxeButton"),H=_ui.VxeUI.getComponent("VxeInput"),R=_ui.VxeUI.getComponent("VxeTooltip"),D=_ui.VxeUI.getComponent("VxeRadioGroup"),d=(0,_vue.inject)("$xeTable",{}),U=d["reactData"],{computeCustomOpts:S,computeColumnOpts:K,computeIsMaxFixedColumn:z}=d.getComputeMaps(),W=(0,_vue.ref)(),X=(0,_vue.ref)(),q=(0,_vue.ref)(),j=(0,_vue.ref)();let r;const G=e=>{var t=L["customStore"];t.activeWrapper=!0,d.customOpenEvent(e)},$=e=>{const t=L["customStore"];t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||d.customCloseEvent(e)},300)},P=({$event:e})=>{var t=U["customColumnList"];const{allowVisible:s,allowSort:a,allowFixed:n,allowResizable:r}=S.value;_xeUtils.default.eachTree(t,(e,t,o,l,i)=>{i||(a&&(e.renderSortNumber=t+1),n&&(e.fixed=e.renderFixed)),r&&e.renderVisible&&(!e.children||e.children.length)&&e.renderResizeWidth!==e.renderWidth&&(e.resizeWidth=e.renderResizeWidth,e.renderWidth=e.renderResizeWidth),s&&(e.visible=e.renderVisible)}),d.closeCustom(),d.emitCustomEvent("confirm",e),d.saveCustomStore("confirm")},Y=({$event:e})=>{var t=L["customStore"],o=U["customColumnList"];const{oldSortMaps:i,oldFixedMaps:s,oldVisibleMaps:a}=t,{allowVisible:n,allowSort:r,allowFixed:c,allowResizable:u}=S.value;_xeUtils.default.eachTree(o,e=>{var t=e.getKey(),o=!!a[t],l=s[t]||"";n&&(e.renderVisible=o,e.visible=o),c&&(e.renderFixed=l,e.fixed=l),r&&(e.renderSortNumber=i[t]||0),u&&(e.renderResizeWidth=e.renderWidth)},{children:"children"}),d.closeCustom(),d.emitCustomEvent("cancel",e)},o=e=>{d.resetColumn(!0),d.closeCustom(),d.emitCustomEvent("reset",e)},Z=({$event:t})=>{_ui.VxeUI.modal?_ui.VxeUI.modal.confirm({content:getI18n("vxe.custom.cstmConfirmRestore"),className:"vxe-table--ignore-clear",escClosable:!0}).then(e=>{"confirm"===e&&o(t)}):o(t)},l=t=>{var e=U["customColumnList"],e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e["parent"],e.children)&&e.children.length&&(e.renderVisible=e.children.every(e=>e.renderVisible),e.halfVisible=!e.renderVisible&&e.children.some(e=>e.renderVisible||e.halfVisible),l(e))},J=e=>{const t=!e.renderVisible;var o=S.value;_xeUtils.default.eachTree([e],e=>{e.renderVisible=t,e.halfVisible=!1}),l(e),o.immediate&&(d.handleCustom(),d.saveCustomStore("update:visible")),d.checkCustomStatus()},Q=(e,t)=>{var o=z.value;e.renderFixed===t?e.renderFixed="":o&&!e.renderFixed||(e.renderFixed=t)},ee=()=>{var e=L["customStore"],t=U["customColumnList"];const o=S.value["checkMethod"],l=!e.isAll;_xeUtils.default.eachTree(t,e=>{o&&!o({column:e})||(e.renderVisible=l,e.halfVisible=!1)}),e.isAll=l,d.checkCustomStatus()},te=e=>{var e=e.currentTarget.parentNode.parentNode,t=e.getAttribute("colid"),t=d.getColumnById(t);e.draggable=!0,j.value=t,(0,_dom.addClass)(e,"active--drag-origin")},oe=e=>{var e=e.currentTarget.parentNode.parentNode,t=q.value;e.draggable=!1,(j.value=null,_dom.removeClass)(e,"active--drag-origin"),t&&(t.style.display="")},le=e=>{var t=new Image;e.dataTransfer&&e.dataTransfer.setDragImage(t,0,0)},ie=e=>{var t=U["customColumnList"],e=e.currentTarget,o=q.value;if(r){if(r!==e){var l=r.getAttribute("drag-pos"),i=e.getAttribute("colid");const a=d.getColumnById(i);if(!a)return;var i=_xeUtils.default.findIndexOf(t,e=>e.id===a.id),s=r.getAttribute("colid");const n=d.getColumnById(s);if(!n)return;t.splice(i,1);s=_xeUtils.default.findIndexOf(t,e=>e.id===n.id);t.splice(s+("bottom"===l?1:0),0,a)}r.draggable=!1,r.removeAttribute("drag-pos"),(0,_dom.removeClass)(r,"active--drag-target")}j.value=null,e.draggable=!1,e.removeAttribute("drag-pos"),o&&(o.style.display=""),(0,_dom.removeClass)(e,"active--drag-target"),(0,_dom.removeClass)(e,"active--drag-origin")},se=e=>{var t=e.currentTarget,o=(r!==t&&(0,_dom.removeClass)(r,"active--drag-target"),t.getAttribute("colid")),o=d.getColumnById(o);o&&1===o.level&&(e.preventDefault(),o=e.clientY-t.getBoundingClientRect().y<t.clientHeight/2?"top":"bottom",(0,_dom.addClass)(t,"active--drag-target"),t.setAttribute("drag-pos",o),r=t);{o=e;var l=q.value,i=X.value;i&&l&&(e=(t=i.parentNode).getBoundingClientRect(),l.style.display="block",l.style.top=Math.min(t.clientHeight-t.scrollTop-l.clientHeight,o.clientY-e.y)+"px",l.style.left=Math.min(t.clientWidth-t.scrollLeft-l.clientWidth-16,o.clientX-e.x)+"px")}};return"development"===process.env.NODE_ENV&&(0,_vue.nextTick)(()=>{A||(0,_log.errLog)("vxe.error.reqComp",["vxe-modal"]),F||(0,_log.errLog)("vxe.error.reqComp",["vxe-button"]),H||(0,_log.errLog)("vxe.error.reqComp",["vxe-input"]),R||(0,_log.errLog)("vxe.error.reqComp",["vxe-tooltip"]),D||(0,_log.errLog)("vxe.error.reqComp",["vxe-radio-group"])}),()=>{var e=S.value;if(["modal","drawer","popup"].includes(""+e.mode)){const n=L["customStore"];e=U["customColumnList"];const r=S.value,{modalOptions:c,drawerOptions:u,allowVisible:d,allowSort:v,allowFixed:m,allowResizable:h,checkMethod:x,visibleMethod:p}=r,_=K.value["maxFixedSize"];var t=r["mode"],o=Object.assign({},c),l=Object.assign({},u);const g=z.value,b=[],C=(_xeUtils.default.eachTree(e,(t,e,o,l,i)=>{if(!p||p({column:t})){var s=t.renderVisible,a=t.halfVisible,n=(0,_utils.formatText)(t.getTitle(),1),r=t.children&&t.children.length;const c=!!x&&!x({column:t});b.push((0,_vue.h)("tr",{key:t.id,colid:t.id,class:["vxe-table-custom-popup--row level--"+t.level,{"is--group":r}],onDragstart:le,onDragend:ie,onDragover:se},[d?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--visible"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":s,"is--indeterminate":a,"is--disabled":c}],title:getI18n("vxe.custom.setting.colVisible"),onClick:()=>{c||J(t)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",a?getIcon().TABLE_CHECKBOX_INDETERMINATE:s?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})])]):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--sort"},[1===t.level?(0,_vue.h)("span",{class:"vxe-table-custom-popup--column-sort-btn",title:getI18n("vxe.custom.setting.sortHelpTip"),onMousedown:te,onMouseup:oe},[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})]):(0,_vue.h)("span","-")]):(0,_vue.createCommentVNode)(),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--name"},["html"===t.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom-popup--name",innerHTML:n}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom-popup--name",title:n},n)]),h?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--resizable"},[!s||t.children&&t.children.length?(0,_vue.h)("span","-"):H?(0,_vue.h)(H,{type:"integer",modelValue:t.renderResizeWidth,"onUpdate:modelValue"(e){t.renderResizeWidth=Math.max(0,Number(e))}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),m?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--fixed"},[i?(0,_vue.h)("span","-"):D?(0,_vue.h)(D,{modelValue:t.renderFixed||"",type:"button",size:"mini",options:[{label:getI18n("vxe.custom.setting.fixedLeft"),value:"left",disabled:g},{label:getI18n("vxe.custom.setting.fixedUnset"),value:""},{label:getI18n("vxe.custom.setting.fixedRight"),value:"right",disabled:g}],"onUpdate:modelValue"(e){t.renderFixed=e}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}}),n.isAll),f=n.isIndeterminate,I=j.value;e={default:()=>(0,_vue.h)("div",{ref:X,class:"vxe-table-custom-popup--body"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-wrapper"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[d?(0,_vue.h)("col",{style:{width:"80px"}}):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("col",{style:{width:"80px"}}):(0,_vue.createCommentVNode)(),(0,_vue.h)("col",{style:{minWidth:"120px"}}),h?(0,_vue.h)("col",{style:{width:"140px"}}):(0,_vue.createCommentVNode)(),m?(0,_vue.h)("col",{style:{width:"200px"}}):(0,_vue.createCommentVNode)()]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[d?(0,_vue.h)("th",{},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":C,"is--indeterminate":f}],title:getI18n("vxe.table.allTitle"),onClick:ee},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",f?getIcon().TABLE_CHECKBOX_INDETERMINATE:C?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))])]):(0,_vue.createCommentVNode)(),v?(0,_vue.h)("th",{},[(0,_vue.h)("span",{class:"vxe-table-custom-popup--table-sort-help-title"},getI18n("vxe.custom.setting.colSort")),R?(0,_vue.h)(R,{enterable:!0,content:getI18n("vxe.custom.setting.sortHelpTip"),popupClassName:"vxe-table--ignore-clear"},{default:()=>(0,_vue.h)("i",{class:"vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill"})}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colTitle")),h?(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colResizable")):(0,_vue.createCommentVNode)(),m?(0,_vue.h)("th",{},getI18n("vxe.custom.setting."+(_?"colFixedMax":"colFixed"),[_])):(0,_vue.createCommentVNode)()])]),(0,_vue.h)(_vue.TransitionGroup,{class:"vxe-table-custom--body",tag:"tbody",name:"vxe-table-custom--list"},{default:()=>b})])]),(0,_vue.h)("div",{ref:q,class:"vxe-table-custom-popup--drag-hint"},getI18n("vxe.custom.cstmDragTarget",[I?I.getTitle():""]))]),footer:()=>(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[F?(0,_vue.h)(F,{content:r.resetButtonText||getI18n("vxe.custom.cstmRestore"),onClick:Z}):(0,_vue.createCommentVNode)(),F?(0,_vue.h)(F,{content:r.resetButtonText||getI18n("vxe.custom.cstmCancel"),onClick:Y}):(0,_vue.createCommentVNode)(),F?(0,_vue.h)(F,{status:"primary",content:r.confirmButtonText||getI18n("vxe.custom.cstmConfirm"),onClick:P}):(0,_vue.createCommentVNode)()])};return"drawer"===t?M?(0,_vue.h)(M,{key:"drawer",className:["vxe-table-custom-drawer-wrapper","vxe-table--ignore-clear",l.className||""].join(" "),modelValue:n.visible,title:l.title||getI18n("vxe.custom.cstmTitle"),width:l.width||Math.min(880,document.documentElement.clientWidth),position:l.position,escClosable:!!l.escClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){n.visible=e}},e):(0,_vue.createCommentVNode)():A?(0,_vue.h)(A,{key:"modal",className:["vxe-table-custom-modal-wrapper","vxe-table--ignore-clear",o.className||""].join(" "),modelValue:n.visible,title:o.title||getI18n("vxe.custom.cstmTitle"),width:o.width||Math.min(880,document.documentElement.clientWidth),minWidth:o.minWidth||700,height:o.height||Math.min(680,document.documentElement.clientHeight),minHeight:o.minHeight||400,showZoom:o.showZoom,showMaximize:o.showMaximize,showMinimize:o.showMinimize,mask:o.mask,lockView:o.lockView,resize:o.resize,escClosable:!!o.escClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){n.visible=e}},e):(0,_vue.createCommentVNode)()}{t=L["customStore"],l=U["customColumnList"],o=S.value,e=t["maxHeight"];const{checkMethod:T,visibleMethod:V,allowVisible:E,allowSort:N,allowFixed:k,trigger:w,placement:O}=o,y=z.value,B=[];var i={},l=("hover"===w&&(i.onMouseenter=G,i.onMouseleave=$),_xeUtils.default.eachTree(l,(e,t,o,l,i)=>{if(!V||V({column:e})){var s=e.renderVisible,a=e.halfVisible,n=e.children&&e.children.length,r=(0,_utils.formatText)(e.getTitle(),1);const c=!!T&&!T({column:e});B.push((0,_vue.h)("li",{key:e.id,colid:e.id,class:["vxe-table-custom--option","level--"+e.level,{"is--group":n}],onDragstart:le,onDragend:ie,onDragover:se},[E?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":s,"is--indeterminate":a,"is--disabled":c}],title:getI18n("vxe.custom.setting.colVisible"),onClick:()=>{c||J(e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",a?getIcon().TABLE_CHECKBOX_INDETERMINATE:s?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]):(0,_vue.createCommentVNode)(),N&&1===e.level?(0,_vue.h)("div",{class:"vxe-table-custom--sort-option"},[(0,_vue.h)("span",{class:"vxe-table-custom--sort-btn",title:getI18n("vxe.custom.setting.sortHelpTip"),onMousedown:te,onMouseup:oe},[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})])]):(0,_vue.createCommentVNode)(),"html"===e.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom--checkbox-label",innerHTML:r}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom--checkbox-label"},r),!i&&k?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[(0,_vue.h)("span",{class:["vxe-table-custom--fixed-left-option","left"===e.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":"left"===e.renderFixed,"is--disabled":y&&!e.renderFixed}],title:getI18n("left"===e.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedLeft"),onClick:()=>{Q(e,"left")}}),(0,_vue.h)("span",{class:["vxe-table-custom--fixed-right-option","right"===e.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":"right"===e.renderFixed,"is--disabled":y&&!e.renderFixed}],title:getI18n("right"===e.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedRight"),onClick:()=>{Q(e,"right")}})]):(0,_vue.createCommentVNode)()]))}}),t.isAll),s=t.isIndeterminate,a=j.value;return(0,_vue.h)("div",{ref:W,key:"simple",class:["vxe-table-custom-wrapper","placement--"+O,{"is--active":t.visible}],style:e&&!["left","right"].includes(O)?{maxHeight:e+"px"}:{}},t.visible?[(0,_vue.h)("ul",{class:"vxe-table-custom--header"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[E?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":l,"is--indeterminate":s}],title:getI18n("vxe.table.allTitle"),onClick:ee},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:l?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))]):(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.table.customTitle"))])]),(0,_vue.h)("div",{ref:X,class:"vxe-table-custom--list-wrapper"},[(0,_vue.h)(_vue.TransitionGroup,Object.assign({class:"vxe-table-custom--body",name:"vxe-table-custom--list",tag:"ul"},i),{default:()=>B}),(0,_vue.h)("div",{ref:q,class:"vxe-table-custom-popup--drag-hint"},getI18n("vxe.custom.cstmDragTarget",[a&&"html"!==a.type?a.getTitle():""]))]),o.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},[(0,_vue.h)("button",{class:"btn--reset",onClick:Z},o.resetButtonText||getI18n("vxe.table.customRestore")),o.immediate?(0,_vue.createCommentVNode)():(0,_vue.h)("button",{class:"btn--cancel",onClick:Y},o.resetButtonText||getI18n("vxe.table.customCancel")),(0,_vue.h)("button",{class:"btn--confirm",onClick:P},o.confirmButtonText||getI18n("vxe.table.customConfirm"))]):null]:[]);return}}}});
|
|
@@ -209,14 +209,16 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
209
209
|
const isColGroup = column.children && column.children.length;
|
|
210
210
|
const isChecked = column.checked;
|
|
211
211
|
const indeterminate = column.halfChecked;
|
|
212
|
+
const isHtml = column.type === 'html';
|
|
212
213
|
cols.push((0, _vue.h)('li', {
|
|
214
|
+
key: column.id,
|
|
213
215
|
class: ['vxe-export--panel-column-option', `level--${column.level}`, {
|
|
214
216
|
'is--group': isColGroup,
|
|
215
217
|
'is--checked': isChecked,
|
|
216
218
|
'is--indeterminate': indeterminate,
|
|
217
219
|
'is--disabled': column.disabled
|
|
218
220
|
}],
|
|
219
|
-
title: colTitle,
|
|
221
|
+
title: isHtml ? '' : colTitle,
|
|
220
222
|
onClick: () => {
|
|
221
223
|
if (!column.disabled) {
|
|
222
224
|
changeOption(column);
|
|
@@ -224,7 +226,12 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
224
226
|
}
|
|
225
227
|
}, [(0, _vue.h)('span', {
|
|
226
228
|
class: ['vxe-checkbox--icon', indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
227
|
-
}), (0, _vue.h)('span', {
|
|
229
|
+
}), isHtml ? (0, _vue.h)('span', {
|
|
230
|
+
key: '1',
|
|
231
|
+
class: 'vxe-checkbox--label',
|
|
232
|
+
innerHTML: colTitle
|
|
233
|
+
}) : (0, _vue.h)('span', {
|
|
234
|
+
key: '0',
|
|
228
235
|
class: 'vxe-checkbox--label'
|
|
229
236
|
}, colTitle)]));
|
|
230
237
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=require("../../../ui/src/utils"),_log=require("../../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const{getI18n,getIcon}=_ui.VxeUI;var _default=exports.default=(0,_vue.defineComponent)({name:"VxeTableExportPanel",props:{defaultOptions:Object,storeData:Object},setup(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=require("../../../ui/src/utils"),_log=require("../../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const{getI18n,getIcon}=_ui.VxeUI;var _default=exports.default=(0,_vue.defineComponent)({name:"VxeTableExportPanel",props:{defaultOptions:Object,storeData:Object},setup(x){const m=_ui.VxeUI.getComponent("VxeModal"),h=_ui.VxeUI.getComponent("VxeButton"),_=_ui.VxeUI.getComponent("VxeSelect"),g=_ui.VxeUI.getComponent("VxeInput"),C=_ui.VxeUI.getComponent("VxeCheckbox"),o=(0,_vue.inject)("$xeTable",{}),{computeExportOpts:l,computePrintOpts:a}=o.getComputeMaps(),V=(0,_vue.reactive)({isAll:!1,isIndeterminate:!1,loading:!1}),I=(0,_vue.ref)(),b=(0,_vue.ref)(),f=(0,_vue.ref)(),k=(0,_vue.computed)(()=>{var e=x["storeData"];return e.columns.every(e=>e.checked)}),E=(0,_vue.computed)(()=>{var e=x["defaultOptions"];return-1<["html","xml","xlsx","pdf"].indexOf(e.type)}),O=(0,_vue.computed)(()=>{var{storeData:e,defaultOptions:t}=x;return!t.original&&"current"===t.mode&&(e.isPrint||-1<["html","xlsx"].indexOf(t.type))}),T=(0,_vue.computed)(()=>{var e=x["defaultOptions"];return!e.original&&-1<["xlsx"].indexOf(e.type)}),N=t=>{var e=x["storeData"],e=_xeUtils.default.findTree(e.columns,e=>e===t);e&&e.parent&&(e=e["parent"],e.children)&&e.children.length&&(e.checked=e.children.every(e=>e.checked),e.halfChecked=!e.checked&&e.children.some(e=>e.checked||e.halfChecked),N(e))},U=()=>{var e=x["storeData"],e=e.columns;V.isAll=e.every(e=>e.disabled||e.checked),V.isIndeterminate=!V.isAll&&e.some(e=>!e.disabled&&(e.checked||e.halfChecked))},y=()=>{var e=x["storeData"];const t=!V.isAll;_xeUtils.default.eachTree(e.columns,e=>{e.disabled||(e.checked=t,e.halfChecked=!1)}),V.isAll=t,U()},D=()=>{(0,_vue.nextTick)(()=>{var e=b.value,t=f.value,o=I.value,e=e||t||o;e&&e.focus()}),U()},r=()=>{var{storeData:e,defaultOptions:t}=x,{hasMerge:e,columns:o}=e,l=k.value,a=O.value,o=_xeUtils.default.searchTree(o,e=>e.checked,{children:"children",mapChildren:"childNodes",original:!0});return Object.assign({},t,{columns:o,isMerge:!!(e&&a&&l)&&t.isMerge})},t=()=>{var e=x["storeData"],t=a.value;e.visible=!1,o.print(Object.assign({},t,r()))},n=()=>{const e=x["storeData"];var t=l.value;V.loading=!0,o.exportData(Object.assign({},t,r())).then(()=>{V.loading=!1,e.visible=!1}).catch(()=>{V.loading=!1})},A=()=>{var e=x["storeData"];e.visible=!1},H=()=>{var e=x["storeData"];(e.isPrint?t:n)()};return"development"===process.env.NODE_ENV&&(0,_vue.nextTick)(()=>{m||(0,_log.errLog)("vxe.error.reqComp",["vxe-modal"]),h||(0,_log.errLog)("vxe.error.reqComp",["vxe-button"]),_||(0,_log.errLog)("vxe.error.reqComp",["vxe-select"]),g||(0,_log.errLog)("vxe.error.reqComp",["vxe-input"]),C||(0,_log.errLog)("vxe.error.reqComp",["vxe-checkbox"])}),()=>{const{defaultOptions:t,storeData:o}=x,{isAll:e,isIndeterminate:l}=V,{hasTree:a,hasMerge:r,isPrint:n,hasColgroup:u}=o,i=t["isHeader"],d=[],p=k.value,v=E.value,s=O.value,c=T.value;return _xeUtils.default.eachTree(o.columns,o=>{var e=(0,_utils.formatText)(o.getTitle(),1),t=o.children&&o.children.length,l=o.checked,a=o.halfChecked,r="html"===o.type;d.push((0,_vue.h)("li",{key:o.id,class:["vxe-export--panel-column-option","level--"+o.level,{"is--group":t,"is--checked":l,"is--indeterminate":a,"is--disabled":o.disabled}],title:r?"":e,onClick:()=>{if(!o.disabled){var e=o;const t=!e.checked;_xeUtils.default.eachTree([e],e=>{e.checked=t,e.halfChecked=!1}),N(e),U()}}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",a?getIcon().TABLE_CHECKBOX_INDETERMINATE:l?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),r?(0,_vue.h)("span",{key:"1",class:"vxe-checkbox--label",innerHTML:e}):(0,_vue.h)("span",{key:"0",class:"vxe-checkbox--label"},e)]))}),m?(0,_vue.h)(m,{modelValue:o.visible,title:getI18n(n?"vxe.export.printTitle":"vxe.export.expTitle"),className:"vxe-table-export-popup-wrapper",width:660,mask:!0,lockView:!0,showFooter:!1,escClosable:!0,maskClosable:!0,loading:V.loading,"onUpdate:modelValue"(e){o.visible=e},onShow:D},{default:()=>(0,_vue.h)("div",{class:"vxe-export--panel"},[(0,_vue.h)("table",{cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",[[n?(0,_vue.createCommentVNode)():(0,_vue.h)("tr",[(0,_vue.h)("td",getI18n("vxe.export.expName")),(0,_vue.h)("td",[g?(0,_vue.h)(g,{ref:b,modelValue:t.filename,type:"text",clearable:!0,placeholder:getI18n("vxe.export.expNamePlaceholder"),"onUpdate:modelValue"(e){t.filename=e}}):(0,_vue.createCommentVNode)()])]),n?(0,_vue.createCommentVNode)():(0,_vue.h)("tr",[(0,_vue.h)("td",getI18n("vxe.export.expType")),(0,_vue.h)("td",[_?(0,_vue.h)(_,{modelValue:t.type,options:o.typeList,"onUpdate:modelValue"(e){t.type=e}}):(0,_vue.createCommentVNode)()])]),n||v?(0,_vue.h)("tr",[(0,_vue.h)("td",getI18n("vxe.export.expSheetName")),(0,_vue.h)("td",[g?(0,_vue.h)(g,{ref:f,modelValue:t.sheetName,type:"text",clearable:!0,placeholder:getI18n("vxe.export.expSheetNamePlaceholder"),"onUpdate:modelValue"(e){t.sheetName=e}}):(0,_vue.createCommentVNode)()])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("tr",[(0,_vue.h)("td",getI18n("vxe.export.expMode")),(0,_vue.h)("td",[_?(0,_vue.h)(_,{modelValue:t.mode,options:o.modeList.map(e=>({value:e.value,label:getI18n(e.label)})),"onUpdate:modelValue"(e){t.mode=e}}):(0,_vue.createCommentVNode)()])]),(0,_vue.h)("tr",[(0,_vue.h)("td",[getI18n("vxe.export.expColumn")]),(0,_vue.h)("td",[(0,_vue.h)("div",{class:"vxe-export--panel-column"},[(0,_vue.h)("ul",{class:"vxe-export--panel-column-header"},[(0,_vue.h)("li",{class:["vxe-export--panel-column-option",{"is--checked":e,"is--indeterminate":l}],title:getI18n("vxe.table.allTitle"),onClick:y},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",l?getIcon().TABLE_CHECKBOX_INDETERMINATE:e?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.export.expCurrentColumn"))])]),(0,_vue.h)("ul",{class:"vxe-export--panel-column-body"},d)])])]),(0,_vue.h)("tr",[(0,_vue.h)("td",getI18n("vxe.export.expOpts")),(0,_vue.h)("td",[(0,_vue.h)("div",{class:"vxe-export--panel-option-row"},[C?(0,_vue.h)(C,{modelValue:t.isHeader,title:getI18n("vxe.export.expHeaderTitle"),content:getI18n("vxe.export.expOptHeader"),"onUpdate:modelValue"(e){t.isHeader=e}}):(0,_vue.createCommentVNode)(),C?(0,_vue.h)(C,{modelValue:t.isFooter,disabled:!o.hasFooter,title:getI18n("vxe.export.expFooterTitle"),content:getI18n("vxe.export.expOptFooter"),"onUpdate:modelValue"(e){t.isFooter=e}}):(0,_vue.createCommentVNode)(),C?(0,_vue.h)(C,{modelValue:t.original,title:getI18n("vxe.export.expOriginalTitle"),content:getI18n("vxe.export.expOptOriginal"),"onUpdate:modelValue"(e){t.original=e}}):(0,_vue.createCommentVNode)()]),(0,_vue.h)("div",{class:"vxe-export--panel-option-row"},[C?(0,_vue.h)(C,{modelValue:!!(i&&u&&s)&&t.isColgroup,title:getI18n("vxe.export.expColgroupTitle"),disabled:!i||!u||!s,content:getI18n("vxe.export.expOptColgroup"),"onUpdate:modelValue"(e){t.isColgroup=e}}):(0,_vue.createCommentVNode)(),C?(0,_vue.h)(C,{modelValue:!!(r&&s&&p)&&t.isMerge,title:getI18n("vxe.export.expMergeTitle"),disabled:!r||!s||!p,content:getI18n("vxe.export.expOptMerge"),"onUpdate:modelValue"(e){t.isMerge=e}}):(0,_vue.createCommentVNode)(),n||!C?(0,_vue.createCommentVNode)():(0,_vue.h)(C,{modelValue:!!c&&t.useStyle,disabled:!c,title:getI18n("vxe.export.expUseStyleTitle"),content:getI18n("vxe.export.expOptUseStyle"),"onUpdate:modelValue"(e){t.useStyle=e}}),C?(0,_vue.h)(C,{modelValue:!!a&&t.isAllExpand,disabled:!a,title:getI18n("vxe.export.expAllExpandTitle"),content:getI18n("vxe.export.expOptAllExpand"),"onUpdate:modelValue"(e){t.isAllExpand=e}}):(0,_vue.createCommentVNode)()])])])]])]),(0,_vue.h)("div",{class:"vxe-export--panel-btns"},[h?(0,_vue.h)(h,{content:getI18n("vxe.export.expCancel"),onClick:A}):(0,_vue.createCommentVNode)(),h?(0,_vue.h)(h,{ref:I,status:"primary",content:getI18n(n?"vxe.export.expPrint":"vxe.export.expConfirm"),onClick:H}):(0,_vue.createCommentVNode)()])])}):(0,_vue.createCommentVNode)()}}});
|
package/lib/ui/index.js
CHANGED
|
@@ -13,9 +13,9 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
exports.version = exports.validators = exports.use = exports.t = exports.setup = exports.setTheme = exports.setLanguage = exports.setIcon = exports.setI18n = exports.setConfig = exports.saveFile = exports.renderer = exports.readFile = exports.print = exports.modal = exports.menus = exports.log = exports.interceptor = exports.hooks = exports.globalResize = exports.globalEvents = exports.getTheme = exports.getIcon = exports.getI18n = exports.getConfig = exports.formats = exports.default = exports.config = exports.commands = exports.clipboard = exports._t = void 0;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.7.
|
|
16
|
+
const version = exports.version = "4.7.72";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
|
-
_core.VxeUI.tableVersion = "4.7.
|
|
18
|
+
_core.VxeUI.tableVersion = "4.7.72";
|
|
19
19
|
_core.VxeUI.setConfig({
|
|
20
20
|
emptyCell: ' ',
|
|
21
21
|
table: {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");const version=exports.version="4.7.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");const version=exports.version="4.7.72",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion="4.7.72",_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,minHeight:144,resizeConfig:{refreshDelay:250},radioConfig:{strict:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single"},columnConfig:{maxFixedSize:4},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0}},sortConfig:{showIcon:!0,iconLayout:"vertical"},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0},editConfig:{showIcon:!0,showAsterisk:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{gt:60},scrollY:{gt:100}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showResponseMsg:!0,showActiveMsg:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,hooks=exports.hooks=_core.VxeUI.hooks,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,r){return _core.VxeUI.modal.alert(e,o,r)},confirm(e,o,r){return _core.VxeUI.modal.confirm(e,o,r)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,r){return _core.VxeUI.modal.notification(e,o,r)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"4.7.
|
|
11
|
+
const version = `table v${"4.7.72"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.72",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.72",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^4.1.
|
|
31
|
+
"vxe-pc-ui": "^4.1.8"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
const bodyElemRef = ref() as Ref<HTMLDivElement>
|
|
36
36
|
const dragHintElemRef = ref() as Ref<HTMLDivElement>
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const dragColumnRef = ref<VxeTableDefines.ColumnInfo | null>()
|
|
39
39
|
|
|
40
40
|
let prevDropTrEl: any
|
|
41
41
|
|
|
@@ -208,7 +208,7 @@ export default defineComponent({
|
|
|
208
208
|
const colid = trEl.getAttribute('colid')
|
|
209
209
|
const column = $xeTable.getColumnById(colid)
|
|
210
210
|
trEl.draggable = true
|
|
211
|
-
|
|
211
|
+
dragColumnRef.value = column
|
|
212
212
|
addClass(trEl, 'active--drag-origin')
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -218,7 +218,7 @@ export default defineComponent({
|
|
|
218
218
|
const trEl = tdEl.parentNode as HTMLElement
|
|
219
219
|
const dragHintEl = dragHintElemRef.value
|
|
220
220
|
trEl.draggable = false
|
|
221
|
-
|
|
221
|
+
dragColumnRef.value = null
|
|
222
222
|
removeClass(trEl, 'active--drag-origin')
|
|
223
223
|
if (dragHintEl) {
|
|
224
224
|
dragHintEl.style.display = ''
|
|
@@ -261,7 +261,7 @@ export default defineComponent({
|
|
|
261
261
|
prevDropTrEl.removeAttribute('drag-pos')
|
|
262
262
|
removeClass(prevDropTrEl, 'active--drag-target')
|
|
263
263
|
}
|
|
264
|
-
|
|
264
|
+
dragColumnRef.value = null
|
|
265
265
|
trEl.draggable = false
|
|
266
266
|
trEl.removeAttribute('drag-pos')
|
|
267
267
|
if (dragHintEl) {
|
|
@@ -373,10 +373,16 @@ export default defineComponent({
|
|
|
373
373
|
])
|
|
374
374
|
])
|
|
375
375
|
: createCommentVNode(),
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
376
|
+
column.type === 'html'
|
|
377
|
+
? h('div', {
|
|
378
|
+
key: '1',
|
|
379
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
380
|
+
innerHTML: colTitle
|
|
381
|
+
})
|
|
382
|
+
: h('div', {
|
|
383
|
+
key: '0',
|
|
384
|
+
class: 'vxe-table-custom--checkbox-label'
|
|
385
|
+
}, colTitle),
|
|
380
386
|
!parent && allowFixed
|
|
381
387
|
? h('div', {
|
|
382
388
|
class: 'vxe-table-custom--fixed-option'
|
|
@@ -409,6 +415,7 @@ export default defineComponent({
|
|
|
409
415
|
})
|
|
410
416
|
const isAllChecked = customStore.isAll
|
|
411
417
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
418
|
+
const dragColumn = dragColumnRef.value
|
|
412
419
|
return h('div', {
|
|
413
420
|
ref: refElem,
|
|
414
421
|
key: 'simple',
|
|
@@ -464,7 +471,7 @@ export default defineComponent({
|
|
|
464
471
|
h('div', {
|
|
465
472
|
ref: dragHintElemRef,
|
|
466
473
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
467
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.
|
|
474
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))
|
|
468
475
|
]),
|
|
469
476
|
customOpts.showFooter
|
|
470
477
|
? h('div', {
|
|
@@ -565,10 +572,17 @@ export default defineComponent({
|
|
|
565
572
|
h('td', {
|
|
566
573
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
567
574
|
}, [
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
575
|
+
column.type === 'html'
|
|
576
|
+
? h('div', {
|
|
577
|
+
key: '1',
|
|
578
|
+
class: 'vxe-table-custom-popup--name',
|
|
579
|
+
innerHTML: colTitle
|
|
580
|
+
})
|
|
581
|
+
: h('div', {
|
|
582
|
+
key: '0',
|
|
583
|
+
class: 'vxe-table-custom-popup--name',
|
|
584
|
+
title: colTitle
|
|
585
|
+
}, colTitle)
|
|
572
586
|
]),
|
|
573
587
|
allowResizable
|
|
574
588
|
? h('td', {
|
|
@@ -623,6 +637,7 @@ export default defineComponent({
|
|
|
623
637
|
})
|
|
624
638
|
const isAllChecked = customStore.isAll
|
|
625
639
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
640
|
+
const dragColumn = dragColumnRef.value
|
|
626
641
|
const scopedSlots = {
|
|
627
642
|
default: () => {
|
|
628
643
|
return h('div', {
|
|
@@ -730,7 +745,7 @@ export default defineComponent({
|
|
|
730
745
|
h('div', {
|
|
731
746
|
ref: dragHintElemRef,
|
|
732
747
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
733
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn
|
|
748
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))
|
|
734
749
|
])
|
|
735
750
|
},
|
|
736
751
|
footer: () => {
|
|
@@ -171,15 +171,17 @@ export default defineComponent({
|
|
|
171
171
|
const isColGroup = column.children && column.children.length
|
|
172
172
|
const isChecked = column.checked
|
|
173
173
|
const indeterminate = column.halfChecked
|
|
174
|
+
const isHtml = column.type === 'html'
|
|
174
175
|
cols.push(
|
|
175
176
|
h('li', {
|
|
177
|
+
key: column.id,
|
|
176
178
|
class: ['vxe-export--panel-column-option', `level--${column.level}`, {
|
|
177
179
|
'is--group': isColGroup,
|
|
178
180
|
'is--checked': isChecked,
|
|
179
181
|
'is--indeterminate': indeterminate,
|
|
180
182
|
'is--disabled': column.disabled
|
|
181
183
|
}],
|
|
182
|
-
title: colTitle,
|
|
184
|
+
title: isHtml ? '' : colTitle,
|
|
183
185
|
onClick: () => {
|
|
184
186
|
if (!column.disabled) {
|
|
185
187
|
changeOption(column)
|
|
@@ -189,9 +191,16 @@ export default defineComponent({
|
|
|
189
191
|
h('span', {
|
|
190
192
|
class: ['vxe-checkbox--icon', indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
191
193
|
}),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
isHtml
|
|
195
|
+
? h('span', {
|
|
196
|
+
key: '1',
|
|
197
|
+
class: 'vxe-checkbox--label',
|
|
198
|
+
innerHTML: colTitle
|
|
199
|
+
})
|
|
200
|
+
: h('span', {
|
|
201
|
+
key: '0',
|
|
202
|
+
class: 'vxe-checkbox--label'
|
|
203
|
+
}, colTitle)
|
|
195
204
|
])
|
|
196
205
|
)
|
|
197
206
|
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|