vxe-table 4.16.13 → 4.16.15
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/grid/src/grid.js +10 -10
- package/es/style.css +1 -1
- package/es/table/render/index.js +21 -0
- package/es/table/src/table.js +2 -2
- package/es/toolbar/src/toolbar.js +14 -14
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +10 -10
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +67 -27
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +36 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +14 -14
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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 +1 -1
- package/packages/grid/src/grid.ts +10 -10
- package/packages/table/render/index.ts +30 -0
- package/packages/table/src/table.ts +2 -2
- package/packages/toolbar/src/toolbar.ts +14 -14
- /package/es/{iconfont.1758075798320.ttf → iconfont.1758246364726.ttf} +0 -0
- /package/es/{iconfont.1758075798320.woff → iconfont.1758246364726.woff} +0 -0
- /package/es/{iconfont.1758075798320.woff2 → iconfont.1758246364726.woff2} +0 -0
- /package/lib/{iconfont.1758075798320.ttf → iconfont.1758246364726.ttf} +0 -0
- /package/lib/{iconfont.1758075798320.woff → iconfont.1758246364726.woff} +0 -0
- /package/lib/{iconfont.1758075798320.woff2 → iconfont.1758246364726.woff2} +0 -0
|
@@ -219,7 +219,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
219
219
|
if ($xeGGWrapper) {
|
|
220
220
|
$xeGGWrapper.triggerZoomEvent($event);
|
|
221
221
|
} else {
|
|
222
|
-
(0, _log.warnLog)('vxe.error.notProp', ['zoom']);
|
|
222
|
+
(0, _log.warnLog)('vxe.error.notProp', ['[toolbar] zoom']);
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
const importEvent = () => {
|
|
@@ -352,7 +352,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
352
352
|
if (tCommandMethod) {
|
|
353
353
|
tCommandMethod(params);
|
|
354
354
|
} else {
|
|
355
|
-
(0, _log.errLog)('vxe.error.notCommands', [code]);
|
|
355
|
+
(0, _log.errLog)('vxe.error.notCommands', [`[toolbar] ${code}`]);
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
$xeToolbar.dispatchEvent('button-click', params, $event);
|
|
@@ -391,7 +391,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
391
391
|
if (tCommandMethod) {
|
|
392
392
|
tCommandMethod(params);
|
|
393
393
|
} else {
|
|
394
|
-
(0, _log.errLog)('vxe.error.notCommands', [code]);
|
|
394
|
+
(0, _log.errLog)('vxe.error.notCommands', [`[toolbar] ${code}`]);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
$xeToolbar.dispatchEvent('tool-click', params, $event);
|
|
@@ -692,38 +692,38 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
692
692
|
const refreshOpts = computeRefreshOpts.value;
|
|
693
693
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
694
694
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
695
|
-
(0, _log.warnLog)('vxe.error.notFunc', ['queryMethod']);
|
|
695
|
+
(0, _log.warnLog)('vxe.error.notFunc', ['[toolbar] queryMethod']);
|
|
696
696
|
}
|
|
697
697
|
if (_xeUtils.default.isPlainObject(props.custom)) {
|
|
698
|
-
(0, _log.warnLog)('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}']);
|
|
698
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] custom={...}', 'custom=boolean & custom-options={...}']);
|
|
699
699
|
}
|
|
700
700
|
if (_xeUtils.default.isPlainObject(props.print)) {
|
|
701
|
-
(0, _log.warnLog)('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}']);
|
|
701
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] print={...}', 'print=boolean & print-options={...}']);
|
|
702
702
|
}
|
|
703
703
|
if (_xeUtils.default.isPlainObject(props.export)) {
|
|
704
|
-
(0, _log.warnLog)('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}']);
|
|
704
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] export={...}', 'export=boolean & export-options={...}']);
|
|
705
705
|
}
|
|
706
706
|
if (_xeUtils.default.isPlainObject(props.import)) {
|
|
707
|
-
(0, _log.warnLog)('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}']);
|
|
707
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] import={...}', 'import=boolean & import-options={...}']);
|
|
708
708
|
}
|
|
709
709
|
if (_xeUtils.default.isPlainObject(props.refresh)) {
|
|
710
|
-
(0, _log.warnLog)('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}']);
|
|
710
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] refresh={...}', 'refresh=boolean & refresh-options={...}']);
|
|
711
711
|
}
|
|
712
712
|
if (_xeUtils.default.isPlainObject(props.refresh)) {
|
|
713
|
-
(0, _log.warnLog)('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}']);
|
|
713
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] zoom={...}', 'zoom=boolean & zoom-options={...}']);
|
|
714
714
|
}
|
|
715
715
|
const customOpts = computeCustomOpts.value;
|
|
716
716
|
if (customOpts.isFooter) {
|
|
717
|
-
(0, _log.warnLog)('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
717
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
718
718
|
}
|
|
719
719
|
if (customOpts.showFooter) {
|
|
720
|
-
(0, _log.warnLog)('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
720
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
721
721
|
}
|
|
722
722
|
if (customOpts.immediate) {
|
|
723
|
-
(0, _log.warnLog)('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
723
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
724
724
|
}
|
|
725
725
|
if (customOpts.trigger) {
|
|
726
|
-
(0, _log.warnLog)('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
726
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[toolbar] toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
727
727
|
}
|
|
728
728
|
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
729
729
|
if (!VxeUIButtonComponent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getConfig,getIcon,getI18n,renderer,commands,createEvent,useFns}=_ui.VxeUI;function createInternalData(){return{connectTable:null}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeToolbar",props:{loading:Boolean,refresh:[Boolean,Object],refreshOptions:Object,import:[Boolean,Object],importOptions:Object,export:[Boolean,Object],exportOptions:Object,print:[Boolean,Object],printOptions:Object,zoom:[Boolean,Object],zoomOptions:Object,custom:[Boolean,Object],customOptions:Object,buttons:{type:Array,default:()=>getConfig().toolbar.buttons},tools:{type:Array,default:()=>getConfig().toolbar.tools},perfect:{type:Boolean,default:()=>getConfig().toolbar.perfect},size:{type:String,default:()=>getConfig().toolbar.size||getConfig().size},className:[String,Function]},emits:["button-click","tool-click"],setup(u,e){let{slots:g,emit:r}=e;var t=_xeUtils.default.uniqueId();let p=_ui.VxeUI.getComponent("VxeButton"),v=(0,_vue.inject)("$xeGrid",null),b=(0,_vue.inject)("$xeGantt",null),m=v||b,d=useFns.useSize(u).computeSize,_=(0,_vue.reactive)({isRefresh:!1,connectFlag:0,columns:[]}),f=createInternalData(),x=(0,_vue.ref)(),o={refElem:x},O={xID:t,props:u,context:e,reactData:_,internalData:f,getRefMaps:()=>o};let h=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.refresh,!0),u.refreshOptions,u.refresh)),T=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.import,!0),u.importOptions,u.import)),C=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.export,!0),u.exportOptions,u.export)),$=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.print,!0),u.printOptions,u.print)),j=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.zoom,!0),u.zoomOptions,u.zoom)),L=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.custom,!0),u.customOptions,u.custom)),n=(0,_vue.computed)(()=>{var e=f.connectTable;if((_.connectFlag||e)&&e)return e=e.getComputeMaps().computeCustomOpts,e.value;return{trigger:""}}),k=(0,_vue.computed)(()=>n.value.trigger),a=()=>{var e=f.connectTable;if(e)return!0;(0,_log.errLog)("vxe.error.barUnableLink")},I=({$event:e})=>{var t=f.connectTable;t&&t.triggerCustomEvent&&t.triggerCustomEvent(e)},R=({$event:e})=>{var t=f.connectTable;t&&t.customOpenEvent(e)},y=({$event:t})=>{var e=f.connectTable;let o=e;if(o){let e=o.reactData.customStore;e.activeBtn=!1,setTimeout(()=>{e.activeBtn||e.activeWrapper||o.customCloseEvent(t)},350)}},E=({$event:e})=>{var t=_.isRefresh,o=h.value;if(!t){t=o.queryMethod||o.query;if(t){_.isRefresh=!0;try{Promise.resolve(t({})).catch(e=>e).then(()=>{_.isRefresh=!1})}catch(e){_.isRefresh=!1}}else m&&(_.isRefresh=!0,m.triggerToolbarCommitEvent({code:o.code||"reload"},e).catch(()=>{}).then(()=>{_.isRefresh=!1}))}},P=({$event:e})=>{m?m.triggerZoomEvent(e):(0,_log.warnLog)("vxe.error.notProp",["zoom"])},i=()=>{var e;a()&&(e=f.connectTable,e)&&e.importData()},S=()=>{var e;a()&&(e=f.connectTable,e)&&e.openImport()},s=()=>{var e;a()&&(e=f.connectTable,e)&&e.exportData()},U=()=>{var e;a()&&(e=f.connectTable,e)&&e.openExport()},c=()=>{var e;a()&&(e=f.connectTable,e)&&e.print()},w=()=>{var e;a()&&(e=f.connectTable,e)&&e.openPrint()},l=(e,t,o)=>{switch(t.code){case"print":c();break;case"open_print":w();break;case"custom":I(e);break;case"export":s();break;case"open_export":U();break;case"import":i();break;case"open_import":S();break;case"zoom":P(e);break;case"refresh":E(e);break;default:o()}},N=(e,o)=>{let r=e.$event;var t=f.connectTable;let n=t,a=o.code;a&&l(e,o,()=>{var e,t;m?m.triggerToolbarBtnEvent(o,r):(t=commands.get(a),e={code:a,button:o,$table:n,$grid:v,$gantt:b,$event:r},t&&((t=t.tableCommandMethod||t.commandMethod)?t(e):(0,_log.errLog)("vxe.error.notCommands",[a])),O.dispatchEvent("button-click",e,r))})},B=(e,o)=>{let r=e.$event;var t=f.connectTable;let n=t,a=o.code;a&&l(e,o,()=>{var e,t;m?m.triggerToolbarTolEvent(o,r):(t=commands.get(a),e={code:a,button:null,tool:o,$table:n,$grid:v,$gantt:b,$event:r},t&&((t=t.tableCommandMethod||t.commandMethod)?t(e):(0,_log.errLog)("vxe.error.notCommands",[a])),O.dispatchEvent("tool-click",e,r))})};Object.assign(O,{dispatchEvent:(e,t,o)=>{r(e,createEvent(o,{$toolbar:O},t))},syncUpdate(e){f.connectTable=e.$table,_.columns=e.collectColumn,_.connectFlag++}});let z=(e,o)=>{e=e.dropdowns;return e?e.map((t,e)=>!1!==t.visible&&p?(0,_vue.h)(p,Object.assign(Object.assign({key:e},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>(o?N:B)(e,t)})):(0,_vue.createCommentVNode)()):[]};return O.renderVN=()=>{var{perfect:e,loading:t,refresh:o,zoom:r,custom:n,className:a}=u,l=f.connectTable,i=d.value,s=g.tools,c=g.buttons;return(0,_vue.h)("div",{ref:x,class:["vxe-toolbar",a?_xeUtils.default.isFunction(a)?a({$toolbar:O}):a:"",{["size--"+i]:i,"is--perfect":e,"is--loading":t}]},[(0,_vue.h)("div",{class:"vxe-buttons--wrapper"},c?c({$grid:v,$gantt:b,$table:l}):(()=>{var e=u.buttons,t=f.connectTable;let i=t;var t=g.buttonPrefix||g["button-prefix"],o=g.buttonSuffix||g["button-suffix"];let s=[];return t&&s.push(...(0,_vn.getSlotVNs)(t({buttons:e||[],$grid:v,$gantt:b,$table:i}))),e&&e.forEach((t,e)=>{var o,r,n,{dropdowns:a,buttonRender:l}=t;!1!==t.visible&&(o=l?renderer.get(l.name):null,l&&o&&o.renderToolbarButton?(r=o.toolbarButtonClassName,n={$grid:v,$gantt:b,$table:i,button:t},s.push((0,_vue.h)("span",{key:"br"+(t.code||e),class:["vxe-button--item",r?_xeUtils.default.isFunction(r)?r(n):r:""]},(0,_vn.getSlotVNs)(o.renderToolbarButton(l,n))))):p&&s.push((0,_vue.h)(p,Object.assign(Object.assign({key:"bd"+(t.code||e)},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>N(e,t)}),a&&a.length?{dropdowns:()=>z(t,!0)}:{})))}),o&&s.push(...(0,_vn.getSlotVNs)(o({buttons:e||[],$grid:v,$gantt:b,$table:i}))),s})()),(0,_vue.h)("div",{class:"vxe-tools--wrapper"},s?s({$grid:v,$gantt:b,$table:l}):(()=>{var e=u.tools,t=f.connectTable;let s=t;var t=g.toolPrefix||g["tool-prefix"],o=g.toolSuffix||g["tool-suffix"];let c=[];return t&&c.push(...(0,_vn.getSlotVNs)(t({tools:e||[],$grid:v,$gantt:b,$table:s}))),e&&e.forEach((t,e)=>{var o,r,n,a,{dropdowns:l,toolRender:i}=t;!1!==t.visible&&(o=i?i.name:null,r=i?renderer.get(o):null,i&&r&&r.renderToolbarTool?(n=r.toolbarToolClassName,a={$grid:v,$gantt:b,$table:s,tool:t},c.push((0,_vue.h)("span",{key:o,class:["vxe-tool--item",n?_xeUtils.default.isFunction(n)?n(a):n:""]},(0,_vn.getSlotVNs)(r.renderToolbarTool(i,a))))):p&&c.push((0,_vue.h)(p,Object.assign(Object.assign({key:e},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>B(e,t)}),l&&l.length?{dropdowns:()=>z(t,!1)}:{})))}),o&&c.push(...(0,_vn.getSlotVNs)(o({tools:e||[],$grid:v,$gantt:b,$table:s}))),c})()),(0,_vue.h)("div",{class:"vxe-tools--operate"},[u.import&&(a=T.value,p)?(0,_vue.h)(p,{key:"import",circle:!0,icon:a.icon||getIcon().TOOLBAR_TOOLS_IMPORT,title:getI18n("vxe.toolbar.import"),onClick:S}):(0,_vue.createCommentVNode)(),u.export&&(i=C.value,p)?(0,_vue.h)(p,{key:"export",circle:!0,icon:i.icon||getIcon().TOOLBAR_TOOLS_EXPORT,title:getI18n("vxe.toolbar.export"),onClick:U}):(0,_vue.createCommentVNode)(),u.print&&(e=$.value,p)?(0,_vue.h)(p,{key:"print",circle:!0,icon:e.icon||getIcon().TOOLBAR_TOOLS_PRINT,title:getI18n("vxe.toolbar.print"),onClick:w}):(0,_vue.createCommentVNode)(),o&&(t=h.value,p)?(0,_vue.h)(p,{key:"refresh",circle:!0,icon:_.isRefresh?t.iconLoading||getIcon().TOOLBAR_TOOLS_REFRESH_LOADING:t.icon||getIcon().TOOLBAR_TOOLS_REFRESH,title:getI18n("vxe.toolbar.refresh"),onClick:E}):(0,_vue.createCommentVNode)(),r&&m&&(c=j.value,m)&&p?(0,_vue.h)(p,{key:"zoom",circle:!0,icon:m.isMaximized()?c.iconOut||getIcon().TOOLBAR_TOOLS_MINIMIZE:c.iconIn||getIcon().TOOLBAR_TOOLS_FULLSCREEN,title:getI18n("vxe.toolbar.zoom"+(m.isMaximized()?"Out":"In")),onClick:P}):(0,_vue.createCommentVNode)(),n&&(s=L.value,l=k.value,a={},"manual"!==l&&("hover"===l?(a.onMouseenter=R,a.onMouseleave=y):a.onClick=I),p)?(0,_vue.h)(p,Object.assign({key:"custom",circle:!0,icon:s.icon||getIcon().TOOLBAR_TOOLS_CUSTOM,title:getI18n("vxe.toolbar.custom"),className:"vxe-toolbar-custom-target"},a)):(0,_vue.createCommentVNode)()])])},(0,_vue.nextTick)(()=>{var e=h.value,e=e.queryMethod||e.query,e=(!u.refresh||m||e||(0,_log.warnLog)("vxe.error.notFunc",["queryMethod"]),_xeUtils.default.isPlainObject(u.custom)&&(0,_log.warnLog)("vxe.error.delProp",["custom={...}","custom=boolean & custom-options={...}"]),_xeUtils.default.isPlainObject(u.print)&&(0,_log.warnLog)("vxe.error.delProp",["print={...}","print=boolean & print-options={...}"]),_xeUtils.default.isPlainObject(u.export)&&(0,_log.warnLog)("vxe.error.delProp",["export={...}","export=boolean & export-options={...}"]),_xeUtils.default.isPlainObject(u.import)&&(0,_log.warnLog)("vxe.error.delProp",["import={...}","import=boolean & import-options={...}"]),_xeUtils.default.isPlainObject(u.refresh)&&(0,_log.warnLog)("vxe.error.delProp",["refresh={...}","refresh=boolean & refresh-options={...}"]),_xeUtils.default.isPlainObject(u.refresh)&&(0,_log.warnLog)("vxe.error.delProp",["zoom={...}","zoom=boolean & zoom-options={...}"]),L.value);e.isFooter&&(0,_log.warnLog)("vxe.error.delProp",["toolbar.custom.isFooter","table.custom-config.showFooter"]),e.showFooter&&(0,_log.warnLog)("vxe.error.delProp",["toolbar.custom.showFooter","table.custom-config.showFooter"]),e.immediate&&(0,_log.warnLog)("vxe.error.delProp",["toolbar.custom.immediate","table.custom-config.immediate"]),e.trigger&&(0,_log.warnLog)("vxe.error.delProp",["toolbar.custom.trigger","table.custom-config.trigger"]),(u.refresh||u.import||u.export||u.print||u.zoom)&&!p&&(0,_log.errLog)("vxe.error.reqComp",["vxe-button"])}),(0,_vue.onUnmounted)(()=>{_xeUtils.default.assign(f,createInternalData())}),O},render(){return this.renderVN()}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getConfig,getIcon,getI18n,renderer,commands,createEvent,useFns}=_ui.VxeUI;function createInternalData(){return{connectTable:null}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeToolbar",props:{loading:Boolean,refresh:[Boolean,Object],refreshOptions:Object,import:[Boolean,Object],importOptions:Object,export:[Boolean,Object],exportOptions:Object,print:[Boolean,Object],printOptions:Object,zoom:[Boolean,Object],zoomOptions:Object,custom:[Boolean,Object],customOptions:Object,buttons:{type:Array,default:()=>getConfig().toolbar.buttons},tools:{type:Array,default:()=>getConfig().toolbar.tools},perfect:{type:Boolean,default:()=>getConfig().toolbar.perfect},size:{type:String,default:()=>getConfig().toolbar.size||getConfig().size},className:[String,Function]},emits:["button-click","tool-click"],setup(u,e){let{slots:g,emit:r}=e;var t=_xeUtils.default.uniqueId();let b=_ui.VxeUI.getComponent("VxeButton"),p=(0,_vue.inject)("$xeGrid",null),v=(0,_vue.inject)("$xeGantt",null),m=p||v,d=useFns.useSize(u).computeSize,_=(0,_vue.reactive)({isRefresh:!1,connectFlag:0,columns:[]}),f=createInternalData(),x=(0,_vue.ref)(),o={refElem:x},O={xID:t,props:u,context:e,reactData:_,internalData:f,getRefMaps:()=>o};let h=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.refresh,!0),u.refreshOptions,u.refresh)),T=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.import,!0),u.importOptions,u.import)),C=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.export,!0),u.exportOptions,u.export)),$=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.print,!0),u.printOptions,u.print)),j=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.zoom,!0),u.zoomOptions,u.zoom)),L=(0,_vue.computed)(()=>Object.assign({},_xeUtils.default.clone(getConfig().toolbar.custom,!0),u.customOptions,u.custom)),n=(0,_vue.computed)(()=>{var e=f.connectTable;if((_.connectFlag||e)&&e)return e=e.getComputeMaps().computeCustomOpts,e.value;return{trigger:""}}),k=(0,_vue.computed)(()=>n.value.trigger),a=()=>{var e=f.connectTable;if(e)return!0;(0,_log.errLog)("vxe.error.barUnableLink")},I=({$event:e})=>{var t=f.connectTable;t&&t.triggerCustomEvent&&t.triggerCustomEvent(e)},R=({$event:e})=>{var t=f.connectTable;t&&t.customOpenEvent(e)},y=({$event:t})=>{var e=f.connectTable;let o=e;if(o){let e=o.reactData.customStore;e.activeBtn=!1,setTimeout(()=>{e.activeBtn||e.activeWrapper||o.customCloseEvent(t)},350)}},E=({$event:e})=>{var t=_.isRefresh,o=h.value;if(!t){t=o.queryMethod||o.query;if(t){_.isRefresh=!0;try{Promise.resolve(t({})).catch(e=>e).then(()=>{_.isRefresh=!1})}catch(e){_.isRefresh=!1}}else m&&(_.isRefresh=!0,m.triggerToolbarCommitEvent({code:o.code||"reload"},e).catch(()=>{}).then(()=>{_.isRefresh=!1}))}},P=({$event:e})=>{m?m.triggerZoomEvent(e):(0,_log.warnLog)("vxe.error.notProp",["[toolbar] zoom"])},i=()=>{var e;a()&&(e=f.connectTable,e)&&e.importData()},S=()=>{var e;a()&&(e=f.connectTable,e)&&e.openImport()},s=()=>{var e;a()&&(e=f.connectTable,e)&&e.exportData()},U=()=>{var e;a()&&(e=f.connectTable,e)&&e.openExport()},c=()=>{var e;a()&&(e=f.connectTable,e)&&e.print()},w=()=>{var e;a()&&(e=f.connectTable,e)&&e.openPrint()},l=(e,t,o)=>{switch(t.code){case"print":c();break;case"open_print":w();break;case"custom":I(e);break;case"export":s();break;case"open_export":U();break;case"import":i();break;case"open_import":S();break;case"zoom":P(e);break;case"refresh":E(e);break;default:o()}},N=(e,o)=>{let r=e.$event;var t=f.connectTable;let n=t,a=o.code;a&&l(e,o,()=>{var e,t;m?m.triggerToolbarBtnEvent(o,r):(t=commands.get(a),e={code:a,button:o,$table:n,$grid:p,$gantt:v,$event:r},t&&((t=t.tableCommandMethod||t.commandMethod)?t(e):(0,_log.errLog)("vxe.error.notCommands",["[toolbar] "+a])),O.dispatchEvent("button-click",e,r))})},B=(e,o)=>{let r=e.$event;var t=f.connectTable;let n=t,a=o.code;a&&l(e,o,()=>{var e,t;m?m.triggerToolbarTolEvent(o,r):(t=commands.get(a),e={code:a,button:null,tool:o,$table:n,$grid:p,$gantt:v,$event:r},t&&((t=t.tableCommandMethod||t.commandMethod)?t(e):(0,_log.errLog)("vxe.error.notCommands",["[toolbar] "+a])),O.dispatchEvent("tool-click",e,r))})};Object.assign(O,{dispatchEvent:(e,t,o)=>{r(e,createEvent(o,{$toolbar:O},t))},syncUpdate(e){f.connectTable=e.$table,_.columns=e.collectColumn,_.connectFlag++}});let z=(e,o)=>{e=e.dropdowns;return e?e.map((t,e)=>!1!==t.visible&&b?(0,_vue.h)(b,Object.assign(Object.assign({key:e},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>(o?N:B)(e,t)})):(0,_vue.createCommentVNode)()):[]};return O.renderVN=()=>{var{perfect:e,loading:t,refresh:o,zoom:r,custom:n,className:a}=u,l=f.connectTable,i=d.value,s=g.tools,c=g.buttons;return(0,_vue.h)("div",{ref:x,class:["vxe-toolbar",a?_xeUtils.default.isFunction(a)?a({$toolbar:O}):a:"",{["size--"+i]:i,"is--perfect":e,"is--loading":t}]},[(0,_vue.h)("div",{class:"vxe-buttons--wrapper"},c?c({$grid:p,$gantt:v,$table:l}):(()=>{var e=u.buttons,t=f.connectTable;let i=t;var t=g.buttonPrefix||g["button-prefix"],o=g.buttonSuffix||g["button-suffix"];let s=[];return t&&s.push(...(0,_vn.getSlotVNs)(t({buttons:e||[],$grid:p,$gantt:v,$table:i}))),e&&e.forEach((t,e)=>{var o,r,n,{dropdowns:a,buttonRender:l}=t;!1!==t.visible&&(o=l?renderer.get(l.name):null,l&&o&&o.renderToolbarButton?(r=o.toolbarButtonClassName,n={$grid:p,$gantt:v,$table:i,button:t},s.push((0,_vue.h)("span",{key:"br"+(t.code||e),class:["vxe-button--item",r?_xeUtils.default.isFunction(r)?r(n):r:""]},(0,_vn.getSlotVNs)(o.renderToolbarButton(l,n))))):b&&s.push((0,_vue.h)(b,Object.assign(Object.assign({key:"bd"+(t.code||e)},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>N(e,t)}),a&&a.length?{dropdowns:()=>z(t,!0)}:{})))}),o&&s.push(...(0,_vn.getSlotVNs)(o({buttons:e||[],$grid:p,$gantt:v,$table:i}))),s})()),(0,_vue.h)("div",{class:"vxe-tools--wrapper"},s?s({$grid:p,$gantt:v,$table:l}):(()=>{var e=u.tools,t=f.connectTable;let s=t;var t=g.toolPrefix||g["tool-prefix"],o=g.toolSuffix||g["tool-suffix"];let c=[];return t&&c.push(...(0,_vn.getSlotVNs)(t({tools:e||[],$grid:p,$gantt:v,$table:s}))),e&&e.forEach((t,e)=>{var o,r,n,a,{dropdowns:l,toolRender:i}=t;!1!==t.visible&&(o=i?i.name:null,r=i?renderer.get(o):null,i&&r&&r.renderToolbarTool?(n=r.toolbarToolClassName,a={$grid:p,$gantt:v,$table:s,tool:t},c.push((0,_vue.h)("span",{key:o,class:["vxe-tool--item",n?_xeUtils.default.isFunction(n)?n(a):n:""]},(0,_vn.getSlotVNs)(r.renderToolbarTool(i,a))))):b&&c.push((0,_vue.h)(b,Object.assign(Object.assign({key:e},Object.assign({},t,{content:t.name,options:void 0})),{onClick:e=>B(e,t)}),l&&l.length?{dropdowns:()=>z(t,!1)}:{})))}),o&&c.push(...(0,_vn.getSlotVNs)(o({tools:e||[],$grid:p,$gantt:v,$table:s}))),c})()),(0,_vue.h)("div",{class:"vxe-tools--operate"},[u.import&&(a=T.value,b)?(0,_vue.h)(b,{key:"import",circle:!0,icon:a.icon||getIcon().TOOLBAR_TOOLS_IMPORT,title:getI18n("vxe.toolbar.import"),onClick:S}):(0,_vue.createCommentVNode)(),u.export&&(i=C.value,b)?(0,_vue.h)(b,{key:"export",circle:!0,icon:i.icon||getIcon().TOOLBAR_TOOLS_EXPORT,title:getI18n("vxe.toolbar.export"),onClick:U}):(0,_vue.createCommentVNode)(),u.print&&(e=$.value,b)?(0,_vue.h)(b,{key:"print",circle:!0,icon:e.icon||getIcon().TOOLBAR_TOOLS_PRINT,title:getI18n("vxe.toolbar.print"),onClick:w}):(0,_vue.createCommentVNode)(),o&&(t=h.value,b)?(0,_vue.h)(b,{key:"refresh",circle:!0,icon:_.isRefresh?t.iconLoading||getIcon().TOOLBAR_TOOLS_REFRESH_LOADING:t.icon||getIcon().TOOLBAR_TOOLS_REFRESH,title:getI18n("vxe.toolbar.refresh"),onClick:E}):(0,_vue.createCommentVNode)(),r&&m&&(c=j.value,m)&&b?(0,_vue.h)(b,{key:"zoom",circle:!0,icon:m.isMaximized()?c.iconOut||getIcon().TOOLBAR_TOOLS_MINIMIZE:c.iconIn||getIcon().TOOLBAR_TOOLS_FULLSCREEN,title:getI18n("vxe.toolbar.zoom"+(m.isMaximized()?"Out":"In")),onClick:P}):(0,_vue.createCommentVNode)(),n&&(s=L.value,l=k.value,a={},"manual"!==l&&("hover"===l?(a.onMouseenter=R,a.onMouseleave=y):a.onClick=I),b)?(0,_vue.h)(b,Object.assign({key:"custom",circle:!0,icon:s.icon||getIcon().TOOLBAR_TOOLS_CUSTOM,title:getI18n("vxe.toolbar.custom"),className:"vxe-toolbar-custom-target"},a)):(0,_vue.createCommentVNode)()])])},(0,_vue.nextTick)(()=>{var e=h.value,e=e.queryMethod||e.query,e=(!u.refresh||m||e||(0,_log.warnLog)("vxe.error.notFunc",["[toolbar] queryMethod"]),_xeUtils.default.isPlainObject(u.custom)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] custom={...}","custom=boolean & custom-options={...}"]),_xeUtils.default.isPlainObject(u.print)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] print={...}","print=boolean & print-options={...}"]),_xeUtils.default.isPlainObject(u.export)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] export={...}","export=boolean & export-options={...}"]),_xeUtils.default.isPlainObject(u.import)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] import={...}","import=boolean & import-options={...}"]),_xeUtils.default.isPlainObject(u.refresh)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] refresh={...}","refresh=boolean & refresh-options={...}"]),_xeUtils.default.isPlainObject(u.refresh)&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] zoom={...}","zoom=boolean & zoom-options={...}"]),L.value);e.isFooter&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] toolbar.custom.isFooter","table.custom-config.showFooter"]),e.showFooter&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] toolbar.custom.showFooter","table.custom-config.showFooter"]),e.immediate&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] toolbar.custom.immediate","table.custom-config.immediate"]),e.trigger&&(0,_log.warnLog)("vxe.error.delProp",["[toolbar] toolbar.custom.trigger","table.custom-config.trigger"]),(u.refresh||u.import||u.export||u.print||u.zoom)&&!b&&(0,_log.errLog)("vxe.error.reqComp",["vxe-button"])}),(0,_vue.onUnmounted)(()=>{_xeUtils.default.assign(f,createInternalData())}),O},render(){return this.renderVN()}});
|
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ 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.16.
|
|
16
|
+
const version = exports.version = "4.16.15";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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");let version=exports.version="4.16.
|
|
1
|
+
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");let version=exports.version="4.16.15",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},headerTooltipConfig:{enterable:!0},footerTooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{autoOptions:{isCalcHeader:!0,isCalcBody:!0,isCalcFooter:!0},maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",storeOptions:{visible:!0,resizable:!0,sort:!0,fixed:!0},modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{multiple:!0,showIcon:!0},aggregateConfig:{padding:!0,rowField:"id",parentField:"_X_ROW_PARENT_KEY",childrenField:"_X_ROW_CHILDREN",mapChildrenField:"_X_ROW_CHILD_LIST",indent:20,showIcon:!0,maxGroupSize:4,showAggFuncTitle:!0},treeConfig:{padding:!0,rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0,mode:"fixed"},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!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:{isAll:!0,isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{gt:24,preSize:1,oSize:0},virtualYConfig:{gt:100,preSize:1,oSize:0},scrollbarConfig:{x:{visible:!0},y:{visible:!0}}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{},gantt:{}}),"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_CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_AGG_GROUP:iconPrefix+"grouping",TABLE_DRAG_STATUS_AGG_VALUES:iconPrefix+"values",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TABLE_ROW_GROUP_OPEN:iconPrefix+"arrow-right rotate90",TABLE_ROW_GROUP_CLOSE:iconPrefix+"arrow-right",TABLE_AGGREGATE_GROUPING:iconPrefix+"grouping",TABLE_AGGREGATE_VALUES:iconPrefix+"values",TABLE_AGGREGATE_SORT:iconPrefix+"drag-handle",TABLE_AGGREGATE_DELETE:iconPrefix+"close",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.16.
|
|
11
|
+
const version = `table v${"4.16.15"}`;
|
|
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
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.15",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.16.
|
|
3
|
+
"version": "4.16.15",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -500,7 +500,7 @@ export default defineVxeComponent({
|
|
|
500
500
|
if (slots[funcSlot]) {
|
|
501
501
|
return slots[funcSlot]
|
|
502
502
|
} else {
|
|
503
|
-
errLog('vxe.error.notSlot', [funcSlot])
|
|
503
|
+
errLog('vxe.error.notSlot', [`[grid] ${funcSlot}`])
|
|
504
504
|
}
|
|
505
505
|
} else {
|
|
506
506
|
return funcSlot
|
|
@@ -517,7 +517,7 @@ export default defineVxeComponent({
|
|
|
517
517
|
if (slots[slotFunc]) {
|
|
518
518
|
slotConf[slotKey] = slots[slotFunc]
|
|
519
519
|
} else {
|
|
520
|
-
errLog('vxe.error.notSlot', [slotFunc])
|
|
520
|
+
errLog('vxe.error.notSlot', [`[grid] ${slotFunc}`])
|
|
521
521
|
}
|
|
522
522
|
} else {
|
|
523
523
|
slotConf[slotKey] = slotFunc
|
|
@@ -826,7 +826,7 @@ export default defineVxeComponent({
|
|
|
826
826
|
childVNs.push(renderPager())
|
|
827
827
|
break
|
|
828
828
|
default:
|
|
829
|
-
errLog('vxe.error.notProp', [`layouts -> ${key}`])
|
|
829
|
+
errLog('vxe.error.notProp', [`[grid] layouts -> ${key}`])
|
|
830
830
|
break
|
|
831
831
|
}
|
|
832
832
|
})
|
|
@@ -1132,7 +1132,7 @@ export default defineVxeComponent({
|
|
|
1132
1132
|
return { status: false }
|
|
1133
1133
|
})
|
|
1134
1134
|
} else {
|
|
1135
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
1135
|
+
errLog('vxe.error.notFunc', ['[grid] proxy-config.ajax.query'])
|
|
1136
1136
|
}
|
|
1137
1137
|
break
|
|
1138
1138
|
}
|
|
@@ -1200,7 +1200,7 @@ export default defineVxeComponent({
|
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
1202
|
} else {
|
|
1203
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
1203
|
+
errLog('vxe.error.notFunc', ['[grid] proxy-config.ajax.delete'])
|
|
1204
1204
|
}
|
|
1205
1205
|
break
|
|
1206
1206
|
}
|
|
@@ -1281,7 +1281,7 @@ export default defineVxeComponent({
|
|
|
1281
1281
|
}
|
|
1282
1282
|
})
|
|
1283
1283
|
} else {
|
|
1284
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1284
|
+
errLog('vxe.error.notFunc', ['[grid] proxy-config.ajax.save'])
|
|
1285
1285
|
}
|
|
1286
1286
|
break
|
|
1287
1287
|
}
|
|
@@ -1292,7 +1292,7 @@ export default defineVxeComponent({
|
|
|
1292
1292
|
if (tCommandMethod) {
|
|
1293
1293
|
tCommandMethod({ code, button, $grid: $xeGrid, $table: $xeTable, $gantt: null }, ...args)
|
|
1294
1294
|
} else {
|
|
1295
|
-
errLog('vxe.error.notCommands', [code])
|
|
1295
|
+
errLog('vxe.error.notCommands', [`[grid] ${code}`])
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
@@ -1508,7 +1508,7 @@ export default defineVxeComponent({
|
|
|
1508
1508
|
XEUtils.each(column.slots, (func) => {
|
|
1509
1509
|
if (!XEUtils.isFunction(func)) {
|
|
1510
1510
|
if (!slots[func]) {
|
|
1511
|
-
errLog('vxe.error.notSlot', [func])
|
|
1511
|
+
errLog('vxe.error.notSlot', [`[grid] ${func}`])
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
})
|
|
@@ -1604,11 +1604,11 @@ export default defineVxeComponent({
|
|
|
1604
1604
|
// const { data, columns, proxyConfig } = props
|
|
1605
1605
|
// const formOpts = computeFormOpts.value
|
|
1606
1606
|
// if (isEnableConf(proxyConfig) && (data || (proxyOpts.form && formOpts.data))) {
|
|
1607
|
-
// errLog('vxe.error.errConflicts', ['grid
|
|
1607
|
+
// errLog('vxe.error.errConflicts', ['[grid] data', 'proxy-config'])
|
|
1608
1608
|
// }
|
|
1609
1609
|
|
|
1610
1610
|
if (proxyOpts.props) {
|
|
1611
|
-
warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
1611
|
+
warnLog('vxe.error.delProp', ['[grid] proxy-config.props', 'proxy-config.response'])
|
|
1612
1612
|
}
|
|
1613
1613
|
|
|
1614
1614
|
if (columns && columns.length) {
|
|
@@ -939,6 +939,36 @@ renderer.mixin({
|
|
|
939
939
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
940
940
|
tableExportMethod: handleExportSelectMethod
|
|
941
941
|
},
|
|
942
|
+
VxeText: {
|
|
943
|
+
renderTableDefault (renderOpts, params) {
|
|
944
|
+
const { $table, row, column } = params
|
|
945
|
+
const { props } = renderOpts
|
|
946
|
+
const cellLabel = $table.getCellLabel(row, column)
|
|
947
|
+
return [
|
|
948
|
+
h(getDefaultComponent(renderOpts), {
|
|
949
|
+
...(props || {}),
|
|
950
|
+
content: cellLabel,
|
|
951
|
+
...getComponentOns(renderOpts, params)
|
|
952
|
+
})
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
VxeLink: {
|
|
957
|
+
renderTableDefault (renderOpts, params) {
|
|
958
|
+
const { $table, row, column } = params
|
|
959
|
+
const { props } = renderOpts
|
|
960
|
+
const { href } = props || {}
|
|
961
|
+
const cellLabel = $table.getCellLabel(row, column)
|
|
962
|
+
return [
|
|
963
|
+
h(getDefaultComponent(renderOpts), {
|
|
964
|
+
...(props || {}),
|
|
965
|
+
content: cellLabel,
|
|
966
|
+
href: XEUtils.toFormatString(href, params),
|
|
967
|
+
...getComponentOns(renderOpts, params)
|
|
968
|
+
})
|
|
969
|
+
]
|
|
970
|
+
}
|
|
971
|
+
},
|
|
942
972
|
/**
|
|
943
973
|
* 已废弃,被 FormatSelect 替换
|
|
944
974
|
* @deprecated
|
|
@@ -11111,9 +11111,9 @@ export default defineVxeComponent({
|
|
|
11111
11111
|
}
|
|
11112
11112
|
if (isRollY) {
|
|
11113
11113
|
const yThreshold = computeScrollYThreshold.value
|
|
11114
|
-
isTop = scrollTop <=
|
|
11114
|
+
isTop = scrollTop <= 1
|
|
11115
11115
|
if (!isTop) {
|
|
11116
|
-
isBottom = scrollTop + bodyHeight >= scrollHeight
|
|
11116
|
+
isBottom = scrollTop + bodyHeight >= scrollHeight - 1
|
|
11117
11117
|
}
|
|
11118
11118
|
if (scrollTop > lastScrollTop) {
|
|
11119
11119
|
direction = 'bottom'
|
|
@@ -202,7 +202,7 @@ export default defineVxeComponent({
|
|
|
202
202
|
if ($xeGGWrapper) {
|
|
203
203
|
$xeGGWrapper.triggerZoomEvent($event)
|
|
204
204
|
} else {
|
|
205
|
-
warnLog('vxe.error.notProp', ['zoom'])
|
|
205
|
+
warnLog('vxe.error.notProp', ['[toolbar] zoom'])
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -318,7 +318,7 @@ export default defineVxeComponent({
|
|
|
318
318
|
if (tCommandMethod) {
|
|
319
319
|
tCommandMethod(params)
|
|
320
320
|
} else {
|
|
321
|
-
errLog('vxe.error.notCommands', [code])
|
|
321
|
+
errLog('vxe.error.notCommands', [`[toolbar] ${code}`])
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
$xeToolbar.dispatchEvent('button-click', params, $event)
|
|
@@ -344,7 +344,7 @@ export default defineVxeComponent({
|
|
|
344
344
|
if (tCommandMethod) {
|
|
345
345
|
tCommandMethod(params)
|
|
346
346
|
} else {
|
|
347
|
-
errLog('vxe.error.notCommands', [code])
|
|
347
|
+
errLog('vxe.error.notCommands', [`[toolbar] ${code}`])
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
$xeToolbar.dispatchEvent('tool-click', params, $event)
|
|
@@ -636,40 +636,40 @@ export default defineVxeComponent({
|
|
|
636
636
|
const refreshOpts = computeRefreshOpts.value
|
|
637
637
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query
|
|
638
638
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
639
|
-
warnLog('vxe.error.notFunc', ['queryMethod'])
|
|
639
|
+
warnLog('vxe.error.notFunc', ['[toolbar] queryMethod'])
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
if (XEUtils.isPlainObject(props.custom)) {
|
|
643
|
-
warnLog('vxe.error.delProp', ['custom={...}', 'custom=boolean & custom-options={...}'])
|
|
643
|
+
warnLog('vxe.error.delProp', ['[toolbar] custom={...}', 'custom=boolean & custom-options={...}'])
|
|
644
644
|
}
|
|
645
645
|
if (XEUtils.isPlainObject(props.print)) {
|
|
646
|
-
warnLog('vxe.error.delProp', ['print={...}', 'print=boolean & print-options={...}'])
|
|
646
|
+
warnLog('vxe.error.delProp', ['[toolbar] print={...}', 'print=boolean & print-options={...}'])
|
|
647
647
|
}
|
|
648
648
|
if (XEUtils.isPlainObject(props.export)) {
|
|
649
|
-
warnLog('vxe.error.delProp', ['export={...}', 'export=boolean & export-options={...}'])
|
|
649
|
+
warnLog('vxe.error.delProp', ['[toolbar] export={...}', 'export=boolean & export-options={...}'])
|
|
650
650
|
}
|
|
651
651
|
if (XEUtils.isPlainObject(props.import)) {
|
|
652
|
-
warnLog('vxe.error.delProp', ['import={...}', 'import=boolean & import-options={...}'])
|
|
652
|
+
warnLog('vxe.error.delProp', ['[toolbar] import={...}', 'import=boolean & import-options={...}'])
|
|
653
653
|
}
|
|
654
654
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
655
|
-
warnLog('vxe.error.delProp', ['refresh={...}', 'refresh=boolean & refresh-options={...}'])
|
|
655
|
+
warnLog('vxe.error.delProp', ['[toolbar] refresh={...}', 'refresh=boolean & refresh-options={...}'])
|
|
656
656
|
}
|
|
657
657
|
if (XEUtils.isPlainObject(props.refresh)) {
|
|
658
|
-
warnLog('vxe.error.delProp', ['zoom={...}', 'zoom=boolean & zoom-options={...}'])
|
|
658
|
+
warnLog('vxe.error.delProp', ['[toolbar] zoom={...}', 'zoom=boolean & zoom-options={...}'])
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
const customOpts = computeCustomOpts.value
|
|
662
662
|
if (customOpts.isFooter) {
|
|
663
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter'])
|
|
663
|
+
warnLog('vxe.error.delProp', ['[toolbar] toolbar.custom.isFooter', 'table.custom-config.showFooter'])
|
|
664
664
|
}
|
|
665
665
|
if (customOpts.showFooter) {
|
|
666
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter'])
|
|
666
|
+
warnLog('vxe.error.delProp', ['[toolbar] toolbar.custom.showFooter', 'table.custom-config.showFooter'])
|
|
667
667
|
}
|
|
668
668
|
if (customOpts.immediate) {
|
|
669
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate'])
|
|
669
|
+
warnLog('vxe.error.delProp', ['[toolbar] toolbar.custom.immediate', 'table.custom-config.immediate'])
|
|
670
670
|
}
|
|
671
671
|
if (customOpts.trigger) {
|
|
672
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
672
|
+
warnLog('vxe.error.delProp', ['[toolbar] toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
673
673
|
}
|
|
674
674
|
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
675
675
|
if (!VxeUIButtonComponent) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|