vxe-pc-ui 4.9.36 → 4.9.37
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/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +27 -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 +41 -18
- package/lib/index.umd.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 +39 -16
- 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/table-select/src/table-select.ts +27 -12
- package/types/components/table-select.d.ts +7 -7
- /package/es/icon/{iconfont.1758801549529.ttf → iconfont.1758878505769.ttf} +0 -0
- /package/es/icon/{iconfont.1758801549529.woff → iconfont.1758878505769.woff} +0 -0
- /package/es/icon/{iconfont.1758801549529.woff2 → iconfont.1758878505769.woff2} +0 -0
- /package/es/{iconfont.1758801549529.ttf → iconfont.1758878505769.ttf} +0 -0
- /package/es/{iconfont.1758801549529.woff → iconfont.1758878505769.woff} +0 -0
- /package/es/{iconfont.1758801549529.woff2 → iconfont.1758878505769.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1758801549529.ttf → iconfont.1758878505769.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1758801549529.woff → iconfont.1758878505769.woff} +0 -0
- /package/lib/icon/style/{iconfont.1758801549529.woff2 → iconfont.1758878505769.woff2} +0 -0
- /package/lib/{iconfont.1758801549529.ttf → iconfont.1758878505769.ttf} +0 -0
- /package/lib/{iconfont.1758801549529.woff → iconfont.1758878505769.woff} +0 -0
- /package/lib/{iconfont.1758801549529.woff2 → iconfont.1758878505769.woff2} +0 -0
|
@@ -18,6 +18,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
function getRowUniqueId() {
|
|
19
19
|
return _xeUtils.default.uniqueId('row_');
|
|
20
20
|
}
|
|
21
|
+
function createInternalData() {
|
|
22
|
+
return {
|
|
23
|
+
// hpTimeout: undefined,
|
|
24
|
+
// vpTimeout: undefined,
|
|
25
|
+
fullRowMaps: {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
21
28
|
var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
22
29
|
name: 'VxeTableSelect',
|
|
23
30
|
props: {
|
|
@@ -81,7 +88,6 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
81
88
|
initialized: false,
|
|
82
89
|
tableColumns: [],
|
|
83
90
|
fullOptionList: [],
|
|
84
|
-
fullRowMaps: {},
|
|
85
91
|
panelIndex: 0,
|
|
86
92
|
panelStyle: {},
|
|
87
93
|
panelPlacement: null,
|
|
@@ -90,10 +96,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
90
96
|
isAniVisible: false,
|
|
91
97
|
isActivated: false
|
|
92
98
|
});
|
|
93
|
-
const internalData =
|
|
94
|
-
// hpTimeout: undefined,
|
|
95
|
-
// vpTimeout: undefined
|
|
96
|
-
};
|
|
99
|
+
const internalData = createInternalData();
|
|
97
100
|
const refMaps = {
|
|
98
101
|
refElem
|
|
99
102
|
};
|
|
@@ -168,6 +171,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
168
171
|
const computeSelectGridOpts = (0, _vue.computed)(() => {
|
|
169
172
|
const gridOpts = computeGridOpts.value;
|
|
170
173
|
const {
|
|
174
|
+
pagerConfig,
|
|
171
175
|
proxyConfig
|
|
172
176
|
} = gridOpts;
|
|
173
177
|
if (proxyConfig) {
|
|
@@ -180,13 +184,24 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
180
184
|
Object.assign(newProxyConfig.ajax, {
|
|
181
185
|
query(params, ...args) {
|
|
182
186
|
return Promise.resolve(ajaxMethods(params, ...args)).then(rest => {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
let tableData = [];
|
|
188
|
+
if (pagerConfig) {
|
|
189
|
+
const resultProp = resConfigs.result;
|
|
190
|
+
tableData = (_xeUtils.default.isFunction(resultProp) ? resultProp({
|
|
191
|
+
data: rest,
|
|
192
|
+
$table: null,
|
|
193
|
+
$grid: null,
|
|
194
|
+
$gantt: null
|
|
195
|
+
}) : _xeUtils.default.get(rest, resultProp || 'result')) || [];
|
|
196
|
+
} else {
|
|
197
|
+
const listProp = resConfigs.list;
|
|
198
|
+
tableData = (listProp ? _xeUtils.default.isFunction(listProp) ? listProp({
|
|
199
|
+
data: rest,
|
|
200
|
+
$table: null,
|
|
201
|
+
$grid: null,
|
|
202
|
+
$gantt: null
|
|
203
|
+
}) : _xeUtils.default.get(rest, listProp) : rest) || [];
|
|
204
|
+
}
|
|
190
205
|
cacheDataMap(tableData || []);
|
|
191
206
|
return rest;
|
|
192
207
|
});
|
|
@@ -206,10 +221,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
206
221
|
lazyOptions
|
|
207
222
|
} = props;
|
|
208
223
|
const {
|
|
209
|
-
|
|
224
|
+
fullOptionList
|
|
210
225
|
} = reactData;
|
|
226
|
+
const {
|
|
227
|
+
fullRowMaps
|
|
228
|
+
} = internalData;
|
|
211
229
|
const valueField = computeValueField.value;
|
|
212
230
|
const labelField = computeLabelField.value;
|
|
231
|
+
if (!fullOptionList) {
|
|
232
|
+
return '';
|
|
233
|
+
}
|
|
213
234
|
return (_xeUtils.default.isArray(modelValue) ? modelValue : [modelValue]).map(val => {
|
|
214
235
|
const cacheItem = fullRowMaps[val];
|
|
215
236
|
if (cacheItem) {
|
|
@@ -275,7 +296,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
275
296
|
const getRowsByValue = modelValue => {
|
|
276
297
|
const {
|
|
277
298
|
fullRowMaps
|
|
278
|
-
} =
|
|
299
|
+
} = internalData;
|
|
279
300
|
const rows = [];
|
|
280
301
|
const vals = _xeUtils.default.eqNull(modelValue) ? [] : _xeUtils.default.isArray(modelValue) ? modelValue : [modelValue];
|
|
281
302
|
vals.forEach(val => {
|
|
@@ -347,7 +368,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
347
368
|
const valueField = computeValueField.value;
|
|
348
369
|
const gridOpts = computeGridOpts.value;
|
|
349
370
|
const {
|
|
350
|
-
treeConfig
|
|
371
|
+
treeConfig,
|
|
372
|
+
pagerConfig
|
|
351
373
|
} = gridOpts;
|
|
352
374
|
const rowMaps = {};
|
|
353
375
|
const keyMaps = {};
|
|
@@ -377,7 +399,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
377
399
|
});
|
|
378
400
|
}
|
|
379
401
|
reactData.fullOptionList = dataList || options || [];
|
|
380
|
-
|
|
402
|
+
internalData.fullRowMaps = pagerConfig ? Object.assign({}, internalData.fullRowMaps, rowMaps) : rowMaps;
|
|
381
403
|
updateModel(props.modelValue);
|
|
382
404
|
};
|
|
383
405
|
const updateZindex = () => {
|
|
@@ -736,6 +758,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
736
758
|
_ui.globalEvents.off($xeTableSelect, 'mousedown');
|
|
737
759
|
_ui.globalEvents.off($xeTableSelect, 'blur');
|
|
738
760
|
_ui.globalEvents.off($xeTableSelect, 'resize');
|
|
761
|
+
_xeUtils.default.assign(internalData, createInternalData());
|
|
739
762
|
});
|
|
740
763
|
(0, _vue.nextTick)(() => {
|
|
741
764
|
if (!VxeTableGridComponent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";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}}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableSelect",props:{modelValue:[String,Number,Array],clearable:Boolean,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(h,e){const{emit:a,slots:C}=e,y=_ui.VxeUI.getComponent("vxe-grid"),l=(0,_vue.inject)("$xeModal",null),i=(0,_vue.inject)("$xeDrawer",null),V=(0,_vue.inject)("$xeTable",null),u=(0,_vue.inject)("$xeForm",null),n=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const $=(0,_ui.useSize)(h)["computeSize"],E=(0,_vue.ref)(),T=(0,_vue.ref)(),L=(0,_vue.ref)(),I=(0,_vue.ref)(),w=(0,_vue.ref)(),S=(0,_vue.reactive)({initialized:!1,tableColumns:[],fullOptionList:[],fullRowMaps:{},panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}),o={},k={refElem:E},N=(0,_vue.computed)(()=>{var e=h["readonly"];return null===e?!!u&&u.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=h["disabled"];return null===e?!!u&&u.props.disabled:e}),q=(0,_vue.computed)(()=>{var e=h["transfer"];if(null===e){var t=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(t))return t;if(V||l||i||u)return!0}return e}),r=(0,_vue.computed)(()=>h.optionProps||{}),O=(0,_vue.computed)(()=>{var e=c.value;return Object.assign({},e.rowConfig,{isCurrent:!0})}),s=(0,_vue.computed)(()=>{return O.value.keyField||"_X_ROW_KEY"}),F=(0,_vue.computed)(()=>{return r.value.label||"label"}),v=(0,_vue.computed)(()=>{return r.value.value||"value"}),U=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.popupConfig,h.popupConfig)),c=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.gridConfig,h.gridConfig,{data:void 0})),B=(0,_vue.computed)(()=>{var e=c.value,t=e["proxyConfig"];if(t){var l=t.ajax;if(l&&l.query){var i=_xeUtils.default.clone(t,!0);const a=l.query;if(a){const u=t.response||t.props||{};Object.assign(i.ajax,{query(e,...t){return Promise.resolve(a(e,...t)).then(e=>{var t=u.list,t=(t?_xeUtils.default.isFunction(t)?t({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,t):e)||[];return f(t||[]),e})}})}return Object.assign({},e,{proxyConfig:i})}}return e}),M=(0,_vue.computed)(()=>{const{modelValue:e,lazyOptions:l}=h,i=S["fullRowMaps"],a=v.value,u=F.value;return(_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=i[t];if(e)return e.item[u];if(l){e=l.find(e=>e[a]===t);if(e)return e[u]}return t}).join(", ")}),D=(0,_vue.computed)(()=>{var{height:e,width:t}=U.value,l={};return t&&(l.width=(0,_dom.toCssUnit)(t)),e&&(l.height=(0,_dom.toCssUnit)(e)),l}),K={},j={xID:t,props:h,context:e,reactData:S,getRefMaps:()=>k,getComputeMaps:()=>K};const A={},d=(["form-submit","form-reset","form-collapse","page-change"].forEach(t=>{A[(0,_vn.getOnName)(_xeUtils.default.camelCase(t))]=e=>{d(t,e,e.$event)}}),(e,t,l)=>{a(e,(0,_ui.createEvent)(l,{$tableSelect:j},t))});t={dispatchEvent:d};const Z=e=>{const 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=>{const i=h["multiple"];(0,_vue.nextTick)(()=>{var e,t=w.value;t&&(e=Z(l)).length&&(i?t.setCheckboxRow(e,!0):t.setRadioRow(e[0]))})},g=e=>{if(e&&e.length){var i=h["multiple"];const a=[];let t=!1,l=!1;e.forEach(e=>{t||"radio"!==e.type?l||"checkbox"!==e.type||(l=!0):t=!0,a.push(e)}),i?l||a.unshift({type:"checkbox",width:70}):t||a.unshift({type:"radio",width:70}),S.tableColumns=a}},f=e=>{var t=h["options"];const u=s.value,n=v.value;var l=c.value["treeConfig"];const o={},r={};l||_xeUtils.default.arrayEach(e||t||[],(e,t,l)=>{let i=(e=>{e=e[s.value];return e?encodeURIComponent(e):""})(e);i=i||getRowUniqueId(),r[i]&&(0,_log.errLog)("vxe.error.repeatKey",["[table-select] "+u,i]),r[i]=!0;var a=e[n];o[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[table-select] "+n,a]),o[a]={item:e,index:t,items:l,parent:null,nodes:[]}}),S.fullOptionList=e||t||[],S.fullRowMaps=o,p(h.modelValue)},_=()=>{const l=h["placement"],i=S["panelIndex"],a=E.value,u=I.value,n=q.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(a,u,{placement:l,teleportTo:n}),t=Object.assign(e.style,{zIndex:i});S.panelStyle=t,S.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},m=()=>{var e=h["loading"],t=P.value;e||t||(o.vpTimeout&&clearTimeout(o.vpTimeout),o.hpTimeout&&clearTimeout(o.hpTimeout),S.initialized||(S.initialized=!0),S.isActivated=!0,S.isAniVisible=!0,o.vpTimeout=setTimeout(()=>{S.visiblePanel=!0,p(h.modelValue),o.vpTimeout=void 0},10),(e=h.zIndex)?S.panelIndex=e:S.panelIndex<(0,_utils.getLastZIndex)()&&(S.panelIndex=(0,_utils.nextZIndex)()),_())},b=()=>{S.visiblePanel=!1,o.vpTimeout&&clearTimeout(o.vpTimeout),o.hpTimeout&&clearTimeout(o.hpTimeout),o.hpTimeout=setTimeout(()=>{S.isAniVisible=!1,o.hpTimeout=void 0},350)},x=(e,t,l)=>{var i;i=t,a("update:modelValue",i),t!==h.modelValue&&(d("change",{value:t,row:l,option:l},e),u)&&n&&u.triggerItemEvent(e,n.itemConfig.field,t)},W=(e,t)=>{x(e,t,null),d("clear",{value:t},e)},X=(e,t)=>{W(t,null),b()},Y=e=>{var t=S["visiblePanel"];P.value||t&&(t=I.value,((0,_dom.getEventTargetNode)(e,t).flag?_:b)())},G=e=>{var t,l,i=S["visiblePanel"];P.value||(t=E.value,l=I.value,S.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,i&&!S.isActivated&&b())},H=()=>{var{visiblePanel:e,isActivated:t}=S;e&&b(),t&&(S.isActivated=!1),(e||t)&&(e=T.value)&&e.blur()},J=()=>{var e=S["visiblePanel"];e&&_()},Q=e=>{P.value||S.visiblePanel||(S.triggerFocusPanel=!0,m(),setTimeout(()=>{S.triggerFocusPanel=!1},150)),d("focus",{},e)},ee=e=>{z(e),d("click",{},e)},te=e=>{S.isActivated=!1,d("blur",{},e)},z=e=>{e=e.$event;e.preventDefault(),S.triggerFocusPanel?S.triggerFocusPanel=!1:(S.visiblePanel?b:m)()},le=e=>{var{$event:e,row:t}=e,l=t[v.value];x(e,l,t),b()},R=e=>{var{$grid:e,$event:t,row:l}=e;const i=v.value;e&&(e=e.getCheckboxRecords().map(e=>e[i]),x(t,e,l))},ie=e=>{R(e)};Object.assign(j,t,{});return(0,_vue.watch)(()=>h.options,()=>{f()}),(0,_vue.watch)(()=>h.columns,e=>{g(e)}),(0,_vue.watch)(()=>h.modelValue,e=>{p(e)}),g(h.columns),f(),(0,_vue.onMounted)(()=>{var e=h["gridConfig"];e&&e.proxyConfig&&!1!==e.proxyConfig.autoLoad&&(S.initialized=!0),_ui.globalEvents.on(j,"mousewheel",Y),_ui.globalEvents.on(j,"mousedown",G),_ui.globalEvents.on(j,"blur",H),_ui.globalEvents.on(j,"resize",J)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(j,"mousewheel"),_ui.globalEvents.off(j,"mousedown"),_ui.globalEvents.off(j,"blur"),_ui.globalEvents.off(j,"resize")}),(0,_vue.nextTick)(()=>{y||(0,_log.errLog)("vxe.error.reqComp",["[table-select] vxe-grid"])}),(0,_vue.provide)("$xeTableSelect",j),j.renderVN=()=>{var{className:e,options:t,loading:l}=h,{initialized:i,isActivated:a,isAniVisible:u,visiblePanel:n,tableColumns:o}=S,r=$.value,s=P.value,v=M.value,c=q.value,d=N.value,p=U.value["className"],g=B.value,f=O.value,_=D.value,m=C.header,b=C.footer;const x=C.prefix;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:j}):e:"",{["size--"+r]:r,"is--visible":n,"is--disabled":s,"is--loading":l,"is--active":a}]},[(0,_vue.h)(_input.default,{ref:T,clearable:h.clearable,placeholder:l?(0,_ui.getI18n)("vxe.select.loadingText"):h.placeholder,readonly:!0,disabled:s,type:"text",prefixIcon:h.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:X,onClick:ee,onFocus:Q,onBlur:te,onSuffixClick:z},x?{prefix:()=>x({})}:{}),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!c||!i},[(0,_vue.h)("div",{ref:I,class:["vxe-table--ignore-clear vxe-table-select--panel",p?_xeUtils.default.isFunction(p)?p({$tableSelect:j}):p:"",{["size--"+r]:r,"is--transfer":c,"ani--leave":!l&&u,"ani--enter":!l&&n}],placement:S.panelPlacement,style:S.panelStyle},i?[(0,_vue.h)("div",{class:"vxe-table-select--panel-wrapper"},[m?(0,_vue.h)("div",{class:"vxe-table-select--panel-header"},m({})):(0,_ui.renderEmptyElement)(j),(0,_vue.h)("div",{class:"vxe-table-select--panel-body"},[(0,_vue.h)("div",{ref:L,class:"vxe-table-select-grid--wrapper",style:_},[y?(0,_vue.h)(y,Object.assign(Object.assign(Object.assign({},g),A),{class:"vxe-table-select--grid",ref:w,rowConfig:f,data:t,columns:o.length?o:g.columns,height:"100%",autoResize:!0,onRadioChange:le,onCheckboxChange:R,onCheckboxAll:ie}),Object.assign({},C,{header:void 0,footer:void 0,prefixSlot:void 0})):(0,_ui.renderEmptyElement)(j)])]),b?(0,_vue.h)("div",{class:"vxe-table-select--panel-footer"},b({})):(0,_ui.renderEmptyElement)(j)])]:[])])])},j},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";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}}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function createInternalData(){return{fullRowMaps:{}}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableSelect",props:{modelValue:[String,Number,Array],clearable:Boolean,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(h,e){const{emit:i,slots:C}=e,y=_ui.VxeUI.getComponent("vxe-grid"),l=(0,_vue.inject)("$xeModal",null),a=(0,_vue.inject)("$xeDrawer",null),$=(0,_vue.inject)("$xeTable",null),n=(0,_vue.inject)("$xeForm",null),u=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const V=(0,_ui.useSize)(h)["computeSize"],E=(0,_vue.ref)(),T=(0,_vue.ref)(),L=(0,_vue.ref)(),I=(0,_vue.ref)(),w=(0,_vue.ref)(),S=(0,_vue.reactive)({initialized:!1,tableColumns:[],fullOptionList:[],panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}),s=createInternalData(),k={refElem:E},F=(0,_vue.computed)(()=>{var e=h["readonly"];return null===e?!!n&&n.props.readonly:e}),U=(0,_vue.computed)(()=>{var e=h["disabled"];return null===e?!!n&&n.props.disabled:e}),O=(0,_vue.computed)(()=>{var e=h["transfer"];if(null===e){var t=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(t))return t;if($||l||a||n)return!0}return e}),o=(0,_vue.computed)(()=>h.optionProps||{}),P=(0,_vue.computed)(()=>{var e=d.value;return Object.assign({},e.rowConfig,{isCurrent:!0})}),v=(0,_vue.computed)(()=>{return P.value.keyField||"_X_ROW_KEY"}),N=(0,_vue.computed)(()=>{return o.value.label||"label"}),c=(0,_vue.computed)(()=>{return o.value.value||"value"}),j=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.popupConfig,h.popupConfig)),d=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tableSelect.gridConfig,h.gridConfig,{data:void 0})),D=(0,_vue.computed)(()=>{var e=d.value;const{pagerConfig:a,proxyConfig:t}=e;if(t){var l=t.ajax;if(l&&l.query){var i=_xeUtils.default.clone(t,!0);const n=l.query;if(n){const u=t.response||t.props||{};Object.assign(i.ajax,{query(e,...t){return Promise.resolve(n(e,...t)).then(e=>{let t=[];var l;return t=a?(l=u.result,(_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l||"result"))||[]):((l=u.list)?_xeUtils.default.isFunction(l)?l({data:e,$table:null,$grid:null,$gantt:null}):_xeUtils.default.get(e,l):e)||[],f(t||[]),e})}})}return Object.assign({},e,{proxyConfig:i})}}return e}),B=(0,_vue.computed)(()=>{const{modelValue:e,lazyOptions:l}=h;var t=S["fullOptionList"];const a=s["fullRowMaps"],i=c.value,n=N.value;return t?(_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=a[t];if(e)return e.item[n];if(l){e=l.find(e=>e[i]===t);if(e)return e[n]}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:h,context:e,reactData:S,getRefMaps:()=>k,getComputeMaps:()=>K};const A={},r=(["form-submit","form-reset","form-collapse","page-change"].forEach(t=>{A[(0,_vn.getOnName)(_xeUtils.default.camelCase(t))]=e=>{r(t,e,e.$event)}}),(e,t,l)=>{i(e,(0,_ui.createEvent)(l,{$tableSelect:q},t))});t={dispatchEvent:r};const Z=e=>{const 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=>{const a=h["multiple"];(0,_vue.nextTick)(()=>{var e,t=w.value;t&&(e=Z(l)).length&&(a?t.setCheckboxRow(e,!0):t.setRadioRow(e[0]))})},g=e=>{if(e&&e.length){var a=h["multiple"];const i=[];let t=!1,l=!1;e.forEach(e=>{t||"radio"!==e.type?l||"checkbox"!==e.type||(l=!0):t=!0,i.push(e)}),a?l||i.unshift({type:"checkbox",width:70}):t||i.unshift({type:"radio",width:70}),S.tableColumns=i}},f=e=>{var t=h["options"];const n=v.value,u=c.value;var{treeConfig:l,pagerConfig:a}=d.value;const o={},r={};l||_xeUtils.default.arrayEach(e||t||[],(e,t,l)=>{let a=(e=>{e=e[v.value];return e?encodeURIComponent(e):""})(e);a=a||getRowUniqueId(),r[a]&&(0,_log.errLog)("vxe.error.repeatKey",["[table-select] "+n,a]),r[a]=!0;var i=e[u];o[i]&&(0,_log.errLog)("vxe.error.repeatKey",["[table-select] "+u,i]),o[i]={item:e,index:t,items:l,parent:null,nodes:[]}}),S.fullOptionList=e||t||[],s.fullRowMaps=a?Object.assign({},s.fullRowMaps,o):o,p(h.modelValue)},_=()=>{const l=h["placement"],a=S["panelIndex"],i=E.value,n=I.value,u=O.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(i,n,{placement:l,teleportTo:u}),t=Object.assign(e.style,{zIndex:a});S.panelStyle=t,S.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},m=()=>{var e=h["loading"],t=U.value;e||t||(s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),S.initialized||(S.initialized=!0),S.isActivated=!0,S.isAniVisible=!0,s.vpTimeout=setTimeout(()=>{S.visiblePanel=!0,p(h.modelValue),s.vpTimeout=void 0},10),(e=h.zIndex)?S.panelIndex=e:S.panelIndex<(0,_utils.getLastZIndex)()&&(S.panelIndex=(0,_utils.nextZIndex)()),_())},b=()=>{S.visiblePanel=!1,s.vpTimeout&&clearTimeout(s.vpTimeout),s.hpTimeout&&clearTimeout(s.hpTimeout),s.hpTimeout=setTimeout(()=>{S.isAniVisible=!1,s.hpTimeout=void 0},350)},x=(e,t,l)=>{var a;a=t,i("update:modelValue",a),t!==h.modelValue&&(r("change",{value:t,row:l,option:l},e),n)&&u&&n.triggerItemEvent(e,u.itemConfig.field,t)},W=(e,t)=>{x(e,t,null),r("clear",{value:t},e)},X=(e,t)=>{W(t,null),b()},Y=e=>{var t=S["visiblePanel"];U.value||t&&(t=I.value,((0,_dom.getEventTargetNode)(e,t).flag?_:b)())},G=e=>{var t,l,a=S["visiblePanel"];U.value||(t=E.value,l=I.value,S.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,a&&!S.isActivated&&b())},H=()=>{var{visiblePanel:e,isActivated:t}=S;e&&b(),t&&(S.isActivated=!1),(e||t)&&(e=T.value)&&e.blur()},J=()=>{var e=S["visiblePanel"];e&&_()},Q=e=>{U.value||S.visiblePanel||(S.triggerFocusPanel=!0,m(),setTimeout(()=>{S.triggerFocusPanel=!1},150)),r("focus",{},e)},ee=e=>{R(e),r("click",{},e)},te=e=>{S.isActivated=!1,r("blur",{},e)},R=e=>{e=e.$event;e.preventDefault(),S.triggerFocusPanel?S.triggerFocusPanel=!1:(S.visiblePanel?b:m)()},le=e=>{var{$event:e,row:t}=e,l=t[c.value];x(e,l,t),b()},z=e=>{var{$grid:e,$event:t,row:l}=e;const a=c.value;e&&(e=e.getCheckboxRecords().map(e=>e[a]),x(t,e,l))},ae=e=>{z(e)};Object.assign(q,t,{});return(0,_vue.watch)(()=>h.options,()=>{f()}),(0,_vue.watch)(()=>h.columns,e=>{g(e)}),(0,_vue.watch)(()=>h.modelValue,e=>{p(e)}),g(h.columns),f(),(0,_vue.onMounted)(()=>{var e=h["gridConfig"];e&&e.proxyConfig&&!1!==e.proxyConfig.autoLoad&&(S.initialized=!0),_ui.globalEvents.on(q,"mousewheel",Y),_ui.globalEvents.on(q,"mousedown",G),_ui.globalEvents.on(q,"blur",H),_ui.globalEvents.on(q,"resize",J)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(q,"mousewheel"),_ui.globalEvents.off(q,"mousedown"),_ui.globalEvents.off(q,"blur"),_ui.globalEvents.off(q,"resize"),_xeUtils.default.assign(s,createInternalData())}),(0,_vue.nextTick)(()=>{y||(0,_log.errLog)("vxe.error.reqComp",["[table-select] vxe-grid"])}),(0,_vue.provide)("$xeTableSelect",q),q.renderVN=()=>{var{className:e,options:t,loading:l}=h,{initialized:a,isActivated:i,isAniVisible:n,visiblePanel:u,tableColumns:o}=S,r=V.value,s=U.value,v=B.value,c=O.value,d=F.value,p=j.value["className"],g=D.value,f=P.value,_=M.value,m=C.header,b=C.footer;const x=C.prefix;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--"+r]:r,"is--visible":u,"is--disabled":s,"is--loading":l,"is--active":i}]},[(0,_vue.h)(_input.default,{ref:T,clearable:h.clearable,placeholder:l?(0,_ui.getI18n)("vxe.select.loadingText"):h.placeholder,readonly:!0,disabled:s,type:"text",prefixIcon:h.prefixIcon,suffixIcon:l?(0,_ui.getIcon)().TABLE_SELECT_LOADED:u?(0,_ui.getIcon)().TABLE_SELECT_OPEN:(0,_ui.getIcon)().TABLE_SELECT_CLOSE,modelValue:l?"":v,onClear:X,onClick:ee,onFocus:Q,onBlur:te,onSuffixClick:R},x?{prefix:()=>x({})}:{}),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!c||!a},[(0,_vue.h)("div",{ref:I,class:["vxe-table--ignore-clear vxe-table-select--panel",p?_xeUtils.default.isFunction(p)?p({$tableSelect:q}):p:"",{["size--"+r]:r,"is--transfer":c,"ani--leave":!l&&n,"ani--enter":!l&&u}],placement:S.panelPlacement,style:S.panelStyle},a?[(0,_vue.h)("div",{class:"vxe-table-select--panel-wrapper"},[m?(0,_vue.h)("div",{class:"vxe-table-select--panel-header"},m({})):(0,_ui.renderEmptyElement)(q),(0,_vue.h)("div",{class:"vxe-table-select--panel-body"},[(0,_vue.h)("div",{ref:L,class:"vxe-table-select-grid--wrapper",style:_},[y?(0,_vue.h)(y,Object.assign(Object.assign(Object.assign({},g),A),{class:"vxe-table-select--grid",ref:w,rowConfig:f,data:t,columns:o.length?o:g.columns,height:"100%",autoResize:!0,onRadioChange:le,onCheckboxChange:z,onCheckboxAll:ae}),Object.assign({},C,{header:void 0,footer:void 0,prefixSlot:void 0})):(0,_ui.renderEmptyElement)(q)])]),b?(0,_vue.h)("div",{class:"vxe-table-select--panel-footer"},b({})):(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.9.
|
|
29
|
+
const version = exports.version = "4.9.37";
|
|
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
|
-
"use strict";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");const version=exports.version="4.9.36";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:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!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:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},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:{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},drawer:{position:"right",showHeader:!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"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!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,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!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:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,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},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",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",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_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",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"});var _default=exports.default=_core.VxeUI;
|
|
1
|
+
"use strict";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");const version=exports.version="4.9.37";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:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!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:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},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:{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},drawer:{position:"right",showHeader:!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"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!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,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!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:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,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},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",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",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_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",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"});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
|
-
const version = `ui v${"4.9.
|
|
8
|
+
const version = `ui v${"4.9.37"}`;
|
|
9
9
|
const warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
const errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.9.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.9.37",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -16,6 +16,14 @@ export function getRowUniqueId () {
|
|
|
16
16
|
return XEUtils.uniqueId('row_')
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
function createInternalData (): TableSelectInternalData {
|
|
20
|
+
return {
|
|
21
|
+
// hpTimeout: undefined,
|
|
22
|
+
// vpTimeout: undefined,
|
|
23
|
+
fullRowMaps: {}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
export default defineVxeComponent({
|
|
20
28
|
name: 'VxeTableSelect',
|
|
21
29
|
props: {
|
|
@@ -92,7 +100,6 @@ export default defineVxeComponent({
|
|
|
92
100
|
initialized: false,
|
|
93
101
|
tableColumns: [],
|
|
94
102
|
fullOptionList: [],
|
|
95
|
-
fullRowMaps: {},
|
|
96
103
|
panelIndex: 0,
|
|
97
104
|
panelStyle: {},
|
|
98
105
|
panelPlacement: null,
|
|
@@ -102,10 +109,7 @@ export default defineVxeComponent({
|
|
|
102
109
|
isActivated: false
|
|
103
110
|
})
|
|
104
111
|
|
|
105
|
-
const internalData: TableSelectInternalData =
|
|
106
|
-
// hpTimeout: undefined,
|
|
107
|
-
// vpTimeout: undefined
|
|
108
|
-
}
|
|
112
|
+
const internalData: TableSelectInternalData = createInternalData()
|
|
109
113
|
|
|
110
114
|
const refMaps: TableSelectPrivateRef = {
|
|
111
115
|
refElem
|
|
@@ -185,7 +189,7 @@ export default defineVxeComponent({
|
|
|
185
189
|
|
|
186
190
|
const computeSelectGridOpts = computed(() => {
|
|
187
191
|
const gridOpts = computeGridOpts.value
|
|
188
|
-
const { proxyConfig } = gridOpts
|
|
192
|
+
const { pagerConfig, proxyConfig } = gridOpts
|
|
189
193
|
if (proxyConfig) {
|
|
190
194
|
const proxyAjax = proxyConfig.ajax
|
|
191
195
|
if (proxyAjax && proxyAjax.query) {
|
|
@@ -196,8 +200,14 @@ export default defineVxeComponent({
|
|
|
196
200
|
Object.assign(newProxyConfig.ajax, {
|
|
197
201
|
query (params: VxeGridPropTypes.ProxyAjaxQueryParams, ...args: any[]) {
|
|
198
202
|
return Promise.resolve(ajaxMethods(params, ...args)).then(rest => {
|
|
199
|
-
|
|
200
|
-
|
|
203
|
+
let tableData = []
|
|
204
|
+
if (pagerConfig) {
|
|
205
|
+
const resultProp = resConfigs.result
|
|
206
|
+
tableData = (XEUtils.isFunction(resultProp) ? resultProp({ data: rest, $table: null as any, $grid: null, $gantt: null }) : XEUtils.get(rest, resultProp || 'result')) || []
|
|
207
|
+
} else {
|
|
208
|
+
const listProp = resConfigs.list
|
|
209
|
+
tableData = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $table: null as any, $grid: null, $gantt: null }) : XEUtils.get(rest, listProp)) : rest) || []
|
|
210
|
+
}
|
|
201
211
|
cacheDataMap(tableData || [])
|
|
202
212
|
return rest
|
|
203
213
|
})
|
|
@@ -212,9 +222,13 @@ export default defineVxeComponent({
|
|
|
212
222
|
|
|
213
223
|
const computeSelectLabel = computed(() => {
|
|
214
224
|
const { modelValue, lazyOptions } = props
|
|
215
|
-
const {
|
|
225
|
+
const { fullOptionList } = reactData
|
|
226
|
+
const { fullRowMaps } = internalData
|
|
216
227
|
const valueField = computeValueField.value
|
|
217
228
|
const labelField = computeLabelField.value
|
|
229
|
+
if (!fullOptionList) {
|
|
230
|
+
return ''
|
|
231
|
+
}
|
|
218
232
|
return (XEUtils.isArray(modelValue) ? modelValue : [modelValue]).map(val => {
|
|
219
233
|
const cacheItem = fullRowMaps[val]
|
|
220
234
|
if (cacheItem) {
|
|
@@ -291,7 +305,7 @@ export default defineVxeComponent({
|
|
|
291
305
|
}
|
|
292
306
|
|
|
293
307
|
const getRowsByValue = (modelValue: VxeTableSelectPropTypes.ModelValue) => {
|
|
294
|
-
const { fullRowMaps } =
|
|
308
|
+
const { fullRowMaps } = internalData
|
|
295
309
|
const rows: any[] = []
|
|
296
310
|
const vals = XEUtils.eqNull(modelValue) ? [] : (XEUtils.isArray(modelValue) ? modelValue : [modelValue])
|
|
297
311
|
vals.forEach(val => {
|
|
@@ -359,7 +373,7 @@ export default defineVxeComponent({
|
|
|
359
373
|
const rowKeyField = computeRowKeyField.value
|
|
360
374
|
const valueField = computeValueField.value
|
|
361
375
|
const gridOpts = computeGridOpts.value
|
|
362
|
-
const { treeConfig } = gridOpts
|
|
376
|
+
const { treeConfig, pagerConfig } = gridOpts
|
|
363
377
|
const rowMaps: Record<string, {
|
|
364
378
|
item: any
|
|
365
379
|
index: number
|
|
@@ -388,7 +402,7 @@ export default defineVxeComponent({
|
|
|
388
402
|
})
|
|
389
403
|
}
|
|
390
404
|
reactData.fullOptionList = dataList || options || []
|
|
391
|
-
|
|
405
|
+
internalData.fullRowMaps = pagerConfig ? Object.assign({}, internalData.fullRowMaps, rowMaps) : rowMaps
|
|
392
406
|
updateModel(props.modelValue)
|
|
393
407
|
}
|
|
394
408
|
|
|
@@ -753,6 +767,7 @@ export default defineVxeComponent({
|
|
|
753
767
|
globalEvents.off($xeTableSelect, 'mousedown')
|
|
754
768
|
globalEvents.off($xeTableSelect, 'blur')
|
|
755
769
|
globalEvents.off($xeTableSelect, 'resize')
|
|
770
|
+
XEUtils.assign(internalData, createInternalData())
|
|
756
771
|
})
|
|
757
772
|
|
|
758
773
|
nextTick(() => {
|
|
@@ -84,13 +84,6 @@ export interface TableSelectReactData {
|
|
|
84
84
|
initialized: boolean
|
|
85
85
|
tableColumns: VxeGridPropTypes.Columns
|
|
86
86
|
fullOptionList: any[]
|
|
87
|
-
fullRowMaps: Record<string, {
|
|
88
|
-
item: any
|
|
89
|
-
index: number
|
|
90
|
-
items: any[]
|
|
91
|
-
parent: any
|
|
92
|
-
nodes: any[]
|
|
93
|
-
}>
|
|
94
87
|
panelIndex: number
|
|
95
88
|
panelStyle: any
|
|
96
89
|
panelPlacement: any
|
|
@@ -100,6 +93,13 @@ export interface TableSelectReactData {
|
|
|
100
93
|
isActivated: boolean
|
|
101
94
|
}
|
|
102
95
|
export interface TableSelectInternalData {
|
|
96
|
+
fullRowMaps: Record<string, {
|
|
97
|
+
item: any
|
|
98
|
+
index: number
|
|
99
|
+
items: any[]
|
|
100
|
+
parent: any
|
|
101
|
+
nodes: any[]
|
|
102
|
+
}>
|
|
103
103
|
hpTimeout?: undefined | number
|
|
104
104
|
vpTimeout?: undefined | number
|
|
105
105
|
}
|
|
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
|