vxe-pc-ui 4.18.9 → 4.18.10
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 +41 -23
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/form/src/form.js +37 -21
- package/es/icon/style.css +1 -1
- package/es/pager/src/pager.js +2 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/form/src/form.js +48 -26
- package/lib/form/src/form.min.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 +52 -28
- package/lib/index.umd.min.js +1 -1
- package/lib/pager/src/pager.js +2 -0
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +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/form/src/form.ts +41 -23
- package/packages/pager/src/pager.ts +2 -0
- package/types/components/form.d.ts +12 -4
- package/types/components/grid.d.ts +18 -1
- /package/es/icon/{iconfont.1788956895944.ttf → iconfont.1789116840198.ttf} +0 -0
- /package/es/icon/{iconfont.1788956895944.woff → iconfont.1789116840198.woff} +0 -0
- /package/es/icon/{iconfont.1788956895944.woff2 → iconfont.1789116840198.woff2} +0 -0
- /package/es/{iconfont.1788956895944.ttf → iconfont.1789116840198.ttf} +0 -0
- /package/es/{iconfont.1788956895944.woff → iconfont.1789116840198.woff} +0 -0
- /package/es/{iconfont.1788956895944.woff2 → iconfont.1789116840198.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1788956895944.ttf → iconfont.1789116840198.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1788956895944.woff → iconfont.1789116840198.woff} +0 -0
- /package/lib/icon/style/{iconfont.1788956895944.woff2 → iconfont.1789116840198.woff2} +0 -0
- /package/lib/{iconfont.1788956895944.ttf → iconfont.1789116840198.ttf} +0 -0
- /package/lib/{iconfont.1788956895944.woff → iconfont.1789116840198.woff} +0 -0
- /package/lib/{iconfont.1788956895944.woff2 → iconfont.1789116840198.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -101,7 +101,7 @@ function checkDynamic() {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const { log } = VxeUI;
|
|
104
|
-
const uiVersion = `ui v${"4.18.
|
|
104
|
+
const uiVersion = `ui v${"4.18.10"}`;
|
|
105
105
|
function createComponentLog(name) {
|
|
106
106
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
107
107
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -115,7 +115,7 @@ function createComponentLog(name) {
|
|
|
115
115
|
const warnLog$i = log.create('warn', uiVersion);
|
|
116
116
|
log.create('error', uiVersion);
|
|
117
117
|
|
|
118
|
-
const version = "4.18.
|
|
118
|
+
const version = "4.18.10";
|
|
119
119
|
VxeUI.uiVersion = version;
|
|
120
120
|
VxeUI.dynamicApp = dynamicApp;
|
|
121
121
|
function config(options) {
|
|
@@ -25954,6 +25954,7 @@ function createInternalData$e() {
|
|
|
25954
25954
|
visible: false
|
|
25955
25955
|
},
|
|
25956
25956
|
itemFormatCache: {},
|
|
25957
|
+
fullItemList: [],
|
|
25957
25958
|
fullItemIdData: {},
|
|
25958
25959
|
fullItemFieldData: {}
|
|
25959
25960
|
};
|
|
@@ -26058,7 +26059,6 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26058
26059
|
const internalData = createInternalData$e();
|
|
26059
26060
|
const refElem = ref();
|
|
26060
26061
|
const refTooltip = ref();
|
|
26061
|
-
let formMethods = {};
|
|
26062
26062
|
const computeValidOpts = computed(() => {
|
|
26063
26063
|
return Object.assign({}, getConfig$3().form.validConfig, props.validConfig);
|
|
26064
26064
|
});
|
|
@@ -26107,6 +26107,9 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26107
26107
|
getRefMaps: () => refMaps,
|
|
26108
26108
|
getComputeMaps: () => computeMaps
|
|
26109
26109
|
};
|
|
26110
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
26111
|
+
emit(type, createEvent(evnt, { $form: $xeForm, $grid: $xeGrid }, params));
|
|
26112
|
+
};
|
|
26110
26113
|
const callSlot = (slotFunc, params) => {
|
|
26111
26114
|
if (slotFunc) {
|
|
26112
26115
|
if (XEUtils.isString(slotFunc)) {
|
|
@@ -26138,12 +26141,19 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26138
26141
|
return recalculate();
|
|
26139
26142
|
});
|
|
26140
26143
|
};
|
|
26144
|
+
/**
|
|
26145
|
+
* 已废弃,被 getFormFlatItems 替换
|
|
26146
|
+
* @deprecated
|
|
26147
|
+
*/
|
|
26141
26148
|
const getItems = () => {
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
return
|
|
26149
|
+
// errLog('vxe.error.delFunc', ['getItems', 'getFlatItems'])
|
|
26150
|
+
return getFlatItems();
|
|
26151
|
+
};
|
|
26152
|
+
const getFlatItems = () => {
|
|
26153
|
+
return internalData.fullItemList;
|
|
26154
|
+
};
|
|
26155
|
+
const getNestedItems = () => {
|
|
26156
|
+
return reactData.formItems;
|
|
26147
26157
|
};
|
|
26148
26158
|
const getItemByField = (field) => {
|
|
26149
26159
|
const { fullItemFieldData } = internalData;
|
|
@@ -26162,8 +26172,8 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26162
26172
|
const toggleCollapseEvent = (evnt) => {
|
|
26163
26173
|
const actionRest = toggleCollapse();
|
|
26164
26174
|
const status = getCollapseStatus();
|
|
26165
|
-
|
|
26166
|
-
|
|
26175
|
+
dispatchEvent('toggle-collapse', { status, collapse: status, data: props.data }, evnt);
|
|
26176
|
+
dispatchEvent('collapse', { status, collapse: status, data: props.data }, evnt);
|
|
26167
26177
|
actionRest.then(() => {
|
|
26168
26178
|
recalculate().then(() => {
|
|
26169
26179
|
if ($xeGrid) {
|
|
@@ -26176,6 +26186,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26176
26186
|
});
|
|
26177
26187
|
};
|
|
26178
26188
|
const clearValidate = (fieldOrItem) => {
|
|
26189
|
+
const { fullItemList } = internalData;
|
|
26179
26190
|
if (fieldOrItem) {
|
|
26180
26191
|
let fields = fieldOrItem;
|
|
26181
26192
|
if (!XEUtils.isArray(fieldOrItem)) {
|
|
@@ -26192,7 +26203,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26192
26203
|
});
|
|
26193
26204
|
}
|
|
26194
26205
|
else {
|
|
26195
|
-
|
|
26206
|
+
fullItemList.forEach((item) => {
|
|
26196
26207
|
item.showError = false;
|
|
26197
26208
|
item.showIconMsg = false;
|
|
26198
26209
|
});
|
|
@@ -26224,6 +26235,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26224
26235
|
const { formItems } = reactData;
|
|
26225
26236
|
const itemIdData = {};
|
|
26226
26237
|
const itemFieldData = {};
|
|
26238
|
+
const itemList = [];
|
|
26227
26239
|
XEUtils.eachTree(formItems, (item, index, items) => {
|
|
26228
26240
|
const { id, field } = item;
|
|
26229
26241
|
const itemRest = { item, items, index };
|
|
@@ -26233,15 +26245,17 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26233
26245
|
if (field) {
|
|
26234
26246
|
itemFieldData[field] = itemRest;
|
|
26235
26247
|
}
|
|
26248
|
+
itemList.push(item);
|
|
26236
26249
|
}, { children: 'children' });
|
|
26250
|
+
internalData.fullItemList = itemList;
|
|
26237
26251
|
internalData.fullItemFieldData = itemFieldData;
|
|
26238
26252
|
internalData.fullItemIdData = itemIdData;
|
|
26239
26253
|
};
|
|
26240
26254
|
const reset = () => {
|
|
26241
26255
|
const { data } = props;
|
|
26242
|
-
const
|
|
26256
|
+
const { fullItemList } = internalData;
|
|
26243
26257
|
if (data) {
|
|
26244
|
-
|
|
26258
|
+
fullItemList.forEach((item) => {
|
|
26245
26259
|
const { field, itemRender } = item;
|
|
26246
26260
|
if (isEnableConf(itemRender)) {
|
|
26247
26261
|
const { name, startField, endField } = itemRender;
|
|
@@ -26275,7 +26289,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26275
26289
|
const resetEvent = (evnt) => {
|
|
26276
26290
|
evnt.preventDefault();
|
|
26277
26291
|
reset();
|
|
26278
|
-
|
|
26292
|
+
dispatchEvent('reset', { data: props.data }, evnt);
|
|
26279
26293
|
};
|
|
26280
26294
|
const handleFocus = (fields) => {
|
|
26281
26295
|
const el = refElem.value;
|
|
@@ -26473,11 +26487,12 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26473
26487
|
};
|
|
26474
26488
|
const validate = (callback) => {
|
|
26475
26489
|
const { readonly } = props;
|
|
26490
|
+
const { fullItemList } = internalData;
|
|
26476
26491
|
clearValidate();
|
|
26477
26492
|
if (readonly) {
|
|
26478
26493
|
return nextTick();
|
|
26479
26494
|
}
|
|
26480
|
-
return beginValidate(
|
|
26495
|
+
return beginValidate(fullItemList, '', callback).then((params) => {
|
|
26481
26496
|
recalculate();
|
|
26482
26497
|
return params;
|
|
26483
26498
|
});
|
|
@@ -26504,18 +26519,19 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26504
26519
|
};
|
|
26505
26520
|
const handleSubmitEvent = (evnt) => {
|
|
26506
26521
|
const { readonly } = props;
|
|
26522
|
+
const { fullItemList } = internalData;
|
|
26507
26523
|
clearValidate();
|
|
26508
26524
|
if (readonly) {
|
|
26509
|
-
|
|
26525
|
+
dispatchEvent('submit', { data: props.data }, evnt);
|
|
26510
26526
|
recalculate();
|
|
26511
26527
|
return;
|
|
26512
26528
|
}
|
|
26513
|
-
beginValidate(
|
|
26529
|
+
beginValidate(fullItemList).then((errMap) => {
|
|
26514
26530
|
if (errMap) {
|
|
26515
|
-
|
|
26531
|
+
dispatchEvent('submit-invalid', { data: props.data, errMap }, evnt);
|
|
26516
26532
|
}
|
|
26517
26533
|
else {
|
|
26518
|
-
|
|
26534
|
+
dispatchEvent('submit', { data: props.data }, evnt);
|
|
26519
26535
|
}
|
|
26520
26536
|
recalculate();
|
|
26521
26537
|
});
|
|
@@ -26636,10 +26652,8 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26636
26652
|
return nextTick();
|
|
26637
26653
|
};
|
|
26638
26654
|
};
|
|
26639
|
-
formMethods = {
|
|
26640
|
-
dispatchEvent
|
|
26641
|
-
emit(type, createEvent(evnt, { $form: $xeForm, $grid: $xeGrid }, params));
|
|
26642
|
-
},
|
|
26655
|
+
const formMethods = {
|
|
26656
|
+
dispatchEvent,
|
|
26643
26657
|
loadItems,
|
|
26644
26658
|
showItem: handleItemVisible(true),
|
|
26645
26659
|
hideItem: handleItemVisible(false),
|
|
@@ -26650,6 +26664,8 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
26650
26664
|
updateStatus,
|
|
26651
26665
|
toggleCollapse,
|
|
26652
26666
|
getItems,
|
|
26667
|
+
getFlatItems,
|
|
26668
|
+
getNestedItems,
|
|
26653
26669
|
getItemByField,
|
|
26654
26670
|
closeTooltip,
|
|
26655
26671
|
recalculate
|
|
@@ -34129,6 +34145,7 @@ var VxePagerComponent = defineVxeComponent({
|
|
|
34129
34145
|
placement: pageSizePlacement,
|
|
34130
34146
|
transfer: transfer,
|
|
34131
34147
|
options: sizeList,
|
|
34148
|
+
clearable: false,
|
|
34132
34149
|
onChange: pageSizeEvent
|
|
34133
34150
|
});
|
|
34134
34151
|
};
|
|
@@ -34160,6 +34177,7 @@ var VxePagerComponent = defineVxeComponent({
|
|
|
34160
34177
|
max: pageCount,
|
|
34161
34178
|
min: 1,
|
|
34162
34179
|
controls: false,
|
|
34180
|
+
clearable: false,
|
|
34163
34181
|
onKeydown: jumpKeydownEvent,
|
|
34164
34182
|
onBlur: triggerJumpEvent,
|
|
34165
34183
|
'onUpdate:modelValue'(val) {
|