pro-design-vue 1.0.0-rc.9 → 1.0.0
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/index.css +1 -1
- package/dist/index.full.js +375 -206
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +375 -206
- package/es/components/drawer/src/drawer.vue2.mjs +1 -1
- package/es/components/drawer/src/drawer.vue2.mjs.map +1 -1
- package/es/components/form/src/Form.d.ts +1 -1
- package/es/components/form/src/base/BaseForm.d.ts +1 -1
- package/es/components/form/src/base/BaseForm.mjs +16 -11
- package/es/components/form/src/base/BaseForm.mjs.map +1 -1
- package/es/components/form/src/base/StepForm.d.ts +1 -1
- package/es/components/form/src/components/FormColWrapper.d.ts +9 -0
- package/es/components/form/src/components/FormColWrapper.mjs +9 -1
- package/es/components/form/src/components/FormColWrapper.mjs.map +1 -1
- package/es/components/form/src/components/FormGroup.d.ts +6 -4
- package/es/components/form/src/components/FormGroup.mjs +1 -1
- package/es/components/form/src/components/FormGroup.mjs.map +1 -1
- package/es/components/form/src/components/FormItem.d.ts +9 -0
- package/es/components/form/src/components/FormItem.mjs +32 -24
- package/es/components/form/src/components/FormItem.mjs.map +1 -1
- package/es/components/form/src/components/FormItems.mjs +2 -1
- package/es/components/form/src/components/FormItems.mjs.map +1 -1
- package/es/components/form/src/components/FormList.d.ts +6 -4
- package/es/components/form/src/components/FormList.mjs +1 -1
- package/es/components/form/src/components/FormList.mjs.map +1 -1
- package/es/components/form/src/components/FormListContainer.d.ts +6 -4
- package/es/components/form/src/components/FormListContainer.mjs +1 -1
- package/es/components/form/src/components/FormListContainer.mjs.map +1 -1
- package/es/components/form/src/components/FormSet.d.ts +6 -4
- package/es/components/form/src/components/FormSet.mjs +1 -1
- package/es/components/form/src/components/FormSet.mjs.map +1 -1
- package/es/components/form/src/components/FormSubmitter.d.ts +2 -2
- package/es/components/form/src/components/FormSubmitter.mjs +25 -7
- package/es/components/form/src/components/FormSubmitter.mjs.map +1 -1
- package/es/components/form/src/components/FormTitle.d.ts +6 -4
- package/es/components/form/src/components/FormTitle.mjs +11 -6
- package/es/components/form/src/components/FormTitle.mjs.map +1 -1
- package/es/components/form/src/hooks/useAction.d.ts +5 -3
- package/es/components/form/src/hooks/useAction.mjs +30 -11
- package/es/components/form/src/hooks/useAction.mjs.map +1 -1
- package/es/components/form/src/hooks/useFieldValue.d.ts +1 -1
- package/es/components/form/src/hooks/useFieldValue.mjs +11 -15
- package/es/components/form/src/hooks/useFieldValue.mjs.map +1 -1
- package/es/components/form/src/layouts/DrawerForm.d.ts +1 -1
- package/es/components/form/src/layouts/ModalForm.d.ts +1 -1
- package/es/components/form/src/layouts/QueryFilter.d.ts +1 -1
- package/es/components/form/src/layouts/QueryFilter.mjs +14 -4
- package/es/components/form/src/layouts/QueryFilter.mjs.map +1 -1
- package/es/components/form/src/layouts/StepsForm.d.ts +1 -1
- package/es/components/form/src/layouts/StepsForm.mjs +8 -8
- package/es/components/form/src/layouts/StepsForm.mjs.map +1 -1
- package/es/components/form/src/type.d.ts +24 -11
- package/es/components/form/src/utils/transformer.d.ts +3 -0
- package/es/components/form/src/utils/transformer.mjs +24 -0
- package/es/components/form/src/utils/transformer.mjs.map +1 -0
- package/es/components/modal/src/modal.vue2.mjs +1 -1
- package/es/components/modal/src/modal.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Body/Body.vue.mjs.map +1 -1
- package/es/components/table/src/components/Body/Body.vue2.mjs +1 -2
- package/es/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Body/BodyCell.mjs +2 -2
- package/es/components/table/src/components/Body/BodyCell.mjs.map +1 -1
- package/es/components/table/src/components/Body/BodyRow.vue.mjs.map +1 -1
- package/es/components/table/src/components/Body/BodyRow.vue2.mjs +3 -3
- package/es/components/table/src/components/Body/BodyRow.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Drag/RowHandler.vue.mjs.map +1 -1
- package/es/components/table/src/components/Drag/RowHandler.vue2.mjs +17 -16
- package/es/components/table/src/components/Drag/RowHandler.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Header/HeaderCellTitle.vue.mjs +19 -7
- package/es/components/table/src/components/Header/HeaderCellTitle.vue.mjs.map +1 -1
- package/es/components/table/src/components/Header/HeaderCellTitle.vue2.mjs +1 -0
- package/es/components/table/src/components/Header/HeaderCellTitle.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Header/HeaderExtraCell.vue.mjs.map +1 -1
- package/es/components/table/src/components/Header/HeaderExtraCell.vue2.mjs +1 -0
- package/es/components/table/src/components/Header/HeaderExtraCell.vue2.mjs.map +1 -1
- package/es/components/table/src/components/InteralTable.vue.d.ts +21 -0
- package/es/components/table/src/components/InteralTable.vue.mjs.map +1 -1
- package/es/components/table/src/components/InteralTable.vue2.mjs +11 -5
- package/es/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
- package/es/components/table/src/components/Table.d.ts +25 -4
- package/es/components/table/src/components/Table.mjs +48 -14
- package/es/components/table/src/components/Table.mjs.map +1 -1
- package/es/components/table/src/components/ToolBar/ToolBar.vue.mjs +25 -6
- package/es/components/table/src/components/ToolBar/ToolBar.vue.mjs.map +1 -1
- package/es/components/table/src/components/ToolBar/ToolBar.vue2.mjs.map +1 -1
- package/es/components/table/src/components/interface.d.ts +33 -5
- package/es/components/table/src/components/interface.mjs +10 -1
- package/es/components/table/src/components/interface.mjs.map +1 -1
- package/es/components/table/src/hooks/useCellProps.mjs +3 -1
- package/es/components/table/src/hooks/useCellProps.mjs.map +1 -1
- package/es/components/table/src/hooks/useContainer.mjs +1 -1
- package/es/components/table/src/hooks/useContainer.mjs.map +1 -1
- package/es/components/table/src/hooks/useFetchData.mjs +13 -18
- package/es/components/table/src/hooks/useFetchData.mjs.map +1 -1
- package/es/components/table/src/hooks/useHover.d.ts +3 -0
- package/es/components/table/src/hooks/useHover.mjs +3 -1
- package/es/components/table/src/hooks/useHover.mjs.map +1 -1
- package/es/components/table/src/hooks/usePagination.d.ts +1 -0
- package/es/components/table/src/hooks/usePagination.mjs +7 -2
- package/es/components/table/src/hooks/usePagination.mjs.map +1 -1
- package/es/components/table/src/utils/genProColumnToColumn.mjs +5 -4
- package/es/components/table/src/utils/genProColumnToColumn.mjs.map +1 -1
- package/es/components/table/src/utils/util.d.ts +1 -1
- package/es/components/table/src/utils/util.mjs +1 -1
- package/es/components/table/src/utils/util.mjs.map +1 -1
- package/es/index.d.ts +65 -21
- package/es/utils/validate.d.ts +1 -1
- package/es/utils/validate.mjs +1 -1
- package/es/utils/validate.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/drawer/src/drawer.vue2.js +1 -1
- package/lib/components/drawer/src/drawer.vue2.js.map +1 -1
- package/lib/components/form/src/Form.d.ts +1 -1
- package/lib/components/form/src/base/BaseForm.d.ts +1 -1
- package/lib/components/form/src/base/BaseForm.js +14 -9
- package/lib/components/form/src/base/BaseForm.js.map +1 -1
- package/lib/components/form/src/base/StepForm.d.ts +1 -1
- package/lib/components/form/src/components/FormColWrapper.d.ts +9 -0
- package/lib/components/form/src/components/FormColWrapper.js +9 -1
- package/lib/components/form/src/components/FormColWrapper.js.map +1 -1
- package/lib/components/form/src/components/FormGroup.d.ts +6 -4
- package/lib/components/form/src/components/FormGroup.js +1 -1
- package/lib/components/form/src/components/FormGroup.js.map +1 -1
- package/lib/components/form/src/components/FormItem.d.ts +9 -0
- package/lib/components/form/src/components/FormItem.js +32 -24
- package/lib/components/form/src/components/FormItem.js.map +1 -1
- package/lib/components/form/src/components/FormItems.js +2 -1
- package/lib/components/form/src/components/FormItems.js.map +1 -1
- package/lib/components/form/src/components/FormList.d.ts +6 -4
- package/lib/components/form/src/components/FormList.js +1 -1
- package/lib/components/form/src/components/FormList.js.map +1 -1
- package/lib/components/form/src/components/FormListContainer.d.ts +6 -4
- package/lib/components/form/src/components/FormListContainer.js +1 -1
- package/lib/components/form/src/components/FormListContainer.js.map +1 -1
- package/lib/components/form/src/components/FormSet.d.ts +6 -4
- package/lib/components/form/src/components/FormSet.js +1 -1
- package/lib/components/form/src/components/FormSet.js.map +1 -1
- package/lib/components/form/src/components/FormSubmitter.d.ts +2 -2
- package/lib/components/form/src/components/FormSubmitter.js +25 -7
- package/lib/components/form/src/components/FormSubmitter.js.map +1 -1
- package/lib/components/form/src/components/FormTitle.d.ts +6 -4
- package/lib/components/form/src/components/FormTitle.js +11 -6
- package/lib/components/form/src/components/FormTitle.js.map +1 -1
- package/lib/components/form/src/hooks/useAction.d.ts +5 -3
- package/lib/components/form/src/hooks/useAction.js +29 -9
- package/lib/components/form/src/hooks/useAction.js.map +1 -1
- package/lib/components/form/src/hooks/useFieldValue.d.ts +1 -1
- package/lib/components/form/src/hooks/useFieldValue.js +11 -15
- package/lib/components/form/src/hooks/useFieldValue.js.map +1 -1
- package/lib/components/form/src/layouts/DrawerForm.d.ts +1 -1
- package/lib/components/form/src/layouts/ModalForm.d.ts +1 -1
- package/lib/components/form/src/layouts/QueryFilter.d.ts +1 -1
- package/lib/components/form/src/layouts/QueryFilter.js +14 -4
- package/lib/components/form/src/layouts/QueryFilter.js.map +1 -1
- package/lib/components/form/src/layouts/StepsForm.d.ts +1 -1
- package/lib/components/form/src/layouts/StepsForm.js +8 -8
- package/lib/components/form/src/layouts/StepsForm.js.map +1 -1
- package/lib/components/form/src/type.d.ts +24 -11
- package/lib/components/form/src/utils/transformer.d.ts +3 -0
- package/lib/components/form/src/utils/transformer.js +28 -0
- package/lib/components/form/src/utils/transformer.js.map +1 -0
- package/lib/components/modal/src/modal.vue2.js +1 -1
- package/lib/components/modal/src/modal.vue2.js.map +1 -1
- package/lib/components/table/src/components/Body/Body.vue.js.map +1 -1
- package/lib/components/table/src/components/Body/Body.vue2.js +1 -2
- package/lib/components/table/src/components/Body/Body.vue2.js.map +1 -1
- package/lib/components/table/src/components/Body/BodyCell.js +2 -2
- package/lib/components/table/src/components/Body/BodyCell.js.map +1 -1
- package/lib/components/table/src/components/Body/BodyRow.vue.js.map +1 -1
- package/lib/components/table/src/components/Body/BodyRow.vue2.js +3 -3
- package/lib/components/table/src/components/Body/BodyRow.vue2.js.map +1 -1
- package/lib/components/table/src/components/Drag/RowHandler.vue.js.map +1 -1
- package/lib/components/table/src/components/Drag/RowHandler.vue2.js +17 -16
- package/lib/components/table/src/components/Drag/RowHandler.vue2.js.map +1 -1
- package/lib/components/table/src/components/Header/HeaderCellTitle.vue.js +18 -6
- package/lib/components/table/src/components/Header/HeaderCellTitle.vue.js.map +1 -1
- package/lib/components/table/src/components/Header/HeaderCellTitle.vue2.js +1 -0
- package/lib/components/table/src/components/Header/HeaderCellTitle.vue2.js.map +1 -1
- package/lib/components/table/src/components/Header/HeaderExtraCell.vue.js.map +1 -1
- package/lib/components/table/src/components/Header/HeaderExtraCell.vue2.js +1 -0
- package/lib/components/table/src/components/Header/HeaderExtraCell.vue2.js.map +1 -1
- package/lib/components/table/src/components/InteralTable.vue.d.ts +21 -0
- package/lib/components/table/src/components/InteralTable.vue.js.map +1 -1
- package/lib/components/table/src/components/InteralTable.vue2.js +12 -6
- package/lib/components/table/src/components/InteralTable.vue2.js.map +1 -1
- package/lib/components/table/src/components/Table.d.ts +25 -4
- package/lib/components/table/src/components/Table.js +47 -13
- package/lib/components/table/src/components/Table.js.map +1 -1
- package/lib/components/table/src/components/ToolBar/ToolBar.vue.js +24 -5
- package/lib/components/table/src/components/ToolBar/ToolBar.vue.js.map +1 -1
- package/lib/components/table/src/components/ToolBar/ToolBar.vue2.js.map +1 -1
- package/lib/components/table/src/components/interface.d.ts +33 -5
- package/lib/components/table/src/components/interface.js +10 -1
- package/lib/components/table/src/components/interface.js.map +1 -1
- package/lib/components/table/src/hooks/useCellProps.js +3 -1
- package/lib/components/table/src/hooks/useCellProps.js.map +1 -1
- package/lib/components/table/src/hooks/useContainer.js +1 -1
- package/lib/components/table/src/hooks/useContainer.js.map +1 -1
- package/lib/components/table/src/hooks/useFetchData.js +13 -18
- package/lib/components/table/src/hooks/useFetchData.js.map +1 -1
- package/lib/components/table/src/hooks/useHover.d.ts +3 -0
- package/lib/components/table/src/hooks/useHover.js +2 -0
- package/lib/components/table/src/hooks/useHover.js.map +1 -1
- package/lib/components/table/src/hooks/usePagination.d.ts +1 -0
- package/lib/components/table/src/hooks/usePagination.js +7 -1
- package/lib/components/table/src/hooks/usePagination.js.map +1 -1
- package/lib/components/table/src/utils/genProColumnToColumn.js +5 -4
- package/lib/components/table/src/utils/genProColumnToColumn.js.map +1 -1
- package/lib/components/table/src/utils/util.d.ts +1 -1
- package/lib/components/table/src/utils/util.js +1 -1
- package/lib/components/table/src/utils/util.js.map +1 -1
- package/lib/index.d.ts +65 -21
- package/lib/utils/validate.d.ts +1 -1
- package/lib/utils/validate.js +1 -1
- package/lib/utils/validate.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css-var.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/pro-form.css +1 -1
- package/theme-chalk/src/css-var.less +154 -677
- package/theme-chalk/src/form.less +5 -0
- package/theme-chalk/src/table/alert.less +1 -0
- package/theme-chalk/src/table/table.less +3 -3
- package/theme-chalk/src/common/css-var.less +0 -914
package/dist/index.full.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Pro Design Vue v1.0.0
|
1
|
+
/*! Pro Design Vue v1.0.0 */
|
2
2
|
|
3
3
|
(function (global, factory) {
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue')) :
|
@@ -16,7 +16,7 @@
|
|
16
16
|
const SCROLL_FIXED_CLASS = `_scroll__fixed_`;
|
17
17
|
const DEFAULT_NAMESPACE = "pro";
|
18
18
|
|
19
|
-
const version$1 = "1.0.0
|
19
|
+
const version$1 = "1.0.0";
|
20
20
|
|
21
21
|
const makeInstaller = (components = []) => {
|
22
22
|
const install = (app) => {
|
@@ -2206,13 +2206,13 @@
|
|
2206
2206
|
function isNumber$2(val) {
|
2207
2207
|
return is$1(val, "Number");
|
2208
2208
|
}
|
2209
|
-
function isPromise
|
2210
|
-
return is$1(val, "Promise") &&
|
2209
|
+
function isPromise(val) {
|
2210
|
+
return is$1(val, "Promise") && isFunction$2(val.then) && isFunction$2(val.catch);
|
2211
2211
|
}
|
2212
2212
|
function isString$1(val) {
|
2213
2213
|
return is$1(val, "String");
|
2214
2214
|
}
|
2215
|
-
function isFunction$
|
2215
|
+
function isFunction$2(val) {
|
2216
2216
|
return typeof val === "function";
|
2217
2217
|
}
|
2218
2218
|
function isArray$2(val) {
|
@@ -2256,7 +2256,7 @@
|
|
2256
2256
|
...okButtonProps
|
2257
2257
|
},
|
2258
2258
|
async onOk(...args) {
|
2259
|
-
if (isPromise
|
2259
|
+
if (isPromise(onOk)) {
|
2260
2260
|
return await new Promise(() => {
|
2261
2261
|
onOk == null ? void 0 : onOk(args);
|
2262
2262
|
});
|
@@ -2507,7 +2507,7 @@
|
|
2507
2507
|
var funcTag$2 = "[object Function]";
|
2508
2508
|
var genTag$1 = "[object GeneratorFunction]";
|
2509
2509
|
var proxyTag = "[object Proxy]";
|
2510
|
-
function isFunction$
|
2510
|
+
function isFunction$1(value) {
|
2511
2511
|
if (!isObject$3(value)) {
|
2512
2512
|
return false;
|
2513
2513
|
}
|
@@ -2554,7 +2554,7 @@
|
|
2554
2554
|
if (!isObject$3(value) || isMasked(value)) {
|
2555
2555
|
return false;
|
2556
2556
|
}
|
2557
|
-
var pattern = isFunction$
|
2557
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
2558
2558
|
return pattern.test(toSource(value));
|
2559
2559
|
}
|
2560
2560
|
|
@@ -2756,7 +2756,7 @@
|
|
2756
2756
|
}
|
2757
2757
|
|
2758
2758
|
function isArrayLike(value) {
|
2759
|
-
return value != null && isLength(value.length) && !isFunction$
|
2759
|
+
return value != null && isLength(value.length) && !isFunction$1(value);
|
2760
2760
|
}
|
2761
2761
|
|
2762
2762
|
function isIterateeCall(value, index, object) {
|
@@ -4429,7 +4429,7 @@
|
|
4429
4429
|
newValue = objValue;
|
4430
4430
|
if (isArguments(objValue)) {
|
4431
4431
|
newValue = toPlainObject(objValue);
|
4432
|
-
} else if (!isObject$3(objValue) || isFunction$
|
4432
|
+
} else if (!isObject$3(objValue) || isFunction$1(objValue)) {
|
4433
4433
|
newValue = initCloneObject(srcValue);
|
4434
4434
|
}
|
4435
4435
|
} else {
|
@@ -8480,7 +8480,7 @@
|
|
8480
8480
|
});
|
8481
8481
|
const isComponent = vue.computed(() => {
|
8482
8482
|
const { icon } = props;
|
8483
|
-
return !isString$1(icon) && (isObject$4(icon) || isFunction$
|
8483
|
+
return !isString$1(icon) && (isObject$4(icon) || isFunction$2(icon));
|
8484
8484
|
});
|
8485
8485
|
return (_ctx, _cache) => {
|
8486
8486
|
return isComponent.value ? (vue.openBlock(), vue.createBlock(
|
@@ -9144,7 +9144,7 @@
|
|
9144
9144
|
return false;
|
9145
9145
|
}
|
9146
9146
|
}
|
9147
|
-
function isFunction
|
9147
|
+
function isFunction(value) {
|
9148
9148
|
return typeof value === "function";
|
9149
9149
|
}
|
9150
9150
|
var slice = Array.prototype.slice;
|
@@ -9152,7 +9152,7 @@
|
|
9152
9152
|
return Array.from ? Array.from(value) : slice.call(value);
|
9153
9153
|
}
|
9154
9154
|
function forEach(data, callback) {
|
9155
|
-
if (data && isFunction
|
9155
|
+
if (data && isFunction(callback)) {
|
9156
9156
|
if (Array.isArray(data) || isNumber(data.length)) {
|
9157
9157
|
toArray$1(data).forEach(function(value, key) {
|
9158
9158
|
callback.call(data, value, key, data);
|
@@ -9366,7 +9366,7 @@
|
|
9366
9366
|
}
|
9367
9367
|
function dispatchEvent(element, type, data) {
|
9368
9368
|
var event;
|
9369
|
-
if (isFunction
|
9369
|
+
if (isFunction(Event) && isFunction(CustomEvent)) {
|
9370
9370
|
event = new CustomEvent(type, {
|
9371
9371
|
detail: data,
|
9372
9372
|
bubbles: true,
|
@@ -10105,19 +10105,19 @@
|
|
10105
10105
|
var events$1 = {
|
10106
10106
|
bind: function bind() {
|
10107
10107
|
var element = this.element, options = this.options, cropper = this.cropper;
|
10108
|
-
if (isFunction
|
10108
|
+
if (isFunction(options.cropstart)) {
|
10109
10109
|
addListener(element, EVENT_CROP_START, options.cropstart);
|
10110
10110
|
}
|
10111
|
-
if (isFunction
|
10111
|
+
if (isFunction(options.cropmove)) {
|
10112
10112
|
addListener(element, EVENT_CROP_MOVE, options.cropmove);
|
10113
10113
|
}
|
10114
|
-
if (isFunction
|
10114
|
+
if (isFunction(options.cropend)) {
|
10115
10115
|
addListener(element, EVENT_CROP_END, options.cropend);
|
10116
10116
|
}
|
10117
|
-
if (isFunction
|
10117
|
+
if (isFunction(options.crop)) {
|
10118
10118
|
addListener(element, EVENT_CROP, options.crop);
|
10119
10119
|
}
|
10120
|
-
if (isFunction
|
10120
|
+
if (isFunction(options.zoom)) {
|
10121
10121
|
addListener(element, EVENT_ZOOM, options.zoom);
|
10122
10122
|
}
|
10123
10123
|
addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this));
|
@@ -10138,19 +10138,19 @@
|
|
10138
10138
|
},
|
10139
10139
|
unbind: function unbind() {
|
10140
10140
|
var element = this.element, options = this.options, cropper = this.cropper;
|
10141
|
-
if (isFunction
|
10141
|
+
if (isFunction(options.cropstart)) {
|
10142
10142
|
removeListener(element, EVENT_CROP_START, options.cropstart);
|
10143
10143
|
}
|
10144
|
-
if (isFunction
|
10144
|
+
if (isFunction(options.cropmove)) {
|
10145
10145
|
removeListener(element, EVENT_CROP_MOVE, options.cropmove);
|
10146
10146
|
}
|
10147
|
-
if (isFunction
|
10147
|
+
if (isFunction(options.cropend)) {
|
10148
10148
|
removeListener(element, EVENT_CROP_END, options.cropend);
|
10149
10149
|
}
|
10150
|
-
if (isFunction
|
10150
|
+
if (isFunction(options.crop)) {
|
10151
10151
|
removeListener(element, EVENT_CROP, options.crop);
|
10152
10152
|
}
|
10153
|
-
if (isFunction
|
10153
|
+
if (isFunction(options.zoom)) {
|
10154
10154
|
removeListener(element, EVENT_ZOOM, options.zoom);
|
10155
10155
|
}
|
10156
10156
|
removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart);
|
@@ -11555,7 +11555,7 @@
|
|
11555
11555
|
this.crop();
|
11556
11556
|
}
|
11557
11557
|
this.setData(options.data);
|
11558
|
-
if (isFunction
|
11558
|
+
if (isFunction(options.ready)) {
|
11559
11559
|
addListener(element, EVENT_READY, options.ready, {
|
11560
11560
|
once: true
|
11561
11561
|
});
|
@@ -11751,7 +11751,7 @@
|
|
11751
11751
|
__name: "drawer",
|
11752
11752
|
props: {
|
11753
11753
|
description: { type: String, required: false },
|
11754
|
-
showFullscreen: { type: Boolean, required: false, default:
|
11754
|
+
showFullscreen: { type: Boolean, required: false, default: false },
|
11755
11755
|
defaultFullscreen: { type: Boolean, required: false },
|
11756
11756
|
autofocus: { type: Boolean, required: false, default: false },
|
11757
11757
|
closable: { type: Boolean, required: false, default: true },
|
@@ -14766,7 +14766,7 @@
|
|
14766
14766
|
});
|
14767
14767
|
const icon = vue.computed(() => {
|
14768
14768
|
const render = getSlot(props.iconRender, formSlotsContext);
|
14769
|
-
if (isFunction$
|
14769
|
+
if (isFunction$2(render)) {
|
14770
14770
|
return vue.createVNode(RenderVNode$1, {
|
14771
14771
|
"vnode": render
|
14772
14772
|
}, null);
|
@@ -14775,7 +14775,7 @@
|
|
14775
14775
|
});
|
14776
14776
|
const title = vue.computed(() => {
|
14777
14777
|
const render = getSlot(props.title, formSlotsContext);
|
14778
|
-
if (isFunction$
|
14778
|
+
if (isFunction$2(render)) {
|
14779
14779
|
return vue.createVNode(RenderVNode$1, {
|
14780
14780
|
"vnode": render
|
14781
14781
|
}, null);
|
@@ -14889,7 +14889,7 @@
|
|
14889
14889
|
});
|
14890
14890
|
const icon = vue.computed(() => {
|
14891
14891
|
const render = getSlot(props.iconRender, formSlotsContext);
|
14892
|
-
if (isFunction$
|
14892
|
+
if (isFunction$2(render)) {
|
14893
14893
|
return vue.createVNode(RenderVNode$1, {
|
14894
14894
|
"vnode": render
|
14895
14895
|
}, null);
|
@@ -14898,7 +14898,7 @@
|
|
14898
14898
|
});
|
14899
14899
|
const title = vue.computed(() => {
|
14900
14900
|
const render = getSlot(props.title, formSlotsContext);
|
14901
|
-
if (isFunction$
|
14901
|
+
if (isFunction$2(render)) {
|
14902
14902
|
return vue.createVNode(RenderVNode$1, {
|
14903
14903
|
"vnode": render
|
14904
14904
|
}, null);
|
@@ -14907,7 +14907,7 @@
|
|
14907
14907
|
});
|
14908
14908
|
const description = vue.computed(() => {
|
14909
14909
|
const render = getSlot(props.description, formSlotsContext);
|
14910
|
-
if (isFunction$
|
14910
|
+
if (isFunction$2(render)) {
|
14911
14911
|
return vue.createVNode(RenderVNode$1, {
|
14912
14912
|
"vnode": render
|
14913
14913
|
}, null);
|
@@ -14951,7 +14951,7 @@
|
|
14951
14951
|
__name: "modal",
|
14952
14952
|
props: {
|
14953
14953
|
description: { type: String, required: false },
|
14954
|
-
showFullscreen: { type: Boolean, required: false, default:
|
14954
|
+
showFullscreen: { type: Boolean, required: false, default: false },
|
14955
14955
|
defaultFullscreen: { type: Boolean, required: false },
|
14956
14956
|
draggable: { type: Boolean, required: false, default: false },
|
14957
14957
|
top: { type: Number, required: false, default: 100 },
|
@@ -15767,7 +15767,7 @@
|
|
15767
15767
|
if (Array.isArray(itemValue)) return false;
|
15768
15768
|
return true;
|
15769
15769
|
}
|
15770
|
-
const transformKeySubmitValue = (values, paramsOmitNil) => {
|
15770
|
+
const transformKeySubmitValue = (values, transformerMap, paramsOmitNil) => {
|
15771
15771
|
if (Object.keys(values).length < 1) {
|
15772
15772
|
return values;
|
15773
15773
|
}
|
@@ -15783,6 +15783,7 @@
|
|
15783
15783
|
return result;
|
15784
15784
|
}
|
15785
15785
|
Object.keys(tempValues).forEach((entityKey) => {
|
15786
|
+
var _a;
|
15786
15787
|
const transformForArray = (transformList, subItemValue) => {
|
15787
15788
|
if (!Array.isArray(transformList)) return entityKey;
|
15788
15789
|
transformList.forEach((transform2, idx) => {
|
@@ -15812,9 +15813,8 @@
|
|
15812
15813
|
});
|
15813
15814
|
return entityKey;
|
15814
15815
|
};
|
15815
|
-
const key = parentsKey ? [parentsKey, entityKey].flat(1) : [entityKey].flat(1);
|
15816
15816
|
const itemValue = tempValues[entityKey];
|
15817
|
-
const transformFunction = get(
|
15817
|
+
const transformFunction = (_a = transformerMap.get(entityKey)) == null ? void 0 : _a.transform;
|
15818
15818
|
const transform = () => {
|
15819
15819
|
let tempKey, transformedResult, isTransformedResultPrimitive = false;
|
15820
15820
|
if (typeof transformFunction === "function") {
|
@@ -15850,7 +15850,7 @@
|
|
15850
15850
|
}
|
15851
15851
|
if (typeof window === "undefined") return;
|
15852
15852
|
if (isPlainObj(itemValue)) {
|
15853
|
-
const genValues = gen(itemValue
|
15853
|
+
const genValues = gen(itemValue);
|
15854
15854
|
if (Object.keys(genValues).length < 1) {
|
15855
15855
|
return;
|
15856
15856
|
}
|
@@ -15864,12 +15864,31 @@
|
|
15864
15864
|
finalValues = Array.isArray(values) && Array.isArray(finalValues) ? [...gen(values)] : merge({}, gen(values), finalValues);
|
15865
15865
|
return finalValues;
|
15866
15866
|
};
|
15867
|
+
const convertKeyInitialValue = (values, transformerMap) => {
|
15868
|
+
if (Object.keys(values).length < 1) {
|
15869
|
+
return values;
|
15870
|
+
}
|
15871
|
+
const finalValues = {};
|
15872
|
+
Object.keys(values).forEach((entityKey) => {
|
15873
|
+
var _a;
|
15874
|
+
const itemValue = values[entityKey];
|
15875
|
+
const convertValueFunction = (_a = transformerMap.get(entityKey)) == null ? void 0 : _a.convertValue;
|
15876
|
+
if (typeof convertValueFunction === "function") {
|
15877
|
+
const convertResult = convertValueFunction == null ? void 0 : convertValueFunction(itemValue, entityKey);
|
15878
|
+
finalValues[entityKey] = convertResult;
|
15879
|
+
} else {
|
15880
|
+
finalValues[entityKey] = itemValue;
|
15881
|
+
}
|
15882
|
+
});
|
15883
|
+
return finalValues;
|
15884
|
+
};
|
15867
15885
|
function useAction({
|
15868
15886
|
props,
|
15869
15887
|
formRef,
|
15870
15888
|
formData,
|
15871
15889
|
initialValues,
|
15872
15890
|
hasInitial,
|
15891
|
+
transformerMap,
|
15873
15892
|
onFinish,
|
15874
15893
|
onReset,
|
15875
15894
|
onFinishFailed
|
@@ -15898,20 +15917,20 @@
|
|
15898
15917
|
if (!namePath) throw new Error("name is require");
|
15899
15918
|
const value = get(formData.value, namePath);
|
15900
15919
|
const obj = set({}, namePath, value);
|
15901
|
-
return get(transformKeySubmitValue(obj, props.omitNil), namePath);
|
15920
|
+
return get(transformKeySubmitValue(obj, transformerMap.value, props.omitNil), namePath);
|
15902
15921
|
};
|
15903
15922
|
const getFieldFormatValueObject = (name) => {
|
15904
15923
|
const namePath = covertFormName(name);
|
15905
15924
|
if (!namePath) throw new Error("name is require");
|
15906
15925
|
const value = get(formData.value, namePath);
|
15907
15926
|
const obj = set({}, namePath, value);
|
15908
|
-
return transformKeySubmitValue(obj, props.omitNil);
|
15927
|
+
return transformKeySubmitValue(obj, transformerMap.value, props.omitNil);
|
15909
15928
|
};
|
15910
15929
|
const validateFieldsReturnFormatValue = async (nameList) => {
|
15911
15930
|
var _a;
|
15912
15931
|
if (!Array.isArray(nameList) && nameList) throw new Error("nameList must be array");
|
15913
15932
|
const values = await ((_a = formRef.value) == null ? void 0 : _a.validateFields(nameList));
|
15914
|
-
const transformedKey = transformKeySubmitValue(values, props.omitNil);
|
15933
|
+
const transformedKey = transformKeySubmitValue(values, transformerMap.value, props.omitNil);
|
15915
15934
|
return transformedKey != null ? transformedKey : {};
|
15916
15935
|
};
|
15917
15936
|
const setFieldValue = (name, value) => {
|
@@ -15937,10 +15956,10 @@
|
|
15937
15956
|
var _a;
|
15938
15957
|
hasInitial.value = true;
|
15939
15958
|
(_a = formRef.value) == null ? void 0 : _a.clearValidate();
|
15940
|
-
formData.value = cloneDeep(initialValues.value);
|
15959
|
+
formData.value = cloneDeep(convertKeyInitialValue(initialValues.value, transformerMap.value));
|
15941
15960
|
Promise.resolve().then(() => {
|
15942
15961
|
hasInitial.value = false;
|
15943
|
-
onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, props.omitNil));
|
15962
|
+
onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, transformerMap.value, props.omitNil));
|
15944
15963
|
});
|
15945
15964
|
};
|
15946
15965
|
const resetField = (name) => {
|
@@ -16150,7 +16169,8 @@
|
|
16150
16169
|
}
|
16151
16170
|
return vue.createVNode(FormItem$2, {
|
16152
16171
|
"key": item.key,
|
16153
|
-
"item": item
|
16172
|
+
"item": item,
|
16173
|
+
"grid": mergeGrid.value
|
16154
16174
|
}, null);
|
16155
16175
|
});
|
16156
16176
|
});
|
@@ -16214,15 +16234,33 @@
|
|
16214
16234
|
action
|
16215
16235
|
} = useInjectForm();
|
16216
16236
|
const formSlotsContext = useInjectSlots$1();
|
16217
|
-
const submit = () => {
|
16237
|
+
const submit = async () => {
|
16218
16238
|
var _a;
|
16219
|
-
|
16220
|
-
|
16239
|
+
if (!props.onSubmit) {
|
16240
|
+
action.submit();
|
16241
|
+
return;
|
16242
|
+
}
|
16243
|
+
const values = action.getFieldsValue();
|
16244
|
+
const response = (_a = props.onSubmit) == null ? void 0 : _a.call(props, values, action);
|
16245
|
+
const result = await response;
|
16246
|
+
if (result) {
|
16247
|
+
action.submit();
|
16248
|
+
}
|
16249
|
+
return result;
|
16221
16250
|
};
|
16222
|
-
const reset = () => {
|
16223
|
-
var _a
|
16224
|
-
(
|
16225
|
-
|
16251
|
+
const reset = async () => {
|
16252
|
+
var _a;
|
16253
|
+
if (!props.onReset) {
|
16254
|
+
action.reset();
|
16255
|
+
return;
|
16256
|
+
}
|
16257
|
+
const values = action.getFieldsValue();
|
16258
|
+
const response = (_a = props.onReset) == null ? void 0 : _a.call(props, values, action);
|
16259
|
+
const result = await response;
|
16260
|
+
if (result) {
|
16261
|
+
action.reset();
|
16262
|
+
}
|
16263
|
+
return result;
|
16226
16264
|
};
|
16227
16265
|
const resetButton = vue.computed(() => {
|
16228
16266
|
const {
|
@@ -16304,6 +16342,26 @@
|
|
16304
16342
|
}
|
16305
16343
|
});
|
16306
16344
|
|
16345
|
+
function transformer(items) {
|
16346
|
+
const transformerMap = /* @__PURE__ */ new Map();
|
16347
|
+
const handler = (items2) => {
|
16348
|
+
items2.forEach((item) => {
|
16349
|
+
var _a;
|
16350
|
+
if (item.name && (item.transform || item.convertValue)) {
|
16351
|
+
transformerMap.set(item.name, {
|
16352
|
+
transform: item.transform,
|
16353
|
+
convertValue: item.convertValue
|
16354
|
+
});
|
16355
|
+
} else if (item.children) {
|
16356
|
+
const children = (_a = runFunction(item.children)) != null ? _a : [];
|
16357
|
+
handler(children);
|
16358
|
+
}
|
16359
|
+
});
|
16360
|
+
};
|
16361
|
+
handler(items);
|
16362
|
+
return transformerMap;
|
16363
|
+
}
|
16364
|
+
|
16307
16365
|
function _isSlot$5(s) {
|
16308
16366
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
16309
16367
|
}
|
@@ -16320,6 +16378,7 @@
|
|
16320
16378
|
attrs
|
16321
16379
|
}) {
|
16322
16380
|
const mountedRef = vue.ref(false);
|
16381
|
+
const transformerMap = vue.shallowRef(/* @__PURE__ */ new Map());
|
16323
16382
|
const formRef = vue.ref();
|
16324
16383
|
const prefixCls = usePrefixCls("form");
|
16325
16384
|
const formData = vue.ref({});
|
@@ -16328,7 +16387,7 @@
|
|
16328
16387
|
var _a;
|
16329
16388
|
return (_a = props.formKey) != null ? _a : requestFormCacheId.toString();
|
16330
16389
|
});
|
16331
|
-
const [loading,
|
16390
|
+
const [loading, setLoading] = useMergedState$1(false, {
|
16332
16391
|
value: vue.computed(() => props.loading),
|
16333
16392
|
onChange: (val) => {
|
16334
16393
|
var _a;
|
@@ -16373,8 +16432,9 @@
|
|
16373
16432
|
});
|
16374
16433
|
};
|
16375
16434
|
vue.watch(() => props.items, () => {
|
16376
|
-
var _a;
|
16377
|
-
|
16435
|
+
var _a, _b;
|
16436
|
+
transformerMap.value = transformer((_a = props.items) != null ? _a : []);
|
16437
|
+
formItems.value = formatItems((_b = props.items) != null ? _b : []);
|
16378
16438
|
}, {
|
16379
16439
|
immediate: true
|
16380
16440
|
});
|
@@ -16385,7 +16445,7 @@
|
|
16385
16445
|
} = useInitialValues(props);
|
16386
16446
|
vue.watch(initialValues, (newValues, oldValues) => {
|
16387
16447
|
if (!isEqual(newValues, oldValues)) {
|
16388
|
-
formData.value = cloneDeep(newValues);
|
16448
|
+
formData.value = cloneDeep(convertKeyInitialValue(newValues, transformerMap.value));
|
16389
16449
|
if (!props.request || props.requestAbort) {
|
16390
16450
|
Promise.resolve().then(() => {
|
16391
16451
|
hasInitial.value = false;
|
@@ -16397,22 +16457,22 @@
|
|
16397
16457
|
});
|
16398
16458
|
const onValuesChange = debounce(() => {
|
16399
16459
|
var _a;
|
16400
|
-
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, transformKeySubmitValue(cloneDeep(formData.value), props.omitNil));
|
16460
|
+
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil));
|
16401
16461
|
}, 200);
|
16402
16462
|
const onFinish = async () => {
|
16403
16463
|
if (!props.onFinish) return;
|
16404
16464
|
if (props.submitOnLoading) {
|
16405
16465
|
if (loading.value) return;
|
16406
|
-
|
16466
|
+
setLoading(true);
|
16407
16467
|
}
|
16408
16468
|
try {
|
16409
|
-
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), props.omitNil);
|
16469
|
+
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil);
|
16410
16470
|
await props.onFinish(finalValues);
|
16411
16471
|
} catch (error) {
|
16412
16472
|
console.log("\u{1F680} ~ onFinish ~ error:", error);
|
16413
16473
|
} finally {
|
16414
16474
|
if (props.submitOnLoading) {
|
16415
|
-
|
16475
|
+
setLoading(false);
|
16416
16476
|
}
|
16417
16477
|
}
|
16418
16478
|
};
|
@@ -16430,6 +16490,7 @@
|
|
16430
16490
|
formData,
|
16431
16491
|
initialValues,
|
16432
16492
|
hasInitial,
|
16493
|
+
transformerMap,
|
16433
16494
|
onFinish,
|
16434
16495
|
onReset: props.onReset,
|
16435
16496
|
onFinishFailed: props.onFinishFailed
|
@@ -16466,6 +16527,7 @@
|
|
16466
16527
|
}), null);
|
16467
16528
|
if (submitterProps.value.teleport) {
|
16468
16529
|
return vue.createVNode(vue.Teleport, {
|
16530
|
+
"defer": true,
|
16469
16531
|
"to": submitterProps.value.teleport
|
16470
16532
|
}, _isSlot$5(dom) ? dom : {
|
16471
16533
|
default: () => [dom]
|
@@ -16480,7 +16542,7 @@
|
|
16480
16542
|
const finalValues = (_c = (_b = (_a = formRef.value) == null ? void 0 : _a.getFieldsValue) == null ? void 0 : _b.call(_a, true)) != null ? _c : {};
|
16481
16543
|
Promise.resolve().then(() => {
|
16482
16544
|
var _a2;
|
16483
|
-
(_a2 = props.onInit) == null ? void 0 : _a2.call(props, transformKeySubmitValue(finalValues, props.omitNil), action);
|
16545
|
+
(_a2 = props.onInit) == null ? void 0 : _a2.call(props, transformKeySubmitValue(finalValues, transformerMap.value, props.omitNil), action);
|
16484
16546
|
});
|
16485
16547
|
});
|
16486
16548
|
useProvideForm({
|
@@ -17077,7 +17139,7 @@
|
|
17077
17139
|
}
|
17078
17140
|
return void 0;
|
17079
17141
|
});
|
17080
|
-
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed, {
|
17142
|
+
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed && props.submitter !== false, {
|
17081
17143
|
value: vue.computed(() => props.collapsed),
|
17082
17144
|
onChange: (val) => {
|
17083
17145
|
emit("collapse", val);
|
@@ -17148,7 +17210,7 @@
|
|
17148
17210
|
firstRowFull = colSpan === 24 && !item.hidden;
|
17149
17211
|
}
|
17150
17212
|
const hidden = item.hidden || // 如果收起了
|
17151
|
-
|
17213
|
+
collapsed.value && (firstRowFull || // 如果 超过显示长度 且 总长度超过了 24
|
17152
17214
|
totalSize.value > showLength.value) && !!index;
|
17153
17215
|
if (hidden) {
|
17154
17216
|
if (!props.preserve) {
|
@@ -17176,7 +17238,10 @@
|
|
17176
17238
|
return {
|
17177
17239
|
...item,
|
17178
17240
|
hidden,
|
17179
|
-
formItemProps:
|
17241
|
+
formItemProps: {
|
17242
|
+
...item.title ? formItemFixStyle.value : {},
|
17243
|
+
...item.formItemProps
|
17244
|
+
},
|
17180
17245
|
colProps: {
|
17181
17246
|
span: colSpan
|
17182
17247
|
}
|
@@ -17220,9 +17285,16 @@
|
|
17220
17285
|
}), {
|
17221
17286
|
...slots,
|
17222
17287
|
submitter: ({
|
17288
|
+
props: props2,
|
17289
|
+
action,
|
17223
17290
|
defaultDoms
|
17224
17291
|
}) => {
|
17225
|
-
|
17292
|
+
var _a2;
|
17293
|
+
return vue.createVNode(vue.Fragment, null, [slots.submitter ? (_a2 = slots.submitter) == null ? void 0 : _a2.call(slots, {
|
17294
|
+
props: props2,
|
17295
|
+
action,
|
17296
|
+
defaultDoms
|
17297
|
+
}) : defaultDoms, needCollapse.value !== false && vue.createVNode("a", {
|
17226
17298
|
"class": `${prefixCls}-collapse-button`,
|
17227
17299
|
"onClick": () => setCollapsed(!collapsed.value)
|
17228
17300
|
}, [collapsed.value ? intl.getMessage("form.collapsed", "\u5C55\u5F00") : intl.getMessage("form.expand", "\u6536\u8D77"), !!hiddenNum.value && `(${hiddenNum.value})`, vue.createVNode(DownOutlined, {
|
@@ -17383,7 +17455,8 @@
|
|
17383
17455
|
},
|
17384
17456
|
emits: [],
|
17385
17457
|
setup(props, {
|
17386
|
-
slots
|
17458
|
+
slots,
|
17459
|
+
expose
|
17387
17460
|
}) {
|
17388
17461
|
const intl = useIntl();
|
17389
17462
|
const prefixCls = usePrefixCls("steps-form");
|
@@ -17400,7 +17473,7 @@
|
|
17400
17473
|
onChange: props.onCurrentChange
|
17401
17474
|
});
|
17402
17475
|
const regForm = (formRef, index) => {
|
17403
|
-
formArrayRef.value[index] = formRef;
|
17476
|
+
formArrayRef.value[index] = formRef.value;
|
17404
17477
|
};
|
17405
17478
|
const lastStep = vue.computed(() => step.value === props.steps.length - 1);
|
17406
17479
|
const onFormFinish = async (name, formData) => {
|
@@ -17414,10 +17487,7 @@
|
|
17414
17487
|
const success = await props.onFinish(values);
|
17415
17488
|
if (success) {
|
17416
17489
|
setStep(0);
|
17417
|
-
formArrayRef.value.forEach((form) =>
|
17418
|
-
var _a;
|
17419
|
-
return (_a = form.value) == null ? void 0 : _a.reset();
|
17420
|
-
});
|
17490
|
+
formArrayRef.value.forEach((form) => form == null ? void 0 : form.reset());
|
17421
17491
|
}
|
17422
17492
|
} catch (error) {
|
17423
17493
|
console.log(error);
|
@@ -17426,10 +17496,9 @@
|
|
17426
17496
|
}
|
17427
17497
|
};
|
17428
17498
|
const onSubmit = () => {
|
17429
|
-
var _a;
|
17430
17499
|
const from = formArrayRef.value[step.value];
|
17431
17500
|
if (from) {
|
17432
|
-
|
17501
|
+
from == null ? void 0 : from.submit();
|
17433
17502
|
}
|
17434
17503
|
};
|
17435
17504
|
const prePage = () => {
|
@@ -17549,6 +17618,9 @@
|
|
17549
17618
|
regForm,
|
17550
17619
|
onFormFinish
|
17551
17620
|
});
|
17621
|
+
expose({
|
17622
|
+
formArrayRef
|
17623
|
+
});
|
17552
17624
|
return () => vue.createVNode("div", {
|
17553
17625
|
"class": prefixCls
|
17554
17626
|
}, [stepsFormDom.value]);
|
@@ -19680,6 +19752,7 @@
|
|
19680
19752
|
}, props.rowHoverDelay.value + 50);
|
19681
19753
|
};
|
19682
19754
|
const hoverContext = {
|
19755
|
+
rowHover: props.rowHover,
|
19683
19756
|
hoverColumnKey,
|
19684
19757
|
hoverRowKey,
|
19685
19758
|
handleCellHover,
|
@@ -19690,6 +19763,7 @@
|
|
19690
19763
|
};
|
19691
19764
|
const useInjectHover = () => {
|
19692
19765
|
return vue.inject(HoverContextKey, {
|
19766
|
+
rowHover: vue.computed(() => void 0),
|
19693
19767
|
hoverRowKey: vue.ref(),
|
19694
19768
|
hoverColumnKey: vue.ref(),
|
19695
19769
|
handleCellHover: () => {
|
@@ -19711,9 +19785,6 @@
|
|
19711
19785
|
function is(val, type) {
|
19712
19786
|
return toString.call(val) === `[object ${type}]`;
|
19713
19787
|
}
|
19714
|
-
function isFunction(val) {
|
19715
|
-
return typeof val === "function";
|
19716
|
-
}
|
19717
19788
|
function isArray(val) {
|
19718
19789
|
return val && Array.isArray(val);
|
19719
19790
|
}
|
@@ -19907,9 +19978,6 @@
|
|
19907
19978
|
currentData.splice(indexs[indexsLen - 1], 1);
|
19908
19979
|
return currentData;
|
19909
19980
|
}
|
19910
|
-
function isPromise(val) {
|
19911
|
-
return is(val, "Promise") && isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
19912
|
-
}
|
19913
19981
|
function ensureValidVNode(vnodes) {
|
19914
19982
|
return vnodes.some(
|
19915
19983
|
(vnode) => !vue.isVNode(vnode) || vnode.type !== vue.Comment && !(vnode.type === vue.Fragment && !ensureValidVNode(vnode.children))
|
@@ -19992,7 +20060,8 @@
|
|
19992
20060
|
type: [Number, String]
|
19993
20061
|
},
|
19994
20062
|
size: {
|
19995
|
-
type: String
|
20063
|
+
type: String,
|
20064
|
+
default: "middle"
|
19996
20065
|
},
|
19997
20066
|
bordered: {
|
19998
20067
|
type: Boolean,
|
@@ -20088,6 +20157,10 @@
|
|
20088
20157
|
type: Number,
|
20089
20158
|
default: 59
|
20090
20159
|
},
|
20160
|
+
rowHover: {
|
20161
|
+
type: Boolean,
|
20162
|
+
default: void 0
|
20163
|
+
},
|
20091
20164
|
rowKey: {
|
20092
20165
|
type: [Function, String]
|
20093
20166
|
},
|
@@ -20202,6 +20275,9 @@
|
|
20202
20275
|
"onUpdate:dataSource": {
|
20203
20276
|
type: Function
|
20204
20277
|
},
|
20278
|
+
"onUpdate:columns": {
|
20279
|
+
type: Function
|
20280
|
+
},
|
20205
20281
|
columnEmptyText: {
|
20206
20282
|
type: [String, Boolean],
|
20207
20283
|
default: "-"
|
@@ -20214,6 +20290,7 @@
|
|
20214
20290
|
params: Object,
|
20215
20291
|
defaultData: Array,
|
20216
20292
|
manual: Boolean,
|
20293
|
+
manualRequest: Boolean,
|
20217
20294
|
polling: [Number, Function],
|
20218
20295
|
debounceTime: Number,
|
20219
20296
|
onLoad: {
|
@@ -20285,8 +20362,9 @@
|
|
20285
20362
|
|
20286
20363
|
const mergePropsAndPagination = ({ pagination }, intl) => {
|
20287
20364
|
if (pagination) {
|
20288
|
-
const { current, pageSize, total, showTotal, showSizeChanger } = pagination;
|
20365
|
+
const { current, pageSize, total, showTotal, showSizeChanger, ...rest } = pagination;
|
20289
20366
|
return {
|
20367
|
+
...rest,
|
20290
20368
|
current: current || 1,
|
20291
20369
|
total: total || 0,
|
20292
20370
|
pageSize: pageSize || 10,
|
@@ -20330,19 +20408,16 @@
|
|
20330
20408
|
}
|
20331
20409
|
);
|
20332
20410
|
}
|
20333
|
-
return result.map((item) => {
|
20334
|
-
|
20335
|
-
|
20336
|
-
|
20337
|
-
order: (_a = item.order) == null ? void 0 : _a.toUpperCase()
|
20338
|
-
};
|
20339
|
-
});
|
20411
|
+
return result.map((item) => ({
|
20412
|
+
field: item.field,
|
20413
|
+
order: item.order
|
20414
|
+
}));
|
20340
20415
|
};
|
20341
20416
|
const useFetchData = (getData, props) => {
|
20342
20417
|
var _a;
|
20343
20418
|
const umountRef = vue.ref(false);
|
20344
20419
|
const abortRef = vue.ref(null);
|
20345
|
-
const manualRequestRef = vue.ref(!!props.manual);
|
20420
|
+
const manualRequestRef = vue.ref(!!(props.manual || props.manualRequest));
|
20346
20421
|
const pollingSetTimeRef = vue.ref();
|
20347
20422
|
const pollingLoading = vue.ref(false);
|
20348
20423
|
const keyword = vue.ref("");
|
@@ -20503,16 +20578,13 @@
|
|
20503
20578
|
}
|
20504
20579
|
}
|
20505
20580
|
);
|
20506
|
-
vue.watch(
|
20507
|
-
()
|
20508
|
-
()
|
20509
|
-
|
20510
|
-
|
20511
|
-
if (!props.manual) {
|
20512
|
-
manualRequestRef.value = false;
|
20513
|
-
}
|
20581
|
+
vue.watch([() => props.manual, () => props.manualRequest], () => {
|
20582
|
+
abortFetch();
|
20583
|
+
fetchListDebounce(false);
|
20584
|
+
if (!props.manual || !props.manualRequest) {
|
20585
|
+
manualRequestRef.value = false;
|
20514
20586
|
}
|
20515
|
-
);
|
20587
|
+
});
|
20516
20588
|
vue.watch(
|
20517
20589
|
() => pagination.value.current,
|
20518
20590
|
() => {
|
@@ -20780,7 +20852,7 @@
|
|
20780
20852
|
var _a2;
|
20781
20853
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceKey;
|
20782
20854
|
},
|
20783
|
-
columnsMap,
|
20855
|
+
() => columnsMap.value,
|
20784
20856
|
() => {
|
20785
20857
|
var _a2;
|
20786
20858
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceType;
|
@@ -20841,8 +20913,8 @@
|
|
20841
20913
|
var _a;
|
20842
20914
|
const { columns, counter } = params;
|
20843
20915
|
return (_a = columns == null ? void 0 : columns.map((columnProps, columnsIndex) => {
|
20844
|
-
var _a2, _b;
|
20845
|
-
const { key, dataIndex, disable, valueEnum } = columnProps;
|
20916
|
+
var _a2, _b, _c;
|
20917
|
+
const { key, dataIndex, disable, valueEnum, width } = columnProps;
|
20846
20918
|
const columnKey = genColumnKey(
|
20847
20919
|
// key || (dataIndex ? `${dataIndex.toString()}-${columnsIndex}` : ''),
|
20848
20920
|
key || (dataIndex == null ? void 0 : dataIndex.toString()),
|
@@ -20857,12 +20929,13 @@
|
|
20857
20929
|
...columnProps,
|
20858
20930
|
valueEnum,
|
20859
20931
|
fixed: config.fixed,
|
20860
|
-
|
20932
|
+
width: (_a2 = config.width) != null ? _a2 : width,
|
20933
|
+
disable: (_b = config.disable) != null ? _b : disable,
|
20861
20934
|
// width: columnProps.width || (columnProps.fixed ? 200 : undefined),
|
20862
20935
|
children: columnProps.children ? genProColumnToColumn(
|
20863
20936
|
{
|
20864
20937
|
...params,
|
20865
|
-
columns: (
|
20938
|
+
columns: (_c = columnProps == null ? void 0 : columnProps.children) != null ? _c : []
|
20866
20939
|
},
|
20867
20940
|
{ ...columnProps, key: columnKey }
|
20868
20941
|
) : void 0
|
@@ -24397,6 +24470,7 @@
|
|
24397
24470
|
}
|
24398
24471
|
|
24399
24472
|
const DEFAULT_PAGE_SIZE = 10;
|
24473
|
+
const PAGE_SIZE_OPTIONS = ["5", "10", "20", "50"];
|
24400
24474
|
function getPaginationParam(pagination, mergedPagination) {
|
24401
24475
|
const param = {
|
24402
24476
|
current: mergedPagination.current,
|
@@ -24426,7 +24500,11 @@
|
|
24426
24500
|
return result;
|
24427
24501
|
}
|
24428
24502
|
function usePagination(total, props, mergedData, onChange) {
|
24429
|
-
const innerPagination = vue.reactive({
|
24503
|
+
const innerPagination = vue.reactive({
|
24504
|
+
current: 1,
|
24505
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
24506
|
+
pageSizeOptions: PAGE_SIZE_OPTIONS
|
24507
|
+
});
|
24430
24508
|
const size = vue.computed(() => props.size);
|
24431
24509
|
const mergedPagination = vue.computed(() => {
|
24432
24510
|
const { pagination } = props;
|
@@ -24656,7 +24734,9 @@
|
|
24656
24734
|
if (copyCustomCellProps.rowSpan > 1) {
|
24657
24735
|
mergeCellStyles.height = `${getRowHeight(rowIndex, copyCustomCellProps.rowSpan) - 1}px`;
|
24658
24736
|
}
|
24659
|
-
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24737
|
+
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24738
|
+
style: { ...copyCustomCellProps.style, ...mergeCellStyles }
|
24739
|
+
});
|
24660
24740
|
return cellProps;
|
24661
24741
|
};
|
24662
24742
|
vue.watchEffect(() => {
|
@@ -25681,6 +25761,7 @@
|
|
25681
25761
|
var _a, _b;
|
25682
25762
|
return [
|
25683
25763
|
typeof props.column.title == "function" ? props.column.title({
|
25764
|
+
column: props.column.originColumn,
|
25684
25765
|
sortColumns: sortColumns.value,
|
25685
25766
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
25686
25767
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -25735,7 +25816,7 @@
|
|
25735
25816
|
[`${_ctx.prefixCls}-header-cell-title-inner`]: true
|
25736
25817
|
}),
|
25737
25818
|
title: _ctx.altTitle,
|
25738
|
-
style: vue.normalizeStyle(`
|
25819
|
+
style: vue.normalizeStyle(`justify-content: ${_ctx.column.align}`)
|
25739
25820
|
}, [
|
25740
25821
|
vue.createElementVNode(
|
25741
25822
|
"span",
|
@@ -25781,16 +25862,28 @@
|
|
25781
25862
|
1040
|
25782
25863
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
25783
25864
|
)) : vue.createCommentVNode("v-if", true),
|
25784
|
-
_ctx.column.headerTooltip ? (vue.openBlock(), vue.createBlock(_component_Tooltip, {
|
25785
|
-
|
25786
|
-
|
25787
|
-
|
25865
|
+
_ctx.column.headerTooltip ? (vue.openBlock(), vue.createBlock(_component_Tooltip, { key: 1 }, {
|
25866
|
+
title: vue.withCtx(() => [
|
25867
|
+
_ctx.column.headerTooltip === true ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.title), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
|
25868
|
+
vue.Fragment,
|
25869
|
+
{ key: 1 },
|
25870
|
+
[
|
25871
|
+
vue.createTextVNode(
|
25872
|
+
vue.toDisplayString(_ctx.column.headerTooltip),
|
25873
|
+
1
|
25874
|
+
/* TEXT */
|
25875
|
+
)
|
25876
|
+
],
|
25877
|
+
64
|
25878
|
+
/* STABLE_FRAGMENT */
|
25879
|
+
))
|
25880
|
+
]),
|
25788
25881
|
default: vue.withCtx(() => [
|
25789
25882
|
vue.createVNode(_component_InfoCircleOutlined, { style: { "margin-inline-start": "3px", "font-size": "12px" } })
|
25790
25883
|
]),
|
25791
25884
|
_: 1
|
25792
25885
|
/* STABLE */
|
25793
|
-
}
|
25886
|
+
})) : vue.createCommentVNode("v-if", true)
|
25794
25887
|
], 14, _hoisted_1$d);
|
25795
25888
|
}
|
25796
25889
|
var HeaderCellTitle = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$w]]);
|
@@ -26975,6 +27068,7 @@
|
|
26975
27068
|
var _a, _b;
|
26976
27069
|
return vue.h(vue.Fragment, [
|
26977
27070
|
typeof props.column.title == "function" ? props.column.title({
|
27071
|
+
column: props.column.originColumn,
|
26978
27072
|
sortColumns: sortColumns.value,
|
26979
27073
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
26980
27074
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -28404,28 +28498,29 @@
|
|
28404
28498
|
event: rowDragEvent.value
|
28405
28499
|
});
|
28406
28500
|
}
|
28501
|
+
} else {
|
28502
|
+
return [
|
28503
|
+
vue.createVNode(
|
28504
|
+
"span",
|
28505
|
+
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28506
|
+
null
|
28507
|
+
),
|
28508
|
+
vue.createVNode(
|
28509
|
+
"span",
|
28510
|
+
{
|
28511
|
+
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28512
|
+
style: { maxWidth: `${parentOffsetWidth}px` }
|
28513
|
+
},
|
28514
|
+
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28515
|
+
)
|
28516
|
+
];
|
28407
28517
|
}
|
28408
|
-
return [
|
28409
|
-
vue.createVNode(
|
28410
|
-
"span",
|
28411
|
-
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28412
|
-
null
|
28413
|
-
),
|
28414
|
-
vue.createVNode(
|
28415
|
-
"span",
|
28416
|
-
{
|
28417
|
-
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28418
|
-
style: { maxWidth: `${parentOffsetWidth}px` }
|
28419
|
-
},
|
28420
|
-
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28421
|
-
)
|
28422
|
-
];
|
28423
28518
|
};
|
28424
28519
|
const renderDragGhost = () => {
|
28425
28520
|
if (!dragGhostImage) {
|
28426
28521
|
dragGhostImage = vue.createVNode(renderDragGhostImage);
|
28522
|
+
vue.render(dragGhostImage, dragGhostDom);
|
28427
28523
|
}
|
28428
|
-
vue.render(dragGhostImage, dragGhostDom);
|
28429
28524
|
};
|
28430
28525
|
vue.watch(
|
28431
28526
|
[prefixCls],
|
@@ -28831,7 +28926,7 @@
|
|
28831
28926
|
newValue: modelValue.value,
|
28832
28927
|
oldValue
|
28833
28928
|
});
|
28834
|
-
if (isPromise
|
28929
|
+
if (isPromise(result)) {
|
28835
28930
|
result.then((res) => {
|
28836
28931
|
res && emit("closeEditor", [props.cellKey]);
|
28837
28932
|
}).catch(() => {
|
@@ -29051,7 +29146,7 @@
|
|
29051
29146
|
recordIndexs
|
29052
29147
|
})) != null ? _c2 : value;
|
29053
29148
|
const beforeOpen = (_e2 = (_d2 = tableContext.props) == null ? void 0 : _d2.onBeforeOpenEditor) == null ? void 0 : _e2.call(_d2, cellRenderArgs);
|
29054
|
-
if (isPromise
|
29149
|
+
if (isPromise(beforeOpen)) {
|
29055
29150
|
beforeOpen.then((res) => {
|
29056
29151
|
var _a3, _b3;
|
29057
29152
|
if (res) {
|
@@ -29072,7 +29167,7 @@
|
|
29072
29167
|
...cellRenderArgs,
|
29073
29168
|
oldValue: oldValuesMap.value[key]
|
29074
29169
|
});
|
29075
|
-
if (isPromise
|
29170
|
+
if (isPromise(beforeClose)) {
|
29076
29171
|
beforeClose.then((res) => {
|
29077
29172
|
var _a3, _b3;
|
29078
29173
|
if (res) {
|
@@ -29126,7 +29221,7 @@
|
|
29126
29221
|
color: option.color,
|
29127
29222
|
bordered: false
|
29128
29223
|
},
|
29129
|
-
option.text
|
29224
|
+
() => option.text
|
29130
29225
|
);
|
29131
29226
|
} else {
|
29132
29227
|
cellValue = option.text || emptyText;
|
@@ -29199,7 +29294,7 @@
|
|
29199
29294
|
// }),
|
29200
29295
|
shouldOpen: (isEllipsis) => {
|
29201
29296
|
var _a2;
|
29202
|
-
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) :
|
29297
|
+
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) : true;
|
29203
29298
|
},
|
29204
29299
|
onCellLeave: () => {
|
29205
29300
|
emit("cellLeave");
|
@@ -29831,7 +29926,7 @@
|
|
29831
29926
|
() => (props.type === "center" ? tableContext.centerRowColumnsMap.value.get(props.rowKey) : columns.value).filter((item) => !!item)
|
29832
29927
|
);
|
29833
29928
|
const { tooltipOpen, leftPopupContainer, centerPopupContainer, rightPopupContainer } = useInjectBody();
|
29834
|
-
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey } = useInjectHover();
|
29929
|
+
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey, rowHover } = useInjectHover();
|
29835
29930
|
const popupContainer = vue.computed(
|
29836
29931
|
() => props.type === "left" ? leftPopupContainer.value : props.type === "center" ? centerPopupContainer.value : props.type === "right" ? rightPopupContainer.value : null
|
29837
29932
|
);
|
@@ -29840,7 +29935,7 @@
|
|
29840
29935
|
vue.watch(
|
29841
29936
|
[isRowHover, bodyRow],
|
29842
29937
|
() => {
|
29843
|
-
bodyRow.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29938
|
+
bodyRow.value && rowHover.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29844
29939
|
},
|
29845
29940
|
{ immediate: true, flush: "post" }
|
29846
29941
|
);
|
@@ -29907,7 +30002,7 @@
|
|
29907
30002
|
{
|
29908
30003
|
[`${prefixCls}-row`]: true,
|
29909
30004
|
[`${prefixCls}-row-level-${indent}`]: true,
|
29910
|
-
[`${prefixCls}-row-hover`]: isRowHover.value,
|
30005
|
+
[`${prefixCls}-row-hover`]: isRowHover.value && rowHover.value,
|
29911
30006
|
[`${prefixCls}-row-dragging`]: isDragging.value,
|
29912
30007
|
[`${prefixCls}-row-dragging-insert-target`]: tableContext.insertToRowKey.value === props.rowKey,
|
29913
30008
|
[`${prefixCls}-row-odd`]: !isEven,
|
@@ -30584,8 +30679,7 @@
|
|
30584
30679
|
};
|
30585
30680
|
});
|
30586
30681
|
const bodyViewportStyle = vue.computed(() => ({
|
30587
|
-
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value
|
30588
|
-
// width: `calc(100% + 0px)`,
|
30682
|
+
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value : 0}px)`,
|
30589
30683
|
overflowX: "hidden",
|
30590
30684
|
overflowY: "auto",
|
30591
30685
|
height: "100%"
|
@@ -31871,9 +31965,14 @@
|
|
31871
31965
|
var _a;
|
31872
31966
|
const width = col.width;
|
31873
31967
|
const result = (_a = props.onResizeColumn) == null ? void 0 : _a.call(props, w, col, action);
|
31874
|
-
if (result !== false
|
31875
|
-
|
31876
|
-
|
31968
|
+
if (result !== false) {
|
31969
|
+
if (!(width === w && col.width === w)) {
|
31970
|
+
col.width = width !== col.width ? col.width : w;
|
31971
|
+
vue.triggerRef(rawColumns);
|
31972
|
+
}
|
31973
|
+
if (action === "end") {
|
31974
|
+
emit("update:columns", rawColumns.value, "resize");
|
31975
|
+
}
|
31877
31976
|
}
|
31878
31977
|
},
|
31879
31978
|
onRowDragEnd: (opt) => {
|
@@ -32047,7 +32146,7 @@
|
|
32047
32146
|
rawColumns.value.splice(index, 1);
|
32048
32147
|
}
|
32049
32148
|
vue.triggerRef(rawColumns);
|
32050
|
-
emit("update:columns", rawColumns.value);
|
32149
|
+
emit("update:columns", rawColumns.value, "drag");
|
32051
32150
|
};
|
32052
32151
|
if (isPromise(dragEnd)) {
|
32053
32152
|
dragEnd.then(() => {
|
@@ -33288,10 +33387,18 @@
|
|
33288
33387
|
class: vue.normalizeClass(`${_ctx.prefixCls}-toolbar-options`)
|
33289
33388
|
}, {
|
33290
33389
|
default: vue.withCtx(() => [
|
33291
|
-
_ctx.mergeOptions.search !== false && !(!!_ctx.title || !!_ctx.$slots.title) ? (vue.openBlock(), vue.
|
33292
|
-
|
33293
|
-
|
33294
|
-
|
33390
|
+
_ctx.mergeOptions.search !== false && !(!!_ctx.title || !!_ctx.$slots.title) ? (vue.openBlock(), vue.createElementBlock(
|
33391
|
+
vue.Fragment,
|
33392
|
+
{ key: 0 },
|
33393
|
+
[
|
33394
|
+
vue.createVNode(_component_ProSearch, vue.mergeProps(_ctx.searchConfig, { onSearch: _ctx.onSearch }), null, 16, ["onSearch"]),
|
33395
|
+
vue.renderSlot(_ctx.$slots, "searchExtra", {
|
33396
|
+
setParams: _ctx.actionsRef.setParams
|
33397
|
+
})
|
33398
|
+
],
|
33399
|
+
64
|
33400
|
+
/* STABLE_FRAGMENT */
|
33401
|
+
)) : vue.createCommentVNode("v-if", true)
|
33295
33402
|
]),
|
33296
33403
|
_: 3
|
33297
33404
|
/* FORWARDED */
|
@@ -33310,7 +33417,18 @@
|
|
33310
33417
|
class: vue.normalizeClass(`${_ctx.prefixCls}-toolbar-actions`)
|
33311
33418
|
}, {
|
33312
33419
|
default: vue.withCtx(() => [
|
33313
|
-
_ctx.mergeOptions.search !== false && (!!_ctx.title || !!_ctx.$slots.title) ? (vue.openBlock(), vue.
|
33420
|
+
_ctx.mergeOptions.search !== false && (!!_ctx.title || !!_ctx.$slots.title) ? (vue.openBlock(), vue.createElementBlock(
|
33421
|
+
vue.Fragment,
|
33422
|
+
{ key: 0 },
|
33423
|
+
[
|
33424
|
+
vue.createVNode(_component_ProSearch, vue.mergeProps(_ctx.searchConfig, { onSearch: _ctx.onSearch }), null, 16, ["onSearch"]),
|
33425
|
+
vue.renderSlot(_ctx.$slots, "searchExtra", {
|
33426
|
+
setParams: _ctx.actionsRef.setParams
|
33427
|
+
})
|
33428
|
+
],
|
33429
|
+
64
|
33430
|
+
/* STABLE_FRAGMENT */
|
33431
|
+
)) : vue.createCommentVNode("v-if", true),
|
33314
33432
|
vue.renderSlot(_ctx.$slots, "actions", {
|
33315
33433
|
setParams: _ctx.actionsRef.setParams
|
33316
33434
|
}),
|
@@ -33629,7 +33747,8 @@
|
|
33629
33747
|
const {
|
33630
33748
|
hoverRowKey
|
33631
33749
|
} = useProvideHover({
|
33632
|
-
rowHoverDelay: vue.computed(() => props.rowHoverDelay)
|
33750
|
+
rowHoverDelay: vue.computed(() => props.rowHoverDelay),
|
33751
|
+
rowHover: vue.computed(() => props.rowHover)
|
33633
33752
|
});
|
33634
33753
|
const mergedPrefixCls = vue.computed(() => {
|
33635
33754
|
var _a2;
|
@@ -33673,10 +33792,7 @@
|
|
33673
33792
|
if (props.pagination === false) {
|
33674
33793
|
return false;
|
33675
33794
|
}
|
33676
|
-
|
33677
|
-
return Object.assign({}, pagination.value, props.pagination);
|
33678
|
-
}
|
33679
|
-
return Object.assign({}, props.pagination, pagination.value);
|
33795
|
+
return pagination.value;
|
33680
33796
|
});
|
33681
33797
|
const formSubmitLoading = vue.computed(() => {
|
33682
33798
|
if (typeof loading.value === "boolean") {
|
@@ -33738,9 +33854,44 @@
|
|
33738
33854
|
};
|
33739
33855
|
return loopFilter(tableColumn.value);
|
33740
33856
|
});
|
33857
|
+
const onColumnsChange = (rawColumns, action) => {
|
33858
|
+
var _a2;
|
33859
|
+
const newMap = {
|
33860
|
+
...counter.columnsMap.value
|
33861
|
+
};
|
33862
|
+
const newColumns = rawColumns.map((item) => genColumnKey(item.key, item.index));
|
33863
|
+
if (action === "resize") {
|
33864
|
+
const loopSetWidth = (rawColumns2) => {
|
33865
|
+
rawColumns2.forEach((item) => {
|
33866
|
+
var _a3;
|
33867
|
+
const key = genColumnKey(item.key, item.index);
|
33868
|
+
const newSetting = {
|
33869
|
+
...newMap[key]
|
33870
|
+
};
|
33871
|
+
if ((_a3 = item.children) == null ? void 0 : _a3.length) {
|
33872
|
+
loopSetWidth(item.children);
|
33873
|
+
} else {
|
33874
|
+
newSetting.width = item.width;
|
33875
|
+
newMap[key] = newSetting;
|
33876
|
+
}
|
33877
|
+
});
|
33878
|
+
};
|
33879
|
+
loopSetWidth(rawColumns);
|
33880
|
+
} else {
|
33881
|
+
newColumns.forEach((key, order) => {
|
33882
|
+
newMap[key] = {
|
33883
|
+
...newMap[key] || {},
|
33884
|
+
order
|
33885
|
+
};
|
33886
|
+
});
|
33887
|
+
}
|
33888
|
+
counter.setColumnsMap(newMap);
|
33889
|
+
counter.setSortKeyColumns(newColumns);
|
33890
|
+
(_a2 = props["onUpdate:columns"]) == null ? void 0 : _a2.call(props, rawColumns, action);
|
33891
|
+
};
|
33741
33892
|
const formItems = vue.computed(() => {
|
33742
33893
|
var _a2, _b, _c;
|
33743
|
-
if (
|
33894
|
+
if (props.search === false) {
|
33744
33895
|
return [];
|
33745
33896
|
}
|
33746
33897
|
if ((_b = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
|
@@ -33752,12 +33903,12 @@
|
|
33752
33903
|
}
|
33753
33904
|
return true;
|
33754
33905
|
}).map((item) => {
|
33755
|
-
return {
|
33906
|
+
return omitKeysAndUndefined({
|
33756
33907
|
...item,
|
33757
33908
|
width: void 0,
|
33758
33909
|
tooltip: item.headerTooltip,
|
33759
33910
|
name: item.dataIndex
|
33760
|
-
};
|
33911
|
+
}, ["dataIndex", "width"]);
|
33761
33912
|
});
|
33762
33913
|
});
|
33763
33914
|
const preserveRecordsRef = vue.ref(/* @__PURE__ */ new Map());
|
@@ -33774,8 +33925,8 @@
|
|
33774
33925
|
}
|
33775
33926
|
onCleanSelected();
|
33776
33927
|
});
|
33777
|
-
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0, {
|
33778
|
-
value: vue.computed(() => props.rowSelection ? props.rowSelection.selectedRowKeys : void 0)
|
33928
|
+
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.selectedRowKeys || (props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0), {
|
33929
|
+
value: vue.computed(() => props.selectedRowKeys || (props.rowSelection ? props.rowSelection.selectedRowKeys : void 0))
|
33779
33930
|
});
|
33780
33931
|
const rowSelection = vue.computed(() => ({
|
33781
33932
|
selectedRowKeys: selectedRowKeys.value,
|
@@ -33912,7 +34063,7 @@
|
|
33912
34063
|
actions: slots.alertActions
|
33913
34064
|
}), vue.createVNode(InteralTable, vue.mergeProps({
|
33914
34065
|
"ref": table
|
33915
|
-
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys"]), {
|
34066
|
+
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys", "onUpdate:columns"]), {
|
33916
34067
|
"prefixCls": mergedPrefixCls.value,
|
33917
34068
|
"columns": mergeColumns || [],
|
33918
34069
|
"size": counter.tableSize.value,
|
@@ -33923,7 +34074,8 @@
|
|
33923
34074
|
"expandIcon": expandIcon,
|
33924
34075
|
"expandedRowRender": expandedRowRender,
|
33925
34076
|
"hasContextmenuPopup": !!slots.contextmenuPopup,
|
33926
|
-
"onChange": onTableChange
|
34077
|
+
"onChange": onTableChange,
|
34078
|
+
"onUpdate:columns": onColumnsChange
|
33927
34079
|
}), {
|
33928
34080
|
...slots,
|
33929
34081
|
footer: props.footer || slots.footer
|
@@ -33952,7 +34104,7 @@
|
|
33952
34104
|
"tableShowCard": props.cardProps !== false,
|
33953
34105
|
"loading": formSubmitLoading.value,
|
33954
34106
|
"beforeSearchSubmit": props.beforeSearchSubmit,
|
33955
|
-
"manual": props.manual,
|
34107
|
+
"manual": props.manual || props.manualRequest,
|
33956
34108
|
"onReset": props.onReset,
|
33957
34109
|
"onSubmit": props.onSubmit,
|
33958
34110
|
"onFormSearchSubmit": onFormSearchSubmit,
|
@@ -34793,6 +34945,10 @@
|
|
34793
34945
|
colProps: {
|
34794
34946
|
type: Object,
|
34795
34947
|
default: void 0
|
34948
|
+
},
|
34949
|
+
grid: {
|
34950
|
+
type: Boolean,
|
34951
|
+
default: void 0
|
34796
34952
|
}
|
34797
34953
|
},
|
34798
34954
|
setup(props, {
|
@@ -34806,9 +34962,13 @@
|
|
34806
34962
|
var _a;
|
34807
34963
|
return (_a = props.colProps) != null ? _a : colProps == null ? void 0 : colProps.value;
|
34808
34964
|
});
|
34965
|
+
const mergeGrid = vue.computed(() => {
|
34966
|
+
var _a;
|
34967
|
+
return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
|
34968
|
+
});
|
34809
34969
|
return () => {
|
34810
34970
|
var _a;
|
34811
|
-
if (
|
34971
|
+
if (mergeGrid.value) {
|
34812
34972
|
return vue.createVNode(antDesignVue.Col, mergeColProps.value, {
|
34813
34973
|
default: () => {
|
34814
34974
|
var _a2;
|
@@ -34830,7 +34990,7 @@
|
|
34830
34990
|
default: void 0
|
34831
34991
|
},
|
34832
34992
|
tooltip: {
|
34833
|
-
type: String,
|
34993
|
+
type: [String, Boolean],
|
34834
34994
|
default: ""
|
34835
34995
|
}
|
34836
34996
|
},
|
@@ -34848,12 +35008,17 @@
|
|
34848
35008
|
"props": {
|
34849
35009
|
formData: formData.value
|
34850
35010
|
}
|
34851
|
-
}, null)]), props.tooltip && vue.createVNode(antDesignVue.Tooltip, {
|
34852
|
-
"title": props.tooltip
|
34853
|
-
}, {
|
35011
|
+
}, null)]), props.tooltip && vue.createVNode(antDesignVue.Tooltip, null, {
|
34854
35012
|
default: () => [vue.createVNode(QuestionCircleOutlined, {
|
34855
|
-
"class": `${prefixCls}-item-tooltip
|
34856
|
-
|
35013
|
+
"class": `${prefixCls}-item-tooltip`,
|
35014
|
+
"style": "margin-right: 3px"
|
35015
|
+
}, null)],
|
35016
|
+
title: () => props.tooltip === true ? vue.createVNode(RenderVNode$1, {
|
35017
|
+
"vnode": title.value,
|
35018
|
+
"props": {
|
35019
|
+
formData: formData.value
|
35020
|
+
}
|
35021
|
+
}, null) : props.tooltip
|
34857
35022
|
})]);
|
34858
35023
|
}
|
34859
35024
|
});
|
@@ -34870,7 +35035,7 @@
|
|
34870
35035
|
default: void 0
|
34871
35036
|
},
|
34872
35037
|
tooltip: {
|
34873
|
-
type: String,
|
35038
|
+
type: [String, Boolean],
|
34874
35039
|
default: void 0
|
34875
35040
|
},
|
34876
35041
|
colProps: {
|
@@ -34974,25 +35139,18 @@
|
|
34974
35139
|
function useFieldValue({
|
34975
35140
|
namePath,
|
34976
35141
|
initialValue,
|
34977
|
-
convertValue
|
34978
|
-
transform
|
35142
|
+
convertValue
|
34979
35143
|
}) {
|
34980
35144
|
const fieldValue = vue.shallowRef();
|
34981
|
-
const { formData, initialValues
|
35145
|
+
const { formData, initialValues } = useInjectForm();
|
34982
35146
|
const modelValue = vue.computed(() => get(formData.value, namePath.value));
|
34983
35147
|
const onValueChange = (value) => {
|
34984
|
-
set(
|
34985
|
-
formData.value,
|
34986
|
-
namePath.value,
|
34987
|
-
transform ? transform(value, namePath.value, formData.value) : value
|
34988
|
-
);
|
35148
|
+
set(formData.value, namePath.value, value);
|
34989
35149
|
};
|
34990
35150
|
vue.watch(
|
34991
35151
|
modelValue,
|
34992
35152
|
(newValue) => {
|
34993
|
-
fieldValue.value = cloneDeep(
|
34994
|
-
convertValue ? convertValue(newValue, namePath.value) : newValue
|
34995
|
-
);
|
35153
|
+
fieldValue.value = cloneDeep(newValue);
|
34996
35154
|
},
|
34997
35155
|
{
|
34998
35156
|
immediate: true,
|
@@ -35001,11 +35159,14 @@
|
|
35001
35159
|
);
|
35002
35160
|
const initFieldInitialValue = () => {
|
35003
35161
|
var _a;
|
35004
|
-
if (
|
35005
|
-
|
35162
|
+
if (
|
35163
|
+
// !mountedRef.value &&
|
35164
|
+
typeof modelValue.value === "undefined" && typeof initialValue !== "undefined"
|
35165
|
+
) {
|
35166
|
+
const value = convertValue ? convertValue(initialValue, namePath.value) : initialValue;
|
35006
35167
|
set(formData.value, namePath.value, cloneDeep(value));
|
35007
|
-
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(
|
35008
|
-
fieldValue.value =
|
35168
|
+
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(initialValue));
|
35169
|
+
fieldValue.value = value;
|
35009
35170
|
}
|
35010
35171
|
};
|
35011
35172
|
initFieldInitialValue();
|
@@ -35034,7 +35195,7 @@
|
|
35034
35195
|
default: void 0
|
35035
35196
|
},
|
35036
35197
|
tooltip: {
|
35037
|
-
type: String,
|
35198
|
+
type: [String, Boolean],
|
35038
35199
|
default: void 0
|
35039
35200
|
},
|
35040
35201
|
colProps: {
|
@@ -35448,7 +35609,7 @@
|
|
35448
35609
|
default: void 0
|
35449
35610
|
},
|
35450
35611
|
tooltip: {
|
35451
|
-
type: String,
|
35612
|
+
type: [String, Boolean],
|
35452
35613
|
default: void 0
|
35453
35614
|
},
|
35454
35615
|
readonly: {
|
@@ -35715,7 +35876,7 @@
|
|
35715
35876
|
default: void 0
|
35716
35877
|
},
|
35717
35878
|
tooltip: {
|
35718
|
-
type: String,
|
35879
|
+
type: [String, Boolean],
|
35719
35880
|
default: void 0
|
35720
35881
|
},
|
35721
35882
|
colProps: {
|
@@ -36545,6 +36706,10 @@
|
|
36545
36706
|
item: {
|
36546
36707
|
type: Object,
|
36547
36708
|
default: () => ({})
|
36709
|
+
},
|
36710
|
+
grid: {
|
36711
|
+
type: Boolean,
|
36712
|
+
default: void 0
|
36548
36713
|
}
|
36549
36714
|
},
|
36550
36715
|
setup(props) {
|
@@ -36579,6 +36744,10 @@
|
|
36579
36744
|
transform: props.item.transform
|
36580
36745
|
});
|
36581
36746
|
const fieldRef = vue.ref();
|
36747
|
+
const mergeGrid = vue.computed(() => {
|
36748
|
+
var _a;
|
36749
|
+
return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
|
36750
|
+
});
|
36582
36751
|
const fieldType = vue.computed(() => {
|
36583
36752
|
var _a;
|
36584
36753
|
return (_a = props.item.fieldType) != null ? _a : "text";
|
@@ -36635,7 +36804,7 @@
|
|
36635
36804
|
disabled: ((_e = runFunction((_d = props.item.disabled) != null ? _d : baseProps == null ? void 0 : baseProps.disabled, formData.value, rowData == null ? void 0 : rowData.value)) != null ? _e : allDisabledKeys.value.includes(props.item.key)) ? true : void 0,
|
36636
36805
|
placeholder: (_f = props.item.placeholder) != null ? _f : baseProps == null ? void 0 : baseProps.placeholder,
|
36637
36806
|
options: (_h = (_g = props.item.options) != null ? _g : baseProps == null ? void 0 : baseProps.options) != null ? _h : baseProps == null ? void 0 : baseProps.treeData,
|
36638
|
-
allowClear: (_j = (_i = props.item.allowClear) != null ? _i : baseProps == null ? void 0 : baseProps.allowClear) != null ? _j :
|
36807
|
+
allowClear: (_j = (_i = props.item.allowClear) != null ? _i : baseProps == null ? void 0 : baseProps.allowClear) != null ? _j : true
|
36639
36808
|
};
|
36640
36809
|
return omitUndefined({
|
36641
36810
|
valueEnum: props.item.valueEnum,
|
@@ -36661,7 +36830,7 @@
|
|
36661
36830
|
};
|
36662
36831
|
if (props.item.width && !fieldWidthSizeMap[props.item.width]) {
|
36663
36832
|
newStyle.width = isNumber$2(props.item.width) ? props.item.width + "px" : props.item.width;
|
36664
|
-
} else if (
|
36833
|
+
} else if (mergeGrid == null ? void 0 : mergeGrid.value) {
|
36665
36834
|
newStyle.maxWidth = "100%";
|
36666
36835
|
newStyle.width = "100%";
|
36667
36836
|
}
|
@@ -36701,12 +36870,14 @@
|
|
36701
36870
|
}, [vue.createVNode(FormTitle, {
|
36702
36871
|
"title": props.item.title,
|
36703
36872
|
"tooltip": props.item.tooltip
|
36704
|
-
}, null)]), vue.createVNode(
|
36873
|
+
}, null)]), vue.createVNode("div", {
|
36874
|
+
"class": `${prefixCls}-item-title-extra`
|
36875
|
+
}, [vue.createVNode(RenderVNode$1, {
|
36705
36876
|
"vnode": extraRender,
|
36706
36877
|
"props": {
|
36707
36878
|
formData: formData.value
|
36708
36879
|
}
|
36709
|
-
}, null)]);
|
36880
|
+
}, null)])]);
|
36710
36881
|
}
|
36711
36882
|
return temp;
|
36712
36883
|
});
|
@@ -36753,19 +36924,6 @@
|
|
36753
36924
|
});
|
36754
36925
|
return () => {
|
36755
36926
|
var _a, _b;
|
36756
|
-
const render = getSlot(props.item.render, formSlotsContext);
|
36757
|
-
if (render) {
|
36758
|
-
return vue.createVNode(FormColWrapper, {
|
36759
|
-
"colProps": props.item.colProps
|
36760
|
-
}, {
|
36761
|
-
default: () => [vue.createVNode(RenderVNode$1, {
|
36762
|
-
"vnode": render,
|
36763
|
-
"props": {
|
36764
|
-
formData: formData.value
|
36765
|
-
}
|
36766
|
-
}, null)]
|
36767
|
-
});
|
36768
|
-
}
|
36769
36927
|
const renderFormItem = getSlot(props.item.renderFormItem, formSlotsContext);
|
36770
36928
|
const extraRender = getSlot((_a = props.item.extra) == null ? void 0 : _a.item, formSlotsContext);
|
36771
36929
|
const FieldComponent = (_b = fieldComponentMap[fieldType.value]) != null ? _b : fieldComponentMap["text"];
|
@@ -36793,22 +36951,33 @@
|
|
36793
36951
|
if (extraRender) {
|
36794
36952
|
defaultDom = vue.createVNode("div", {
|
36795
36953
|
"style": "display: flex; flex-direction: row; justify-content: flex-start; align-items: center;"
|
36796
|
-
}, [defaultDom, vue.createVNode(
|
36954
|
+
}, [defaultDom, vue.createVNode("div", {
|
36955
|
+
"style": "margin-inline-start: 5px; flex-shrink: 0;"
|
36956
|
+
}, [vue.createVNode(RenderVNode$1, {
|
36797
36957
|
"vnode": extraRender,
|
36798
36958
|
"props": {
|
36799
36959
|
formData: formData.value,
|
36800
36960
|
listName: listName == null ? void 0 : listName.value,
|
36801
36961
|
name: props.item.name
|
36802
36962
|
}
|
36803
|
-
}, null)]);
|
36963
|
+
}, null)])]);
|
36804
36964
|
}
|
36965
|
+
const formItemDom = vue.createVNode(antDesignVue.Form.Item, restItemProps.value, {
|
36966
|
+
default: () => [defaultDom],
|
36967
|
+
...slotsGetter.value
|
36968
|
+
});
|
36969
|
+
const render = getSlot(props.item.render, formSlotsContext);
|
36805
36970
|
return vue.createVNode(FormColWrapper, {
|
36806
|
-
"colProps": props.item.colProps
|
36971
|
+
"colProps": props.item.colProps,
|
36972
|
+
"grid": mergeGrid.value
|
36807
36973
|
}, {
|
36808
|
-
default: () => [vue.createVNode(
|
36809
|
-
|
36810
|
-
|
36811
|
-
|
36974
|
+
default: () => [render ? vue.createVNode(RenderVNode$1, {
|
36975
|
+
"vnode": render,
|
36976
|
+
"props": {
|
36977
|
+
formData: formData.value,
|
36978
|
+
defaultDom: formItemDom
|
36979
|
+
}
|
36980
|
+
}, null) : formItemDom]
|
36812
36981
|
});
|
36813
36982
|
};
|
36814
36983
|
}
|