vxe-pc-ui 4.20.13 → 4.20.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/dist/all.esm.js +50 -15
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/select/src/select.js +3 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +45 -12
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +55 -14
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +3 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +50 -11
- package/lib/table-select/src/table-select.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/select/src/select.ts +3 -1
- package/packages/table-select/src/table-select.ts +47 -14
- /package/es/icon/{iconfont.1792480474156.ttf → iconfont.1792662810345.ttf} +0 -0
- /package/es/icon/{iconfont.1792480474156.woff → iconfont.1792662810345.woff} +0 -0
- /package/es/icon/{iconfont.1792480474156.woff2 → iconfont.1792662810345.woff2} +0 -0
- /package/es/{iconfont.1792480474156.ttf → iconfont.1792662810345.ttf} +0 -0
- /package/es/{iconfont.1792480474156.woff → iconfont.1792662810345.woff} +0 -0
- /package/es/{iconfont.1792480474156.woff2 → iconfont.1792662810345.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1792480474156.ttf → iconfont.1792662810345.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1792480474156.woff → iconfont.1792662810345.woff} +0 -0
- /package/lib/icon/style/{iconfont.1792480474156.woff2 → iconfont.1792662810345.woff2} +0 -0
- /package/lib/{iconfont.1792480474156.ttf → iconfont.1792662810345.ttf} +0 -0
- /package/lib/{iconfont.1792480474156.woff → iconfont.1792662810345.woff} +0 -0
- /package/lib/{iconfont.1792480474156.woff2 → iconfont.1792662810345.woff2} +0 -0
|
@@ -159,11 +159,27 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
159
159
|
const computePropsOpts = (0, _vue.computed)(() => {
|
|
160
160
|
return props.optionProps || {};
|
|
161
161
|
});
|
|
162
|
+
const computeCheckboxOpts = (0, _vue.computed)(() => {
|
|
163
|
+
const {
|
|
164
|
+
multiple
|
|
165
|
+
} = props;
|
|
166
|
+
const gridOpts = computeGridOpts.value;
|
|
167
|
+
return Object.assign({
|
|
168
|
+
reserve: multiple,
|
|
169
|
+
showReserveStatus: multiple
|
|
170
|
+
}, (0, _ui.getConfig)().table.checkboxConfig, gridOpts.checkboxConfig);
|
|
171
|
+
});
|
|
162
172
|
const computeRowOpts = (0, _vue.computed)(() => {
|
|
173
|
+
const {
|
|
174
|
+
multiple
|
|
175
|
+
} = props;
|
|
163
176
|
const gridOpts = computeGridOpts.value;
|
|
164
|
-
|
|
177
|
+
const valueField = computeValueField.value;
|
|
178
|
+
return Object.assign({
|
|
165
179
|
isCurrent: true
|
|
166
|
-
}
|
|
180
|
+
}, multiple ? {
|
|
181
|
+
keyField: valueField
|
|
182
|
+
} : {}, (0, _ui.getConfig)().table.rowConfig, gridOpts.rowConfig);
|
|
167
183
|
});
|
|
168
184
|
const computeRowKeyField = (0, _vue.computed)(() => {
|
|
169
185
|
const rowOpts = computeRowOpts.value;
|
|
@@ -187,6 +203,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
187
203
|
});
|
|
188
204
|
const computeSelectGridOpts = (0, _vue.computed)(() => {
|
|
189
205
|
const gridOpts = computeGridOpts.value;
|
|
206
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
190
207
|
const {
|
|
191
208
|
pagerConfig,
|
|
192
209
|
proxyConfig
|
|
@@ -226,11 +243,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
226
243
|
});
|
|
227
244
|
}
|
|
228
245
|
return Object.assign({}, gridOpts, {
|
|
246
|
+
checkboxConfig: checkboxOpts,
|
|
229
247
|
proxyConfig: newProxyConfig
|
|
230
248
|
});
|
|
231
249
|
}
|
|
232
250
|
}
|
|
233
|
-
return gridOpts
|
|
251
|
+
return Object.assign({}, gridOpts, {
|
|
252
|
+
checkboxConfig: checkboxOpts
|
|
253
|
+
});
|
|
234
254
|
});
|
|
235
255
|
const computeSelectLabel = (0, _vue.computed)(() => {
|
|
236
256
|
const {
|
|
@@ -306,22 +326,37 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
306
326
|
};
|
|
307
327
|
const tableSelectPrivateMethods = {};
|
|
308
328
|
const getRowid = option => {
|
|
309
|
-
const
|
|
310
|
-
const rowid = option[
|
|
329
|
+
const rowKeyField = computeRowKeyField.value;
|
|
330
|
+
const rowid = option[rowKeyField];
|
|
311
331
|
return rowid ? encodeURIComponent(rowid) : '';
|
|
312
332
|
};
|
|
313
333
|
const getRowsByValue = modelValue => {
|
|
314
334
|
const {
|
|
315
335
|
fullRowMaps
|
|
316
336
|
} = internalData;
|
|
337
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
338
|
+
const rowKeyField = computeRowKeyField.value;
|
|
339
|
+
const valueField = computeValueField.value;
|
|
340
|
+
const labelField = computeLabelField.value;
|
|
317
341
|
const rows = [];
|
|
318
342
|
const vals = _xeUtils.default.eqNull(modelValue) ? [] : _xeUtils.default.isArray(modelValue) ? modelValue : [modelValue];
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
rows.push(cacheItem.item
|
|
323
|
-
|
|
324
|
-
|
|
343
|
+
if (checkboxOpts.reserve) {
|
|
344
|
+
vals.forEach(val => {
|
|
345
|
+
const cacheItem = fullRowMaps[val];
|
|
346
|
+
rows.push(cacheItem ? cacheItem.item : {
|
|
347
|
+
[rowKeyField]: val,
|
|
348
|
+
[valueField]: val,
|
|
349
|
+
[labelField]: val
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
} else {
|
|
353
|
+
vals.forEach(val => {
|
|
354
|
+
const cacheItem = fullRowMaps[val];
|
|
355
|
+
if (cacheItem) {
|
|
356
|
+
rows.push(cacheItem.item);
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
325
360
|
return rows;
|
|
326
361
|
};
|
|
327
362
|
const updateModel = modelValue => {
|
|
@@ -624,9 +659,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
624
659
|
$event,
|
|
625
660
|
row
|
|
626
661
|
} = params;
|
|
662
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
627
663
|
const valueField = computeValueField.value;
|
|
628
664
|
if ($grid) {
|
|
629
665
|
const checkboxRecords = $grid.getCheckboxRecords();
|
|
666
|
+
if (checkboxOpts.reserve) {
|
|
667
|
+
checkboxRecords.push(...$grid.getCheckboxReserveRecords());
|
|
668
|
+
}
|
|
630
669
|
const value = checkboxRecords.map(row => {
|
|
631
670
|
return row[valueField];
|
|
632
671
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getRowUniqueId=getRowUniqueId;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_vn=require("../../ui/src/vn"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input/src/input"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let errLog=(0,_log.createComponentLog)("table-select").errLog;function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function createReactData(){return{initialized:!1,tableColumns:[],fullOptionList:[],panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}}function createInternalData(){return{fullRowMaps:{}}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableSelect",props:{modelValue:[String,Number,Array],clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().tableSelect.clearable},placeholder:{type:String,default:()=>_xeUtils.default.eqNull((0,_ui.getConfig)().tableSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().tableSelect.placeholder},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},multiple:Boolean,className:[String,Function],prefixIcon:String,placement:String,columns:Array,options:Array,optionProps:Object,lazyOptions:Array,zIndex:Number,size:{type:String,default:()=>(0,_ui.getConfig)().tableSelect.size||(0,_ui.getConfig)().size},popupConfig:Object,gridConfig:Object,transfer:{type:Boolean,default:null}},emits:["update:modelValue","change","clear","blur","focus","click","form-submit","form-reset","form-collapse","page-change"],setup(C,e){let{emit:a,slots:y}=e,T=_ui.VxeUI.getComponent("vxe-grid"),l=(0,_vue.inject)("$xeModal",null),i=(0,_vue.inject)("$xeDrawer",null),h=(0,_vue.inject)("$xeTable",null),u=(0,_vue.inject)("$xeForm",null),n=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();let $=(0,_ui.useSize)(C).computeSize,E=(0,_vue.ref)(),I=(0,_vue.ref)(),V=(0,_vue.ref)(),w=(0,_vue.ref)(),S=(0,_vue.ref)(),U=(0,_vue.reactive)(createReactData()),s=createInternalData(),k={refElem:E},D=(0,_vue.computed)(()=>{var e=C.readonly;return null===e?!!u&&u.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=C.disabled;return null===e?!!u&&u.props.disabled:e}),R=(0,_vue.computed)(()=>{var e=C.transfer,t=j.value;if(_xeUtils.default.isBoolean(t.transfer))return t.transfer;if(null===e){t=(0,_ui.getConfig)().tableSelect.transfer;if(_xeUtils.default.isBoolean(t))return t;if(h||l||i||u)return!0}return e}),r=(0,_vue.computed)(()=>C.optionProps||{}),O=(0,_vue.computed)(()=>{var e=d.value;return Object.assign({},e.rowConfig,{isCurrent:!0})}),v=(0,_vue.computed)(()=>O.value.keyField||"_X_ROW_KEY"),F=(0,_vue.computed)(()=>r.value.label||"label"),c=(0,_vue.computed)(()=>r.value.value||"value"),j=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.popupConfig,C.popupConfig)),d=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.gridConfig,C.gridConfig,{data:void 0})),N=(0,_vue.computed)(()=>{var e=d.value;let{pagerConfig:i,proxyConfig:t}=e;if(t){var a=t.ajax;if(a&&a.query){var u=_xeUtils.default.clone(t,!0);let l=a.query;if(l){let a=t.response||t.props||{};Object.assign(u.ajax,{query(e,...t){return Promise.resolve(l(e,...t)).then(e=>{let t=[];var l;return t=i?(l=a.result,(_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l||"result"))||[]):((l=a.list)?_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l):e)||[],g(t||[]),e})}})}return Object.assign({},e,{proxyConfig:u})}}return e}),B=(0,_vue.computed)(()=>{let{modelValue:e,lazyOptions:l}=C;var t=U.fullOptionList;let a=s.fullRowMaps,i=c.value,u=F.value;return t?(_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=a[t];if(e)return e.item[u];if(l){e=l.find(e=>e[i]===t);if(e)return e[u]}return t}).join(", "):""}),M=(0,_vue.computed)(()=>{var{height:e,width:t}=j.value,l={};return t&&(l.width=(0,_dom.toCssUnit)(t)),e&&(l.height=(0,_dom.toCssUnit)(e)),l}),K={},q={xID:t,props:C,context:e,reactData:U,getRefMaps:()=>k,getComputeMaps:()=>K};let A={},o=(["form-submit","form-reset","form-collapse","page-change"].forEach(t=>{A[(0,_vn.getOnName)(_xeUtils.default.camelCase(t))]=e=>{o(t,e,e.$event)}}),(e,t,l)=>{a(e,(0,_ui.createEvent)(l,{$tableSelect:q},t))}),Z=e=>{a("update:modelValue",e)};t={dispatchEvent:o};let W=e=>{let t=s.fullRowMaps,l=[];return(_xeUtils.default.eqNull(e)?[]:_xeUtils.default.isArray(e)?e:[e]).forEach(e=>{e=t[e];e&&l.push(e.item)}),l},p=l=>{let a=C.multiple;(0,_vue.nextTick)(()=>{var e,t=S.value;t&&(e=W(l)).length&&(a?t.setCheckboxRow(e,!0):t.setRadioRow(e[0]))})},f=e=>{if(e&&e.length){var i=C.multiple;let t=[],l=!1,a=!1;e.forEach(e=>{l||"radio"!==e.type?a||"checkbox"!==e.type||(a=!0):l=!0,t.push(e)}),i?a||t.unshift({type:"checkbox",width:70}):l||t.unshift({type:"radio",width:70}),U.tableColumns=t}},g=e=>{var t=C.options;let u=v.value,n=c.value;var{treeConfig:l,pagerConfig:a}=d.value;let r={},o={};l||_xeUtils.default.arrayEach(e||t||[],(e,t,l)=>{let a=(e=>{e=e[v.value];return e?encodeURIComponent(e):""})(e);a=a||getRowUniqueId(),o[a]&&errLog("vxe.error.repeatKey",[u,a]),o[a]=!0;var i=e[n];r[i]&&errLog("vxe.error.repeatKey",[n,i]),r[i]={item:e,index:t,items:l,parent:null,nodes:[]}}),U.fullOptionList=e||t||[],s.fullRowMaps=a?Object.assign({},s.fullRowMaps,r):r,p(C.modelValue)},X=()=>{var e=j.value.zIndex||C.zIndex;e?U.panelIndex=_xeUtils.default.toNumber(e):U.panelIndex<(0,_utils.getLastZIndex)()&&(U.panelIndex=(0,_utils.nextZIndex)())},_=()=>{let l=C.placement,a=U.panelIndex,i=E.value,u=w.value,n=R.value,r=j.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(i,u,{placement:r.placement||l,defaultPlacement:r.defaultPlacement,appendTo:r.appendTo,teleportTo:n}),t=Object.assign(e.style,{zIndex:a});U.panelStyle=t,U.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},m=()=>{var e=C.loading,t=P.value;e||t||(s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),U.initialized||(U.initialized=!0),U.isActivated=!0,U.isAniVisible=!0,s.vpTimeout=setTimeout(()=>{U.visiblePanel=!0,p(C.modelValue),s.vpTimeout=void 0,_()},10),X(),_())},b=()=>{U.visiblePanel=!1,s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),s.hpTimeout=setTimeout(()=>{U.isAniVisible=!1,s.hpTimeout=void 0},350)},x=(e,t,l)=>{Z(t),t!==C.modelValue&&(o("change",{value:t,row:l,option:l},e),u)&&n&&u.triggerItemEvent(e,n.itemConfig.field,t)},Y=(e,t)=>{x(e,t,null),o("clear",{value:t},e)},G=(e,t)=>{var l=S.value;l&&(l.clearRadioRow(),l.clearCheckboxRow()),Y(t,null),b()},H=e=>{var t,l,a=U.visiblePanel;P.value||(t=E.value,l=w.value,U.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,a&&!U.isActivated&&b())},J=()=>{var{visiblePanel:e,isActivated:t}=U;e&&b(),t&&(U.isActivated=!1),(e||t)&&(e=I.value)&&e.blur()},Q=()=>{var e=U.visiblePanel;e&&_()},ee=()=>{var e=U.visiblePanel;e&&_()},te=e=>{P.value||U.visiblePanel||(U.triggerFocusPanel=!0,m(),setTimeout(()=>{U.triggerFocusPanel=!1},150)),o("focus",{},e)},le=e=>{z(e),o("click",{},e)},ae=e=>{U.isActivated=!1,o("blur",{},e)},z=e=>{e=e.$event;e.preventDefault(),U.triggerFocusPanel?U.triggerFocusPanel=!1:(U.visiblePanel?b:m)()},ie=e=>{var{$event:e,row:t}=e,l=t[c.value];x(e,l,t),b()},L=e=>{var{$grid:e,$event:t,row:l}=e;let a=c.value;e&&(e=e.getCheckboxRecords().map(e=>e[a]),x(t,e,l))},ue=e=>{L(e)};Object.assign(q,t,{});return(0,_vue.watch)(()=>C.options,()=>{g()}),(0,_vue.watch)(()=>C.columns,e=>{f(e)}),(0,_vue.watch)(()=>C.modelValue,e=>{p(e)}),f(C.columns),g(),(0,_vue.onMounted)(()=>{var e=C.gridConfig;e&&e.proxyConfig&&!1!==e.proxyConfig.autoLoad&&(U.initialized=!0),_ui.globalEvents.on(q,"mousedown",H),_ui.globalEvents.on(q,"blur",J),_ui.globalEvents.on(q,"resize",Q),_ui.globalEvents.on(q,"scroll",ee)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(q,"mousedown"),_ui.globalEvents.off(q,"blur"),_ui.globalEvents.off(q,"resize"),_ui.globalEvents.off(q,"scroll"),_xeUtils.default.assign(U,createReactData()),_xeUtils.default.assign(s,createInternalData())}),(0,_vue.nextTick)(()=>{T||errLog("vxe.error.reqComp",["vxe-grid"])}),(0,_vue.provide)("$xeTableSelect",q),q.renderVN=()=>{var{className:e,options:t,loading:l}=C,{initialized:a,isActivated:i,isAniVisible:u,visiblePanel:n,tableColumns:r}=U,o=$.value,s=P.value,v=B.value,c=R.value,d=D.value,p=j.value,f=N.value,g=O.value,_=M.value,m=p.appendTo,b=y.header,x=y.footer;let h=y.prefix;p=p.className;return d?(0,_vue.h)("div",{ref:E,class:["vxe-table-select--readonly",e]},[(0,_vue.h)("span",{class:"vxe-table-select-label"},v)]):(0,_vue.h)("div",{ref:E,class:["vxe-table-select",e?_xeUtils.default.isFunction(e)?e({$tableSelect:q}):e:"",{["size--"+o]:o,"is--visible":n,"is--disabled":s,"is--loading":l,"is--active":i}]},[(0,_vue.h)(_input.default,{ref:I,clearable:C.clearable,placeholder:l?(0,_ui.getI18n)("vxe.select.loadingText"):C.placeholder,editable:!1,disabled:s,type:"text",prefixIcon:C.prefixIcon,suffixIcon:l?(0,_ui.getIcon)().TABLE_SELECT_LOADED:n?(0,_ui.getIcon)().TABLE_SELECT_OPEN:(0,_ui.getIcon)().TABLE_SELECT_CLOSE,modelValue:l?"":v,onClear:G,onClick:le,onFocus:te,onBlur:ae,onSuffixClick:z},h?{prefix:()=>h({})}:{}),(0,_vue.h)(_vue.Teleport,{to:(0,_dom.getPopupContainer)(m),disabled:!c||!a},[(0,_vue.h)("div",{ref:w,class:["vxe-table--ignore-clear vxe-table-select--panel",p?_xeUtils.default.isFunction(p)?p({$tableSelect:q}):p:"",{["size--"+o]:o,"is--transfer":c,"ani--leave":!l&&u,"ani--enter":!l&&n}],placement:U.panelPlacement,style:U.panelStyle},a?[(0,_vue.h)("div",{class:"vxe-table-select--panel-wrapper"},[b?(0,_vue.h)("div",{class:"vxe-table-select--panel-header"},b({})):(0,_ui.renderEmptyElement)(q),(0,_vue.h)("div",{class:"vxe-table-select--panel-body"},[(0,_vue.h)("div",{ref:V,class:"vxe-table-select-grid--wrapper",style:_},[T?(0,_vue.h)(T,Object.assign(Object.assign(Object.assign({},f),A),{class:"vxe-table-select--grid",ref:S,rowConfig:g,data:t,columns:r.length?r:f.columns,height:"100%",autoResize:!0,onRadioChange:ie,onCheckboxChange:L,onCheckboxAll:ue}),Object.assign({},y,{header:void 0,footer:void 0,prefixSlot:void 0})):(0,_ui.renderEmptyElement)(q)])]),x?(0,_vue.h)("div",{class:"vxe-table-select--panel-footer"},x({})):(0,_ui.renderEmptyElement)(q)])]:[])])])},q},render(){return this.renderVN()}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getRowUniqueId=getRowUniqueId;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_vn=require("../../ui/src/vn"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_input=_interopRequireDefault(require("../../input/src/input"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let errLog=(0,_log.createComponentLog)("table-select").errLog;function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function createReactData(){return{initialized:!1,tableColumns:[],fullOptionList:[],panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}}function createInternalData(){return{fullRowMaps:{}}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableSelect",props:{modelValue:[String,Number,Array],clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().tableSelect.clearable},placeholder:{type:String,default:()=>_xeUtils.default.eqNull((0,_ui.getConfig)().tableSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().tableSelect.placeholder},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},multiple:Boolean,className:[String,Function],prefixIcon:String,placement:String,columns:Array,options:Array,optionProps:Object,lazyOptions:Array,zIndex:Number,size:{type:String,default:()=>(0,_ui.getConfig)().tableSelect.size||(0,_ui.getConfig)().size},popupConfig:Object,gridConfig:Object,transfer:{type:Boolean,default:null}},emits:["update:modelValue","change","clear","blur","focus","click","form-submit","form-reset","form-collapse","page-change"],setup(C,e){let{emit:a,slots:y}=e,T=_ui.VxeUI.getComponent("vxe-grid"),h=(0,_vue.inject)("$xeModal",null),L=(0,_vue.inject)("$xeDrawer",null),$=(0,_vue.inject)("$xeTable",null),i=(0,_vue.inject)("$xeForm",null),u=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();let V=(0,_ui.useSize)(C).computeSize,E=(0,_vue.ref)(),I=(0,_vue.ref)(),D=(0,_vue.ref)(),w=(0,_vue.ref)(),S=(0,_vue.ref)(),R=(0,_vue.reactive)(createReactData()),s=createInternalData(),F={refElem:E},N=(0,_vue.computed)(()=>{var e=C.readonly;return null===e?!!i&&i.props.readonly:e}),U=(0,_vue.computed)(()=>{var e=C.disabled;return null===e?!!i&&i.props.disabled:e}),O=(0,_vue.computed)(()=>{var e=C.transfer,t=j.value;if(_xeUtils.default.isBoolean(t.transfer))return t.transfer;if(null===e){t=(0,_ui.getConfig)().tableSelect.transfer;if(_xeUtils.default.isBoolean(t))return t;if($||h||L||i)return!0}return e}),l=(0,_vue.computed)(()=>C.optionProps||{}),r=(0,_vue.computed)(()=>{var e=C.multiple,t=d.value;return Object.assign({reserve:e,showReserveStatus:e},(0,_ui.getConfig)().table.checkboxConfig,t.checkboxConfig)}),P=(0,_vue.computed)(()=>{var e=C.multiple,t=d.value,l=c.value;return Object.assign({isCurrent:!0},e?{keyField:l}:{},(0,_ui.getConfig)().table.rowConfig,t.rowConfig)}),v=(0,_vue.computed)(()=>P.value.keyField||"_X_ROW_KEY"),o=(0,_vue.computed)(()=>l.value.label||"label"),c=(0,_vue.computed)(()=>l.value.value||"value"),j=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.popupConfig,C.popupConfig)),d=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.gridConfig,C.gridConfig,{data:void 0})),B=(0,_vue.computed)(()=>{var e=d.value,t=r.value;let{pagerConfig:i,proxyConfig:u}=e;if(u){var a=u.ajax;if(a&&a.query){var n=_xeUtils.default.clone(u,!0);let l=a.query;if(l){let a=u.response||u.props||{};Object.assign(n.ajax,{query(e,...t){return Promise.resolve(l(e,...t)).then(e=>{let t=[];var l;return t=i?(l=a.result,(_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l||"result"))||[]):((l=a.list)?_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l):e)||[],g(t||[]),e})}})}return Object.assign({},e,{checkboxConfig:t,proxyConfig:n})}}return Object.assign({},e,{checkboxConfig:t})}),M=(0,_vue.computed)(()=>{let{modelValue:e,lazyOptions:l}=C;var t=R.fullOptionList;let a=s.fullRowMaps,i=c.value,u=o.value;return t?(_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=a[t];if(e)return e.item[u];if(l){e=l.find(e=>e[i]===t);if(e)return e[u]}return t}).join(", "):""}),K=(0,_vue.computed)(()=>{var{height:e,width:t}=j.value,l={};return t&&(l.width=(0,_dom.toCssUnit)(t)),e&&(l.height=(0,_dom.toCssUnit)(e)),l}),Z={},q={xID:t,props:C,context:e,reactData:R,getRefMaps:()=>F,getComputeMaps:()=>Z};let A={},n=(["form-submit","form-reset","form-collapse","page-change"].forEach(t=>{A[(0,_vn.getOnName)(_xeUtils.default.camelCase(t))]=e=>{n(t,e,e.$event)}}),(e,t,l)=>{a(e,(0,_ui.createEvent)(l,{$tableSelect:q},t))}),W=e=>{a("update:modelValue",e)};t={dispatchEvent:n};let X=e=>{let l=s.fullRowMaps;var t=r.value;let a=v.value,i=c.value,u=o.value,n=[];e=_xeUtils.default.eqNull(e)?[]:_xeUtils.default.isArray(e)?e:[e];return t.reserve?e.forEach(e=>{var t=l[e];n.push(t?t.item:{[a]:e,[i]:e,[u]:e})}):e.forEach(e=>{e=l[e];e&&n.push(e.item)}),n},p=l=>{let a=C.multiple;(0,_vue.nextTick)(()=>{var e,t=S.value;t&&(e=X(l)).length&&(a?t.setCheckboxRow(e,!0):t.setRadioRow(e[0]))})},f=e=>{if(e&&e.length){var i=C.multiple;let t=[],l=!1,a=!1;e.forEach(e=>{l||"radio"!==e.type?a||"checkbox"!==e.type||(a=!0):l=!0,t.push(e)}),i?a||t.unshift({type:"checkbox",width:70}):l||t.unshift({type:"radio",width:70}),R.tableColumns=t}},g=e=>{var t=C.options;let u=v.value,n=c.value;var{treeConfig:l,pagerConfig:a}=d.value;let r={},o={};l||_xeUtils.default.arrayEach(e||t||[],(e,t,l)=>{let a=(e=>{e=e[v.value];return e?encodeURIComponent(e):""})(e);a=a||getRowUniqueId(),o[a]&&errLog("vxe.error.repeatKey",[u,a]),o[a]=!0;var i=e[n];r[i]&&errLog("vxe.error.repeatKey",[n,i]),r[i]={item:e,index:t,items:l,parent:null,nodes:[]}}),R.fullOptionList=e||t||[],s.fullRowMaps=a?Object.assign({},s.fullRowMaps,r):r,p(C.modelValue)},Y=()=>{var e=j.value.zIndex||C.zIndex;e?R.panelIndex=_xeUtils.default.toNumber(e):R.panelIndex<(0,_utils.getLastZIndex)()&&(R.panelIndex=(0,_utils.nextZIndex)())},_=()=>{let l=C.placement,a=R.panelIndex,i=E.value,u=w.value,n=O.value,r=j.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(i,u,{placement:r.placement||l,defaultPlacement:r.defaultPlacement,appendTo:r.appendTo,teleportTo:n}),t=Object.assign(e.style,{zIndex:a});R.panelStyle=t,R.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},m=()=>{var e=C.loading,t=U.value;e||t||(s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),R.initialized||(R.initialized=!0),R.isActivated=!0,R.isAniVisible=!0,s.vpTimeout=setTimeout(()=>{R.visiblePanel=!0,p(C.modelValue),s.vpTimeout=void 0,_()},10),Y(),_())},b=()=>{R.visiblePanel=!1,s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),s.hpTimeout=setTimeout(()=>{R.isAniVisible=!1,s.hpTimeout=void 0},350)},x=(e,t,l)=>{W(t),t!==C.modelValue&&(n("change",{value:t,row:l,option:l},e),i)&&u&&i.triggerItemEvent(e,u.itemConfig.field,t)},G=(e,t)=>{x(e,t,null),n("clear",{value:t},e)},H=(e,t)=>{var l=S.value;l&&(l.clearRadioRow(),l.clearCheckboxRow()),G(t,null),b()},J=e=>{var t,l,a=R.visiblePanel;U.value||(t=E.value,l=w.value,R.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,a&&!R.isActivated&&b())},Q=()=>{var{visiblePanel:e,isActivated:t}=R;e&&b(),t&&(R.isActivated=!1),(e||t)&&(e=I.value)&&e.blur()},ee=()=>{var e=R.visiblePanel;e&&_()},te=()=>{var e=R.visiblePanel;e&&_()},le=e=>{U.value||R.visiblePanel||(R.triggerFocusPanel=!0,m(),setTimeout(()=>{R.triggerFocusPanel=!1},150)),n("focus",{},e)},ae=e=>{k(e),n("click",{},e)},ie=e=>{R.isActivated=!1,n("blur",{},e)},k=e=>{e=e.$event;e.preventDefault(),R.triggerFocusPanel?R.triggerFocusPanel=!1:(R.visiblePanel?b:m)()},ue=e=>{var{$event:e,row:t}=e,l=t[c.value];x(e,l,t),b()},z=e=>{var t,{$grid:e,$event:l,row:a}=e,i=r.value;let u=c.value;e&&(t=e.getCheckboxRecords(),i.reserve&&t.push(...e.getCheckboxReserveRecords()),i=t.map(e=>e[u]),x(l,i,a))},ne=e=>{z(e)};Object.assign(q,t,{});return(0,_vue.watch)(()=>C.options,()=>{g()}),(0,_vue.watch)(()=>C.columns,e=>{f(e)}),(0,_vue.watch)(()=>C.modelValue,e=>{p(e)}),f(C.columns),g(),(0,_vue.onMounted)(()=>{var e=C.gridConfig;e&&e.proxyConfig&&!1!==e.proxyConfig.autoLoad&&(R.initialized=!0),_ui.globalEvents.on(q,"mousedown",J),_ui.globalEvents.on(q,"blur",Q),_ui.globalEvents.on(q,"resize",ee),_ui.globalEvents.on(q,"scroll",te)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(q,"mousedown"),_ui.globalEvents.off(q,"blur"),_ui.globalEvents.off(q,"resize"),_ui.globalEvents.off(q,"scroll"),_xeUtils.default.assign(R,createReactData()),_xeUtils.default.assign(s,createInternalData())}),(0,_vue.nextTick)(()=>{T||errLog("vxe.error.reqComp",["vxe-grid"])}),(0,_vue.provide)("$xeTableSelect",q),q.renderVN=()=>{var{className:e,options:t,loading:l}=C,{initialized:a,isActivated:i,isAniVisible:u,visiblePanel:n,tableColumns:r}=R,o=V.value,s=U.value,v=M.value,c=O.value,d=N.value,p=j.value,f=B.value,g=P.value,_=K.value,m=p.appendTo,b=y.header,x=y.footer;let h=y.prefix;p=p.className;return d?(0,_vue.h)("div",{ref:E,class:["vxe-table-select--readonly",e]},[(0,_vue.h)("span",{class:"vxe-table-select-label"},v)]):(0,_vue.h)("div",{ref:E,class:["vxe-table-select",e?_xeUtils.default.isFunction(e)?e({$tableSelect:q}):e:"",{["size--"+o]:o,"is--visible":n,"is--disabled":s,"is--loading":l,"is--active":i}]},[(0,_vue.h)(_input.default,{ref:I,clearable:C.clearable,placeholder:l?(0,_ui.getI18n)("vxe.select.loadingText"):C.placeholder,editable:!1,disabled:s,type:"text",prefixIcon:C.prefixIcon,suffixIcon:l?(0,_ui.getIcon)().TABLE_SELECT_LOADED:n?(0,_ui.getIcon)().TABLE_SELECT_OPEN:(0,_ui.getIcon)().TABLE_SELECT_CLOSE,modelValue:l?"":v,onClear:H,onClick:ae,onFocus:le,onBlur:ie,onSuffixClick:k},h?{prefix:()=>h({})}:{}),(0,_vue.h)(_vue.Teleport,{to:(0,_dom.getPopupContainer)(m),disabled:!c||!a},[(0,_vue.h)("div",{ref:w,class:["vxe-table--ignore-clear vxe-table-select--panel",p?_xeUtils.default.isFunction(p)?p({$tableSelect:q}):p:"",{["size--"+o]:o,"is--transfer":c,"ani--leave":!l&&u,"ani--enter":!l&&n}],placement:R.panelPlacement,style:R.panelStyle},a?[(0,_vue.h)("div",{class:"vxe-table-select--panel-wrapper"},[b?(0,_vue.h)("div",{class:"vxe-table-select--panel-header"},b({})):(0,_ui.renderEmptyElement)(q),(0,_vue.h)("div",{class:"vxe-table-select--panel-body"},[(0,_vue.h)("div",{ref:D,class:"vxe-table-select-grid--wrapper",style:_},[T?(0,_vue.h)(T,Object.assign(Object.assign(Object.assign({},f),A),{class:"vxe-table-select--grid",ref:S,rowConfig:g,data:t,columns:r.length?r:f.columns,height:"100%",autoResize:!0,onRadioChange:ue,onCheckboxChange:z,onCheckboxAll:ne}),Object.assign({},y,{header:void 0,footer:void 0,prefixSlot:void 0})):(0,_ui.renderEmptyElement)(q)])]),x?(0,_vue.h)("div",{class:"vxe-table-select--panel-footer"},x({})):(0,_ui.renderEmptyElement)(q)])]:[])])])},q},render(){return this.renderVN()}});
|
package/lib/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
var _dynamics = require("../dynamics");
|
|
28
28
|
var _log = require("./src/log");
|
|
29
|
-
const version = exports.version = "4.20.
|
|
29
|
+
const version = exports.version = "4.20.15";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");let version=exports.version="4.20.13";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},divider:{},drawer:{minWidth:40,minHeight:40,position:"right",showHeader:!0,border:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"],popupConfig:{}},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{scrollbarConfig:{yConfig:{autoHide:!0}}},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,border:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,negative:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0},tooltipConfig:{minWidth:60,enterable:!0,enterDelay:0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},scrollbar:{autoResize:!0,xConfig:{},yConfig:{}},segmented:{},select:{emptyValue:null,multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0},actionConfig:{autoHideButton:!0}},splitterPanel:{},slider:{max:100,min:0,tooltipConfig:{enterDelay:0}},space:{},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tableTransfer:{},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0,defaultPlacement:"top"},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN_OPEN:iconPrefix+"arrow-down rotate180",BUTTON_DROPDOWN_CLOSE:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TEXTAREA_CLEAR:iconPrefix+"error-circle-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"});var _default=exports.default=_core.VxeUI;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");let version=exports.version="4.20.15";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},divider:{},drawer:{minWidth:40,minHeight:40,position:"right",showHeader:!0,border:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"],popupConfig:{}},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{scrollbarConfig:{yConfig:{autoHide:!0}}},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,border:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,negative:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0},tooltipConfig:{minWidth:60,enterable:!0,enterDelay:0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},scrollbar:{autoResize:!0,xConfig:{},yConfig:{}},segmented:{},select:{emptyValue:null,multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0},actionConfig:{autoHideButton:!0}},splitterPanel:{},slider:{max:100,min:0,tooltipConfig:{enterDelay:0}},space:{},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tableTransfer:{},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0,defaultPlacement:"top"},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN_OPEN:iconPrefix+"arrow-down rotate180",BUTTON_DROPDOWN_CLOSE:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TEXTAREA_CLEAR:iconPrefix+"error-circle-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -9,7 +9,7 @@ var _core = require("@vxe-ui/core");
|
|
|
9
9
|
const {
|
|
10
10
|
log
|
|
11
11
|
} = _core.VxeUI;
|
|
12
|
-
const uiVersion = `ui v${"4.20.
|
|
12
|
+
const uiVersion = `ui v${"4.20.15"}`;
|
|
13
13
|
function createComponentLog(name) {
|
|
14
14
|
const tableVersion = _core.VxeUI.tableVersion ? `table v${_core.VxeUI.tableVersion}` : '';
|
|
15
15
|
const ganttVersion = _core.VxeUI.ganttVersion ? `gantt v${_core.VxeUI.ganttVersion}` : '';
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,uiVersion="ui v4.20.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,uiVersion="ui v4.20.15";function createComponentLog(e){var r=_core.VxeUI.tableVersion?"table v"+_core.VxeUI.tableVersion:"",o=_core.VxeUI.ganttVersion?"gantt v"+_core.VxeUI.ganttVersion:"",n=_core.VxeUI.designVersion?"design v"+_core.VxeUI.designVersion:"",r=[uiVersion,r,o,n].filter(e=>e).join(" ");return{warnLog:log.create("warn",r+"] ["+e),errLog:log.create("error",r+"] ["+e)}}let warnLog=exports.warnLog=log.create("warn",uiVersion),errLog=exports.errLog=log.create("error",uiVersion);
|
package/package.json
CHANGED
|
@@ -773,6 +773,9 @@ export default defineVxeComponent({
|
|
|
773
773
|
}
|
|
774
774
|
if (!reactData.initialized) {
|
|
775
775
|
reactData.initialized = true
|
|
776
|
+
nextTick(() => {
|
|
777
|
+
bindScrollbarResize()
|
|
778
|
+
})
|
|
776
779
|
}
|
|
777
780
|
reactData.isActivated = true
|
|
778
781
|
reactData.isAniVisible = true
|
|
@@ -2112,7 +2115,6 @@ export default defineVxeComponent({
|
|
|
2112
2115
|
}
|
|
2113
2116
|
})
|
|
2114
2117
|
reLayoutFlag.value++
|
|
2115
|
-
bindScrollbarResize()
|
|
2116
2118
|
globalEvents.on($xeSelect, 'mousedown', handleGlobalMousedownEvent)
|
|
2117
2119
|
globalEvents.on($xeSelect, 'keydown', handleGlobalKeydownEvent)
|
|
2118
2120
|
globalEvents.on($xeSelect, 'blur', handleGlobalBlurEvent)
|
|
@@ -9,7 +9,7 @@ import { createComponentLog } from '../../ui/src/log'
|
|
|
9
9
|
import VxeInputComponent from '../../input/src/input'
|
|
10
10
|
|
|
11
11
|
import type { TableSelectReactData, VxeTableSelectEmits, VxeInputConstructor, TableSelectInternalData, VxeTableSelectPropTypes, VxeFormDefines, VxeModalConstructor, VxeModalMethods, VxeDrawerConstructor, VxeDrawerMethods, TableSelectMethods, TableSelectPrivateMethods, ValueOf, TableSelectPrivateRef, VxeTableSelectPrivateComputed, VxeTableSelectConstructor, VxeTableSelectPrivateMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeComponentStyleType } from '../../../types'
|
|
12
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
12
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTablePropTypes } from '../../../types/components/table'
|
|
13
13
|
import type { VxeGridInstance, VxeGridEvents, VxeGridPropTypes } from '../../../types/components/grid'
|
|
14
14
|
|
|
15
15
|
const { errLog } = createComponentLog('table-select')
|
|
@@ -172,11 +172,22 @@ export default defineVxeComponent({
|
|
|
172
172
|
return props.optionProps || {}
|
|
173
173
|
})
|
|
174
174
|
|
|
175
|
-
const
|
|
175
|
+
const computeCheckboxOpts = computed(() => {
|
|
176
|
+
const { multiple } = props
|
|
177
|
+
const gridOpts = computeGridOpts.value
|
|
178
|
+
return Object.assign({
|
|
179
|
+
reserve: multiple,
|
|
180
|
+
showReserveStatus: multiple
|
|
181
|
+
}, getConfig().table.checkboxConfig, gridOpts.checkboxConfig)
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
const computeRowOpts = computed<VxeTablePropTypes.RowConfig>(() => {
|
|
185
|
+
const { multiple } = props
|
|
176
186
|
const gridOpts = computeGridOpts.value
|
|
177
|
-
|
|
187
|
+
const valueField = computeValueField.value
|
|
188
|
+
return Object.assign({
|
|
178
189
|
isCurrent: true
|
|
179
|
-
})
|
|
190
|
+
}, multiple ? { keyField: valueField } : {}, getConfig().table.rowConfig, gridOpts.rowConfig)
|
|
180
191
|
})
|
|
181
192
|
|
|
182
193
|
const computeRowKeyField = computed(() => {
|
|
@@ -206,6 +217,7 @@ export default defineVxeComponent({
|
|
|
206
217
|
|
|
207
218
|
const computeSelectGridOpts = computed(() => {
|
|
208
219
|
const gridOpts = computeGridOpts.value
|
|
220
|
+
const checkboxOpts = computeCheckboxOpts.value
|
|
209
221
|
const { pagerConfig, proxyConfig } = gridOpts
|
|
210
222
|
if (proxyConfig) {
|
|
211
223
|
const proxyAjax = proxyConfig.ajax
|
|
@@ -231,10 +243,10 @@ export default defineVxeComponent({
|
|
|
231
243
|
}
|
|
232
244
|
})
|
|
233
245
|
}
|
|
234
|
-
return Object.assign({}, gridOpts, { proxyConfig: newProxyConfig })
|
|
246
|
+
return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts, proxyConfig: newProxyConfig })
|
|
235
247
|
}
|
|
236
248
|
}
|
|
237
|
-
return gridOpts
|
|
249
|
+
return Object.assign({}, gridOpts, { checkboxConfig: checkboxOpts })
|
|
238
250
|
})
|
|
239
251
|
|
|
240
252
|
const computeSelectLabel = computed(() => {
|
|
@@ -316,21 +328,38 @@ export default defineVxeComponent({
|
|
|
316
328
|
}
|
|
317
329
|
|
|
318
330
|
const getRowid = (option: any) => {
|
|
319
|
-
const
|
|
320
|
-
const rowid = option[
|
|
331
|
+
const rowKeyField = computeRowKeyField.value
|
|
332
|
+
const rowid = option[rowKeyField]
|
|
321
333
|
return rowid ? encodeURIComponent(rowid) : ''
|
|
322
334
|
}
|
|
323
335
|
|
|
324
336
|
const getRowsByValue = (modelValue: VxeTableSelectPropTypes.ModelValue) => {
|
|
325
337
|
const { fullRowMaps } = internalData
|
|
338
|
+
const checkboxOpts = computeCheckboxOpts.value
|
|
339
|
+
const rowKeyField = computeRowKeyField.value
|
|
340
|
+
const valueField = computeValueField.value
|
|
341
|
+
const labelField = computeLabelField.value
|
|
326
342
|
const rows: any[] = []
|
|
327
343
|
const vals = XEUtils.eqNull(modelValue) ? [] : (XEUtils.isArray(modelValue) ? modelValue : [modelValue])
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
rows.push(cacheItem
|
|
332
|
-
|
|
333
|
-
|
|
344
|
+
if (checkboxOpts.reserve) {
|
|
345
|
+
vals.forEach(val => {
|
|
346
|
+
const cacheItem = fullRowMaps[val]
|
|
347
|
+
rows.push(cacheItem
|
|
348
|
+
? cacheItem.item
|
|
349
|
+
: {
|
|
350
|
+
[rowKeyField]: val,
|
|
351
|
+
[valueField]: val,
|
|
352
|
+
[labelField]: val
|
|
353
|
+
})
|
|
354
|
+
})
|
|
355
|
+
} else {
|
|
356
|
+
vals.forEach(val => {
|
|
357
|
+
const cacheItem = fullRowMaps[val]
|
|
358
|
+
if (cacheItem) {
|
|
359
|
+
rows.push(cacheItem.item)
|
|
360
|
+
}
|
|
361
|
+
})
|
|
362
|
+
}
|
|
334
363
|
return rows
|
|
335
364
|
}
|
|
336
365
|
|
|
@@ -614,9 +643,13 @@ export default defineVxeComponent({
|
|
|
614
643
|
|
|
615
644
|
const checkboxChangeEvent: VxeGridEvents.CheckboxChange = (params) => {
|
|
616
645
|
const { $grid, $event, row } = params
|
|
646
|
+
const checkboxOpts = computeCheckboxOpts.value
|
|
617
647
|
const valueField = computeValueField.value
|
|
618
648
|
if ($grid) {
|
|
619
649
|
const checkboxRecords = $grid.getCheckboxRecords()
|
|
650
|
+
if (checkboxOpts.reserve) {
|
|
651
|
+
checkboxRecords.push(...$grid.getCheckboxReserveRecords())
|
|
652
|
+
}
|
|
620
653
|
const value = checkboxRecords.map(row => {
|
|
621
654
|
return row[valueField]
|
|
622
655
|
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|