pro-design-vue 1.0.0-rc.8 → 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 +503 -232
- 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 +503 -232
- 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 +23 -15
- 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 -2
- package/es/components/form/src/hooks/useAction.mjs +137 -12
- 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/DrawerForm.mjs +8 -12
- package/es/components/form/src/layouts/DrawerForm.mjs.map +1 -1
- package/es/components/form/src/layouts/ModalForm.d.ts +1 -1
- package/es/components/form/src/layouts/ModalForm.mjs +8 -12
- package/es/components/form/src/layouts/ModalForm.mjs.map +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 +29 -16
- 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 +70 -26
- 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 +21 -13
- 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 -2
- package/lib/components/form/src/hooks/useAction.js +137 -10
- 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/DrawerForm.js +8 -12
- package/lib/components/form/src/layouts/DrawerForm.js.map +1 -1
- package/lib/components/form/src/layouts/ModalForm.d.ts +1 -1
- package/lib/components/form/src/layouts/ModalForm.js +8 -12
- package/lib/components/form/src/layouts/ModalForm.js.map +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 +29 -16
- 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 +70 -26
- 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 },
|
@@ -15754,10 +15754,133 @@
|
|
15754
15754
|
return isString$1(namePath) ? namePath.indexOf(".") > -1 ? namePath.split(".") : [namePath] : namePath;
|
15755
15755
|
};
|
15756
15756
|
|
15757
|
-
|
15758
|
-
|
15759
|
-
|
15760
|
-
return
|
15757
|
+
function isPlainObj(itemValue) {
|
15758
|
+
if (typeof itemValue !== "object") return false;
|
15759
|
+
if (itemValue === null) return true;
|
15760
|
+
if (isValidElement$1(itemValue)) return false;
|
15761
|
+
if (itemValue.constructor === RegExp) return false;
|
15762
|
+
if (itemValue instanceof Map) return false;
|
15763
|
+
if (itemValue instanceof Set) return false;
|
15764
|
+
if (itemValue instanceof HTMLElement) return false;
|
15765
|
+
if (itemValue instanceof Blob) return false;
|
15766
|
+
if (itemValue instanceof File) return false;
|
15767
|
+
if (Array.isArray(itemValue)) return false;
|
15768
|
+
return true;
|
15769
|
+
}
|
15770
|
+
const transformKeySubmitValue = (values, transformerMap, paramsOmitNil) => {
|
15771
|
+
if (Object.keys(values).length < 1) {
|
15772
|
+
return values;
|
15773
|
+
}
|
15774
|
+
if (typeof window === "undefined") return values;
|
15775
|
+
if (typeof values !== "object" || isNil(values) || values instanceof Blob) {
|
15776
|
+
return values;
|
15777
|
+
}
|
15778
|
+
let finalValues = Array.isArray(values) ? [] : {};
|
15779
|
+
const gen = (tempValues, parentsKey) => {
|
15780
|
+
const isArrayValues = Array.isArray(tempValues);
|
15781
|
+
let result = isArrayValues ? [] : {};
|
15782
|
+
if (tempValues == null || tempValues === void 0) {
|
15783
|
+
return result;
|
15784
|
+
}
|
15785
|
+
Object.keys(tempValues).forEach((entityKey) => {
|
15786
|
+
var _a;
|
15787
|
+
const transformForArray = (transformList, subItemValue) => {
|
15788
|
+
if (!Array.isArray(transformList)) return entityKey;
|
15789
|
+
transformList.forEach((transform2, idx) => {
|
15790
|
+
if (!transform2) return;
|
15791
|
+
const subTransformItem = subItemValue == null ? void 0 : subItemValue[idx];
|
15792
|
+
if (typeof transform2 === "function") {
|
15793
|
+
subItemValue[idx] = transform2(subItemValue, entityKey, tempValues);
|
15794
|
+
}
|
15795
|
+
if (typeof transform2 === "object" && !Array.isArray(transform2)) {
|
15796
|
+
Object.keys(transform2).forEach((transformArrayItem) => {
|
15797
|
+
const subTransformItemValue = subTransformItem == null ? void 0 : subTransformItem[transformArrayItem];
|
15798
|
+
if (typeof transform2[transformArrayItem] === "function" && subTransformItemValue) {
|
15799
|
+
const res = transform2[transformArrayItem](
|
15800
|
+
subTransformItem[transformArrayItem],
|
15801
|
+
entityKey,
|
15802
|
+
tempValues
|
15803
|
+
);
|
15804
|
+
subTransformItem[transformArrayItem] = typeof res === "object" ? res[transformArrayItem] : res;
|
15805
|
+
} else if (typeof transform2[transformArrayItem] === "object" && Array.isArray(transform2[transformArrayItem]) && subTransformItemValue) {
|
15806
|
+
transformForArray(transform2[transformArrayItem], subTransformItemValue);
|
15807
|
+
}
|
15808
|
+
});
|
15809
|
+
}
|
15810
|
+
if (typeof transform2 === "object" && Array.isArray(transform2) && subTransformItem) {
|
15811
|
+
transformForArray(transform2, subTransformItem);
|
15812
|
+
}
|
15813
|
+
});
|
15814
|
+
return entityKey;
|
15815
|
+
};
|
15816
|
+
const itemValue = tempValues[entityKey];
|
15817
|
+
const transformFunction = (_a = transformerMap.get(entityKey)) == null ? void 0 : _a.transform;
|
15818
|
+
const transform = () => {
|
15819
|
+
let tempKey, transformedResult, isTransformedResultPrimitive = false;
|
15820
|
+
if (typeof transformFunction === "function") {
|
15821
|
+
transformedResult = transformFunction == null ? void 0 : transformFunction(itemValue, entityKey, tempValues);
|
15822
|
+
const typeOfResult = typeof transformedResult;
|
15823
|
+
if (typeOfResult !== "object" && typeOfResult !== "undefined") {
|
15824
|
+
tempKey = entityKey;
|
15825
|
+
isTransformedResultPrimitive = true;
|
15826
|
+
} else {
|
15827
|
+
tempKey = transformedResult;
|
15828
|
+
}
|
15829
|
+
} else {
|
15830
|
+
tempKey = transformForArray(transformFunction, itemValue);
|
15831
|
+
}
|
15832
|
+
if (Array.isArray(tempKey)) {
|
15833
|
+
result = set(result, tempKey, itemValue);
|
15834
|
+
return;
|
15835
|
+
}
|
15836
|
+
if (typeof tempKey === "object" && !Array.isArray(finalValues)) {
|
15837
|
+
finalValues = merge(finalValues, tempKey);
|
15838
|
+
} else if (typeof tempKey === "object" && Array.isArray(finalValues)) {
|
15839
|
+
result = { ...result, ...tempKey };
|
15840
|
+
} else if (tempKey !== null || tempKey !== void 0) {
|
15841
|
+
result = set(
|
15842
|
+
result,
|
15843
|
+
[tempKey],
|
15844
|
+
isTransformedResultPrimitive ? transformedResult : itemValue
|
15845
|
+
);
|
15846
|
+
}
|
15847
|
+
};
|
15848
|
+
if (transformFunction && typeof transformFunction === "function") {
|
15849
|
+
transform();
|
15850
|
+
}
|
15851
|
+
if (typeof window === "undefined") return;
|
15852
|
+
if (isPlainObj(itemValue)) {
|
15853
|
+
const genValues = gen(itemValue);
|
15854
|
+
if (Object.keys(genValues).length < 1) {
|
15855
|
+
return;
|
15856
|
+
}
|
15857
|
+
result = set(result, [entityKey], genValues);
|
15858
|
+
return;
|
15859
|
+
}
|
15860
|
+
transform();
|
15861
|
+
});
|
15862
|
+
return paramsOmitNil ? result : tempValues;
|
15863
|
+
};
|
15864
|
+
finalValues = Array.isArray(values) && Array.isArray(finalValues) ? [...gen(values)] : merge({}, gen(values), finalValues);
|
15865
|
+
return finalValues;
|
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;
|
15761
15884
|
};
|
15762
15885
|
function useAction({
|
15763
15886
|
props,
|
@@ -15765,6 +15888,7 @@
|
|
15765
15888
|
formData,
|
15766
15889
|
initialValues,
|
15767
15890
|
hasInitial,
|
15891
|
+
transformerMap,
|
15768
15892
|
onFinish,
|
15769
15893
|
onReset,
|
15770
15894
|
onFinishFailed
|
@@ -15793,20 +15917,20 @@
|
|
15793
15917
|
if (!namePath) throw new Error("name is require");
|
15794
15918
|
const value = get(formData.value, namePath);
|
15795
15919
|
const obj = set({}, namePath, value);
|
15796
|
-
return get(
|
15920
|
+
return get(transformKeySubmitValue(obj, transformerMap.value, props.omitNil), namePath);
|
15797
15921
|
};
|
15798
15922
|
const getFieldFormatValueObject = (name) => {
|
15799
15923
|
const namePath = covertFormName(name);
|
15800
15924
|
if (!namePath) throw new Error("name is require");
|
15801
15925
|
const value = get(formData.value, namePath);
|
15802
15926
|
const obj = set({}, namePath, value);
|
15803
|
-
return
|
15927
|
+
return transformKeySubmitValue(obj, transformerMap.value, props.omitNil);
|
15804
15928
|
};
|
15805
15929
|
const validateFieldsReturnFormatValue = async (nameList) => {
|
15806
15930
|
var _a;
|
15807
15931
|
if (!Array.isArray(nameList) && nameList) throw new Error("nameList must be array");
|
15808
15932
|
const values = await ((_a = formRef.value) == null ? void 0 : _a.validateFields(nameList));
|
15809
|
-
const transformedKey =
|
15933
|
+
const transformedKey = transformKeySubmitValue(values, transformerMap.value, props.omitNil);
|
15810
15934
|
return transformedKey != null ? transformedKey : {};
|
15811
15935
|
};
|
15812
15936
|
const setFieldValue = (name, value) => {
|
@@ -15832,10 +15956,10 @@
|
|
15832
15956
|
var _a;
|
15833
15957
|
hasInitial.value = true;
|
15834
15958
|
(_a = formRef.value) == null ? void 0 : _a.clearValidate();
|
15835
|
-
formData.value = cloneDeep(initialValues.value);
|
15959
|
+
formData.value = cloneDeep(convertKeyInitialValue(initialValues.value, transformerMap.value));
|
15836
15960
|
Promise.resolve().then(() => {
|
15837
15961
|
hasInitial.value = false;
|
15838
|
-
onReset == null ? void 0 : onReset(formData.value);
|
15962
|
+
onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, transformerMap.value, props.omitNil));
|
15839
15963
|
});
|
15840
15964
|
};
|
15841
15965
|
const resetField = (name) => {
|
@@ -16045,7 +16169,8 @@
|
|
16045
16169
|
}
|
16046
16170
|
return vue.createVNode(FormItem$2, {
|
16047
16171
|
"key": item.key,
|
16048
|
-
"item": item
|
16172
|
+
"item": item,
|
16173
|
+
"grid": mergeGrid.value
|
16049
16174
|
}, null);
|
16050
16175
|
});
|
16051
16176
|
});
|
@@ -16109,15 +16234,33 @@
|
|
16109
16234
|
action
|
16110
16235
|
} = useInjectForm();
|
16111
16236
|
const formSlotsContext = useInjectSlots$1();
|
16112
|
-
const submit = () => {
|
16237
|
+
const submit = async () => {
|
16113
16238
|
var _a;
|
16114
|
-
|
16115
|
-
|
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;
|
16116
16250
|
};
|
16117
|
-
const reset = () => {
|
16118
|
-
var _a
|
16119
|
-
(
|
16120
|
-
|
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;
|
16121
16264
|
};
|
16122
16265
|
const resetButton = vue.computed(() => {
|
16123
16266
|
const {
|
@@ -16199,6 +16342,26 @@
|
|
16199
16342
|
}
|
16200
16343
|
});
|
16201
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
|
+
|
16202
16365
|
function _isSlot$5(s) {
|
16203
16366
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
16204
16367
|
}
|
@@ -16215,6 +16378,7 @@
|
|
16215
16378
|
attrs
|
16216
16379
|
}) {
|
16217
16380
|
const mountedRef = vue.ref(false);
|
16381
|
+
const transformerMap = vue.shallowRef(/* @__PURE__ */ new Map());
|
16218
16382
|
const formRef = vue.ref();
|
16219
16383
|
const prefixCls = usePrefixCls("form");
|
16220
16384
|
const formData = vue.ref({});
|
@@ -16223,7 +16387,7 @@
|
|
16223
16387
|
var _a;
|
16224
16388
|
return (_a = props.formKey) != null ? _a : requestFormCacheId.toString();
|
16225
16389
|
});
|
16226
|
-
const [loading,
|
16390
|
+
const [loading, setLoading] = useMergedState$1(false, {
|
16227
16391
|
value: vue.computed(() => props.loading),
|
16228
16392
|
onChange: (val) => {
|
16229
16393
|
var _a;
|
@@ -16268,8 +16432,9 @@
|
|
16268
16432
|
});
|
16269
16433
|
};
|
16270
16434
|
vue.watch(() => props.items, () => {
|
16271
|
-
var _a;
|
16272
|
-
|
16435
|
+
var _a, _b;
|
16436
|
+
transformerMap.value = transformer((_a = props.items) != null ? _a : []);
|
16437
|
+
formItems.value = formatItems((_b = props.items) != null ? _b : []);
|
16273
16438
|
}, {
|
16274
16439
|
immediate: true
|
16275
16440
|
});
|
@@ -16280,7 +16445,7 @@
|
|
16280
16445
|
} = useInitialValues(props);
|
16281
16446
|
vue.watch(initialValues, (newValues, oldValues) => {
|
16282
16447
|
if (!isEqual(newValues, oldValues)) {
|
16283
|
-
formData.value = cloneDeep(newValues);
|
16448
|
+
formData.value = cloneDeep(convertKeyInitialValue(newValues, transformerMap.value));
|
16284
16449
|
if (!props.request || props.requestAbort) {
|
16285
16450
|
Promise.resolve().then(() => {
|
16286
16451
|
hasInitial.value = false;
|
@@ -16292,22 +16457,22 @@
|
|
16292
16457
|
});
|
16293
16458
|
const onValuesChange = debounce(() => {
|
16294
16459
|
var _a;
|
16295
|
-
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, cloneDeep(formData.value));
|
16460
|
+
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil));
|
16296
16461
|
}, 200);
|
16297
16462
|
const onFinish = async () => {
|
16298
16463
|
if (!props.onFinish) return;
|
16299
|
-
if (props.
|
16464
|
+
if (props.submitOnLoading) {
|
16300
16465
|
if (loading.value) return;
|
16301
|
-
|
16466
|
+
setLoading(true);
|
16302
16467
|
}
|
16303
16468
|
try {
|
16304
|
-
const finalValues = cloneDeep(formData.value);
|
16469
|
+
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil);
|
16305
16470
|
await props.onFinish(finalValues);
|
16306
16471
|
} catch (error) {
|
16307
16472
|
console.log("\u{1F680} ~ onFinish ~ error:", error);
|
16308
16473
|
} finally {
|
16309
|
-
if (props.
|
16310
|
-
|
16474
|
+
if (props.submitOnLoading) {
|
16475
|
+
setLoading(false);
|
16311
16476
|
}
|
16312
16477
|
}
|
16313
16478
|
};
|
@@ -16325,6 +16490,7 @@
|
|
16325
16490
|
formData,
|
16326
16491
|
initialValues,
|
16327
16492
|
hasInitial,
|
16493
|
+
transformerMap,
|
16328
16494
|
onFinish,
|
16329
16495
|
onReset: props.onReset,
|
16330
16496
|
onFinishFailed: props.onFinishFailed
|
@@ -16361,6 +16527,7 @@
|
|
16361
16527
|
}), null);
|
16362
16528
|
if (submitterProps.value.teleport) {
|
16363
16529
|
return vue.createVNode(vue.Teleport, {
|
16530
|
+
"defer": true,
|
16364
16531
|
"to": submitterProps.value.teleport
|
16365
16532
|
}, _isSlot$5(dom) ? dom : {
|
16366
16533
|
default: () => [dom]
|
@@ -16372,8 +16539,11 @@
|
|
16372
16539
|
var _a, _b, _c;
|
16373
16540
|
mountedRef.value = true;
|
16374
16541
|
requestFormCacheId += 1;
|
16375
|
-
const finalValues = (_b = (_a = formRef.value) == null ? void 0 : _a.getFieldsValue) == null ? void 0 : _b.call(_a, true);
|
16376
|
-
(
|
16542
|
+
const finalValues = (_c = (_b = (_a = formRef.value) == null ? void 0 : _a.getFieldsValue) == null ? void 0 : _b.call(_a, true)) != null ? _c : {};
|
16543
|
+
Promise.resolve().then(() => {
|
16544
|
+
var _a2;
|
16545
|
+
(_a2 = props.onInit) == null ? void 0 : _a2.call(props, transformKeySubmitValue(finalValues, transformerMap.value, props.omitNil), action);
|
16546
|
+
});
|
16377
16547
|
});
|
16378
16548
|
useProvideForm({
|
16379
16549
|
...linkage,
|
@@ -16420,7 +16590,7 @@
|
|
16420
16590
|
"style": attrs.style
|
16421
16591
|
}), {
|
16422
16592
|
default: () => [vue.createVNode(antDesignVue.Spin, {
|
16423
|
-
"spinning": requestLoading.value ||
|
16593
|
+
"spinning": props.showLoading && (requestLoading.value || loading.value)
|
16424
16594
|
}, {
|
16425
16595
|
default: () => [vue.createVNode(FormRowWrapper, null, {
|
16426
16596
|
default: () => [vue.createVNode(FormItems, {
|
@@ -16454,8 +16624,7 @@
|
|
16454
16624
|
emits: ["update:open"],
|
16455
16625
|
setup(props, {
|
16456
16626
|
slots,
|
16457
|
-
emit
|
16458
|
-
expose
|
16627
|
+
emit
|
16459
16628
|
}) {
|
16460
16629
|
const _open = vue.ref(false);
|
16461
16630
|
const loading = vue.ref(false);
|
@@ -16463,7 +16632,6 @@
|
|
16463
16632
|
const intl = useIntl();
|
16464
16633
|
const formRef = vue.ref();
|
16465
16634
|
const footerRef = vue.ref(null);
|
16466
|
-
const formExpose = useFormExpose(formRef);
|
16467
16635
|
const open = vue.computed({
|
16468
16636
|
get: () => {
|
16469
16637
|
var _a;
|
@@ -16483,7 +16651,7 @@
|
|
16483
16651
|
});
|
16484
16652
|
const formProps = vue.computed(() => {
|
16485
16653
|
return {
|
16486
|
-
...omitUndefined(omit(props, ["onOpenChange", "closeOnFinish", "drawerProps", "title", "width", "confirmOnValuesChange", "submitTimeout", "onFinish", "submitter"])),
|
16654
|
+
...omitUndefined(omit(props, ["onOpenChange", "closeOnFinish", "drawerProps", "title", "width", "onInit", "confirmOnValuesChange", "submitTimeout", "onFinish", "submitter"])),
|
16487
16655
|
layout: "vertical"
|
16488
16656
|
};
|
16489
16657
|
});
|
@@ -16589,10 +16757,6 @@
|
|
16589
16757
|
}
|
16590
16758
|
return result;
|
16591
16759
|
};
|
16592
|
-
expose({
|
16593
|
-
formRef,
|
16594
|
-
...formExpose
|
16595
|
-
});
|
16596
16760
|
return () => vue.createVNode(vue.Fragment, null, [vue.createVNode(ProDrawer, vue.mergeProps(drawerProps.value, {
|
16597
16761
|
"open": open.value,
|
16598
16762
|
"onAfterOpenChange": (e) => {
|
@@ -16606,9 +16770,7 @@
|
|
16606
16770
|
closeConfirm(e);
|
16607
16771
|
}
|
16608
16772
|
}), {
|
16609
|
-
default: () => [vue.createVNode(BaseForm, vue.mergeProps({
|
16610
|
-
"ref": formRef
|
16611
|
-
}, formProps.value, {
|
16773
|
+
default: () => [vue.createVNode(BaseForm, vue.mergeProps(formProps.value, {
|
16612
16774
|
"submitter": submitterConfig.value,
|
16613
16775
|
"onFinish": async (values) => {
|
16614
16776
|
const result = await onFinishHandle(values);
|
@@ -16627,6 +16789,11 @@
|
|
16627
16789
|
valuesChanged.value = false;
|
16628
16790
|
}
|
16629
16791
|
(_a = props.onReset) == null ? void 0 : _a.call(props);
|
16792
|
+
},
|
16793
|
+
"onInit": (values, action) => {
|
16794
|
+
var _a;
|
16795
|
+
formRef.value = action;
|
16796
|
+
(_a = props.onInit) == null ? void 0 : _a.call(props, values, action);
|
16630
16797
|
}
|
16631
16798
|
}), formSlots.value)],
|
16632
16799
|
...drawerSlots.value,
|
@@ -16651,8 +16818,7 @@
|
|
16651
16818
|
emits: ["update:open"],
|
16652
16819
|
setup(props, {
|
16653
16820
|
slots,
|
16654
|
-
emit
|
16655
|
-
expose
|
16821
|
+
emit
|
16656
16822
|
}) {
|
16657
16823
|
const _open = vue.ref(false);
|
16658
16824
|
const loading = vue.ref(false);
|
@@ -16660,7 +16826,6 @@
|
|
16660
16826
|
const intl = useIntl();
|
16661
16827
|
const formRef = vue.ref();
|
16662
16828
|
const footerRef = vue.ref(null);
|
16663
|
-
const formExpose = useFormExpose(formRef);
|
16664
16829
|
const open = vue.computed({
|
16665
16830
|
get: () => {
|
16666
16831
|
var _a;
|
@@ -16681,7 +16846,7 @@
|
|
16681
16846
|
const formProps = vue.computed(() => {
|
16682
16847
|
var _a;
|
16683
16848
|
return {
|
16684
|
-
...omitUndefined(omit(props, ["onOpenChange", "closeOnFinish", "modalProps", "title", "width", "confirmOnValuesChange", "submitTimeout", "onFinish", "submitter"])),
|
16849
|
+
...omitUndefined(omit(props, ["onInit", "onOpenChange", "closeOnFinish", "modalProps", "title", "width", "confirmOnValuesChange", "submitTimeout", "onFinish", "submitter"])),
|
16685
16850
|
layout: (_a = props.layout) != null ? _a : "vertical"
|
16686
16851
|
};
|
16687
16852
|
});
|
@@ -16788,10 +16953,6 @@
|
|
16788
16953
|
}
|
16789
16954
|
return result;
|
16790
16955
|
};
|
16791
|
-
expose({
|
16792
|
-
formRef,
|
16793
|
-
...formExpose
|
16794
|
-
});
|
16795
16956
|
return () => vue.createVNode(vue.Fragment, null, [vue.createVNode(ProModal, vue.mergeProps(modalProps.value, {
|
16796
16957
|
"open": open.value,
|
16797
16958
|
"afterClose": () => {
|
@@ -16805,9 +16966,7 @@
|
|
16805
16966
|
closeConfirm(e);
|
16806
16967
|
}
|
16807
16968
|
}), {
|
16808
|
-
default: () => [vue.createVNode(BaseForm, vue.mergeProps({
|
16809
|
-
"ref": formRef
|
16810
|
-
}, formProps.value, {
|
16969
|
+
default: () => [vue.createVNode(BaseForm, vue.mergeProps(formProps.value, {
|
16811
16970
|
"submitter": submitterConfig.value,
|
16812
16971
|
"onFinish": async (values) => {
|
16813
16972
|
const result = await onFinishHandle(values);
|
@@ -16826,6 +16985,11 @@
|
|
16826
16985
|
valuesChanged.value = false;
|
16827
16986
|
}
|
16828
16987
|
(_a = props.onReset) == null ? void 0 : _a.call(props);
|
16988
|
+
},
|
16989
|
+
"onInit": (values, action) => {
|
16990
|
+
var _a;
|
16991
|
+
formRef.value = action;
|
16992
|
+
(_a = props.onInit) == null ? void 0 : _a.call(props, values, action);
|
16829
16993
|
}
|
16830
16994
|
}), formSlots.value)],
|
16831
16995
|
...modalSlots.value,
|
@@ -16975,7 +17139,7 @@
|
|
16975
17139
|
}
|
16976
17140
|
return void 0;
|
16977
17141
|
});
|
16978
|
-
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed, {
|
17142
|
+
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed && props.submitter !== false, {
|
16979
17143
|
value: vue.computed(() => props.collapsed),
|
16980
17144
|
onChange: (val) => {
|
16981
17145
|
emit("collapse", val);
|
@@ -17074,7 +17238,10 @@
|
|
17074
17238
|
return {
|
17075
17239
|
...item,
|
17076
17240
|
hidden,
|
17077
|
-
formItemProps:
|
17241
|
+
formItemProps: {
|
17242
|
+
...item.title ? formItemFixStyle.value : {},
|
17243
|
+
...item.formItemProps
|
17244
|
+
},
|
17078
17245
|
colProps: {
|
17079
17246
|
span: colSpan
|
17080
17247
|
}
|
@@ -17104,7 +17271,7 @@
|
|
17104
17271
|
justify: "start",
|
17105
17272
|
class: `${prefixCls}-row`
|
17106
17273
|
},
|
17107
|
-
"
|
17274
|
+
"showLoading": false,
|
17108
17275
|
"submitter": submitterConfig.value,
|
17109
17276
|
"items": processedList.value,
|
17110
17277
|
"layout": spanSize.value.layout,
|
@@ -17118,9 +17285,16 @@
|
|
17118
17285
|
}), {
|
17119
17286
|
...slots,
|
17120
17287
|
submitter: ({
|
17288
|
+
props: props2,
|
17289
|
+
action,
|
17121
17290
|
defaultDoms
|
17122
17291
|
}) => {
|
17123
|
-
|
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", {
|
17124
17298
|
"class": `${prefixCls}-collapse-button`,
|
17125
17299
|
"onClick": () => setCollapsed(!collapsed.value)
|
17126
17300
|
}, [collapsed.value ? intl.getMessage("form.collapsed", "\u5C55\u5F00") : intl.getMessage("form.expand", "\u6536\u8D77"), !!hiddenNum.value && `(${hiddenNum.value})`, vue.createVNode(DownOutlined, {
|
@@ -17281,7 +17455,8 @@
|
|
17281
17455
|
},
|
17282
17456
|
emits: [],
|
17283
17457
|
setup(props, {
|
17284
|
-
slots
|
17458
|
+
slots,
|
17459
|
+
expose
|
17285
17460
|
}) {
|
17286
17461
|
const intl = useIntl();
|
17287
17462
|
const prefixCls = usePrefixCls("steps-form");
|
@@ -17298,7 +17473,7 @@
|
|
17298
17473
|
onChange: props.onCurrentChange
|
17299
17474
|
});
|
17300
17475
|
const regForm = (formRef, index) => {
|
17301
|
-
formArrayRef.value[index] = formRef;
|
17476
|
+
formArrayRef.value[index] = formRef.value;
|
17302
17477
|
};
|
17303
17478
|
const lastStep = vue.computed(() => step.value === props.steps.length - 1);
|
17304
17479
|
const onFormFinish = async (name, formData) => {
|
@@ -17312,10 +17487,7 @@
|
|
17312
17487
|
const success = await props.onFinish(values);
|
17313
17488
|
if (success) {
|
17314
17489
|
setStep(0);
|
17315
|
-
formArrayRef.value.forEach((form) =>
|
17316
|
-
var _a;
|
17317
|
-
return (_a = form.value) == null ? void 0 : _a.reset();
|
17318
|
-
});
|
17490
|
+
formArrayRef.value.forEach((form) => form == null ? void 0 : form.reset());
|
17319
17491
|
}
|
17320
17492
|
} catch (error) {
|
17321
17493
|
console.log(error);
|
@@ -17324,10 +17496,9 @@
|
|
17324
17496
|
}
|
17325
17497
|
};
|
17326
17498
|
const onSubmit = () => {
|
17327
|
-
var _a;
|
17328
17499
|
const from = formArrayRef.value[step.value];
|
17329
17500
|
if (from) {
|
17330
|
-
|
17501
|
+
from == null ? void 0 : from.submit();
|
17331
17502
|
}
|
17332
17503
|
};
|
17333
17504
|
const prePage = () => {
|
@@ -17447,6 +17618,9 @@
|
|
17447
17618
|
regForm,
|
17448
17619
|
onFormFinish
|
17449
17620
|
});
|
17621
|
+
expose({
|
17622
|
+
formArrayRef
|
17623
|
+
});
|
17450
17624
|
return () => vue.createVNode("div", {
|
17451
17625
|
"class": prefixCls
|
17452
17626
|
}, [stepsFormDom.value]);
|
@@ -19578,6 +19752,7 @@
|
|
19578
19752
|
}, props.rowHoverDelay.value + 50);
|
19579
19753
|
};
|
19580
19754
|
const hoverContext = {
|
19755
|
+
rowHover: props.rowHover,
|
19581
19756
|
hoverColumnKey,
|
19582
19757
|
hoverRowKey,
|
19583
19758
|
handleCellHover,
|
@@ -19588,6 +19763,7 @@
|
|
19588
19763
|
};
|
19589
19764
|
const useInjectHover = () => {
|
19590
19765
|
return vue.inject(HoverContextKey, {
|
19766
|
+
rowHover: vue.computed(() => void 0),
|
19591
19767
|
hoverRowKey: vue.ref(),
|
19592
19768
|
hoverColumnKey: vue.ref(),
|
19593
19769
|
handleCellHover: () => {
|
@@ -19609,9 +19785,6 @@
|
|
19609
19785
|
function is(val, type) {
|
19610
19786
|
return toString.call(val) === `[object ${type}]`;
|
19611
19787
|
}
|
19612
|
-
function isFunction(val) {
|
19613
|
-
return typeof val === "function";
|
19614
|
-
}
|
19615
19788
|
function isArray(val) {
|
19616
19789
|
return val && Array.isArray(val);
|
19617
19790
|
}
|
@@ -19805,9 +19978,6 @@
|
|
19805
19978
|
currentData.splice(indexs[indexsLen - 1], 1);
|
19806
19979
|
return currentData;
|
19807
19980
|
}
|
19808
|
-
function isPromise(val) {
|
19809
|
-
return is(val, "Promise") && isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
19810
|
-
}
|
19811
19981
|
function ensureValidVNode(vnodes) {
|
19812
19982
|
return vnodes.some(
|
19813
19983
|
(vnode) => !vue.isVNode(vnode) || vnode.type !== vue.Comment && !(vnode.type === vue.Fragment && !ensureValidVNode(vnode.children))
|
@@ -19890,7 +20060,8 @@
|
|
19890
20060
|
type: [Number, String]
|
19891
20061
|
},
|
19892
20062
|
size: {
|
19893
|
-
type: String
|
20063
|
+
type: String,
|
20064
|
+
default: "middle"
|
19894
20065
|
},
|
19895
20066
|
bordered: {
|
19896
20067
|
type: Boolean,
|
@@ -19986,6 +20157,10 @@
|
|
19986
20157
|
type: Number,
|
19987
20158
|
default: 59
|
19988
20159
|
},
|
20160
|
+
rowHover: {
|
20161
|
+
type: Boolean,
|
20162
|
+
default: void 0
|
20163
|
+
},
|
19989
20164
|
rowKey: {
|
19990
20165
|
type: [Function, String]
|
19991
20166
|
},
|
@@ -20100,6 +20275,9 @@
|
|
20100
20275
|
"onUpdate:dataSource": {
|
20101
20276
|
type: Function
|
20102
20277
|
},
|
20278
|
+
"onUpdate:columns": {
|
20279
|
+
type: Function
|
20280
|
+
},
|
20103
20281
|
columnEmptyText: {
|
20104
20282
|
type: [String, Boolean],
|
20105
20283
|
default: "-"
|
@@ -20112,6 +20290,7 @@
|
|
20112
20290
|
params: Object,
|
20113
20291
|
defaultData: Array,
|
20114
20292
|
manual: Boolean,
|
20293
|
+
manualRequest: Boolean,
|
20115
20294
|
polling: [Number, Function],
|
20116
20295
|
debounceTime: Number,
|
20117
20296
|
onLoad: {
|
@@ -20183,8 +20362,9 @@
|
|
20183
20362
|
|
20184
20363
|
const mergePropsAndPagination = ({ pagination }, intl) => {
|
20185
20364
|
if (pagination) {
|
20186
|
-
const { current, pageSize, total, showTotal, showSizeChanger } = pagination;
|
20365
|
+
const { current, pageSize, total, showTotal, showSizeChanger, ...rest } = pagination;
|
20187
20366
|
return {
|
20367
|
+
...rest,
|
20188
20368
|
current: current || 1,
|
20189
20369
|
total: total || 0,
|
20190
20370
|
pageSize: pageSize || 10,
|
@@ -20228,19 +20408,16 @@
|
|
20228
20408
|
}
|
20229
20409
|
);
|
20230
20410
|
}
|
20231
|
-
return result.map((item) => {
|
20232
|
-
|
20233
|
-
|
20234
|
-
|
20235
|
-
order: (_a = item.order) == null ? void 0 : _a.toUpperCase()
|
20236
|
-
};
|
20237
|
-
});
|
20411
|
+
return result.map((item) => ({
|
20412
|
+
field: item.field,
|
20413
|
+
order: item.order
|
20414
|
+
}));
|
20238
20415
|
};
|
20239
20416
|
const useFetchData = (getData, props) => {
|
20240
20417
|
var _a;
|
20241
20418
|
const umountRef = vue.ref(false);
|
20242
20419
|
const abortRef = vue.ref(null);
|
20243
|
-
const manualRequestRef = vue.ref(!!props.manual);
|
20420
|
+
const manualRequestRef = vue.ref(!!(props.manual || props.manualRequest));
|
20244
20421
|
const pollingSetTimeRef = vue.ref();
|
20245
20422
|
const pollingLoading = vue.ref(false);
|
20246
20423
|
const keyword = vue.ref("");
|
@@ -20401,16 +20578,13 @@
|
|
20401
20578
|
}
|
20402
20579
|
}
|
20403
20580
|
);
|
20404
|
-
vue.watch(
|
20405
|
-
()
|
20406
|
-
()
|
20407
|
-
|
20408
|
-
|
20409
|
-
if (!props.manual) {
|
20410
|
-
manualRequestRef.value = false;
|
20411
|
-
}
|
20581
|
+
vue.watch([() => props.manual, () => props.manualRequest], () => {
|
20582
|
+
abortFetch();
|
20583
|
+
fetchListDebounce(false);
|
20584
|
+
if (!props.manual || !props.manualRequest) {
|
20585
|
+
manualRequestRef.value = false;
|
20412
20586
|
}
|
20413
|
-
);
|
20587
|
+
});
|
20414
20588
|
vue.watch(
|
20415
20589
|
() => pagination.value.current,
|
20416
20590
|
() => {
|
@@ -20678,7 +20852,7 @@
|
|
20678
20852
|
var _a2;
|
20679
20853
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceKey;
|
20680
20854
|
},
|
20681
|
-
columnsMap,
|
20855
|
+
() => columnsMap.value,
|
20682
20856
|
() => {
|
20683
20857
|
var _a2;
|
20684
20858
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceType;
|
@@ -20739,8 +20913,8 @@
|
|
20739
20913
|
var _a;
|
20740
20914
|
const { columns, counter } = params;
|
20741
20915
|
return (_a = columns == null ? void 0 : columns.map((columnProps, columnsIndex) => {
|
20742
|
-
var _a2, _b;
|
20743
|
-
const { key, dataIndex, disable, valueEnum } = columnProps;
|
20916
|
+
var _a2, _b, _c;
|
20917
|
+
const { key, dataIndex, disable, valueEnum, width } = columnProps;
|
20744
20918
|
const columnKey = genColumnKey(
|
20745
20919
|
// key || (dataIndex ? `${dataIndex.toString()}-${columnsIndex}` : ''),
|
20746
20920
|
key || (dataIndex == null ? void 0 : dataIndex.toString()),
|
@@ -20755,12 +20929,13 @@
|
|
20755
20929
|
...columnProps,
|
20756
20930
|
valueEnum,
|
20757
20931
|
fixed: config.fixed,
|
20758
|
-
|
20932
|
+
width: (_a2 = config.width) != null ? _a2 : width,
|
20933
|
+
disable: (_b = config.disable) != null ? _b : disable,
|
20759
20934
|
// width: columnProps.width || (columnProps.fixed ? 200 : undefined),
|
20760
20935
|
children: columnProps.children ? genProColumnToColumn(
|
20761
20936
|
{
|
20762
20937
|
...params,
|
20763
|
-
columns: (
|
20938
|
+
columns: (_c = columnProps == null ? void 0 : columnProps.children) != null ? _c : []
|
20764
20939
|
},
|
20765
20940
|
{ ...columnProps, key: columnKey }
|
20766
20941
|
) : void 0
|
@@ -24295,6 +24470,7 @@
|
|
24295
24470
|
}
|
24296
24471
|
|
24297
24472
|
const DEFAULT_PAGE_SIZE = 10;
|
24473
|
+
const PAGE_SIZE_OPTIONS = ["5", "10", "20", "50"];
|
24298
24474
|
function getPaginationParam(pagination, mergedPagination) {
|
24299
24475
|
const param = {
|
24300
24476
|
current: mergedPagination.current,
|
@@ -24324,7 +24500,11 @@
|
|
24324
24500
|
return result;
|
24325
24501
|
}
|
24326
24502
|
function usePagination(total, props, mergedData, onChange) {
|
24327
|
-
const innerPagination = vue.reactive({
|
24503
|
+
const innerPagination = vue.reactive({
|
24504
|
+
current: 1,
|
24505
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
24506
|
+
pageSizeOptions: PAGE_SIZE_OPTIONS
|
24507
|
+
});
|
24328
24508
|
const size = vue.computed(() => props.size);
|
24329
24509
|
const mergedPagination = vue.computed(() => {
|
24330
24510
|
const { pagination } = props;
|
@@ -24554,7 +24734,9 @@
|
|
24554
24734
|
if (copyCustomCellProps.rowSpan > 1) {
|
24555
24735
|
mergeCellStyles.height = `${getRowHeight(rowIndex, copyCustomCellProps.rowSpan) - 1}px`;
|
24556
24736
|
}
|
24557
|
-
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24737
|
+
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24738
|
+
style: { ...copyCustomCellProps.style, ...mergeCellStyles }
|
24739
|
+
});
|
24558
24740
|
return cellProps;
|
24559
24741
|
};
|
24560
24742
|
vue.watchEffect(() => {
|
@@ -25579,6 +25761,7 @@
|
|
25579
25761
|
var _a, _b;
|
25580
25762
|
return [
|
25581
25763
|
typeof props.column.title == "function" ? props.column.title({
|
25764
|
+
column: props.column.originColumn,
|
25582
25765
|
sortColumns: sortColumns.value,
|
25583
25766
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
25584
25767
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -25633,7 +25816,7 @@
|
|
25633
25816
|
[`${_ctx.prefixCls}-header-cell-title-inner`]: true
|
25634
25817
|
}),
|
25635
25818
|
title: _ctx.altTitle,
|
25636
|
-
style: vue.normalizeStyle(`
|
25819
|
+
style: vue.normalizeStyle(`justify-content: ${_ctx.column.align}`)
|
25637
25820
|
}, [
|
25638
25821
|
vue.createElementVNode(
|
25639
25822
|
"span",
|
@@ -25679,16 +25862,28 @@
|
|
25679
25862
|
1040
|
25680
25863
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
25681
25864
|
)) : vue.createCommentVNode("v-if", true),
|
25682
|
-
_ctx.column.headerTooltip ? (vue.openBlock(), vue.createBlock(_component_Tooltip, {
|
25683
|
-
|
25684
|
-
|
25685
|
-
|
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
|
+
]),
|
25686
25881
|
default: vue.withCtx(() => [
|
25687
25882
|
vue.createVNode(_component_InfoCircleOutlined, { style: { "margin-inline-start": "3px", "font-size": "12px" } })
|
25688
25883
|
]),
|
25689
25884
|
_: 1
|
25690
25885
|
/* STABLE */
|
25691
|
-
}
|
25886
|
+
})) : vue.createCommentVNode("v-if", true)
|
25692
25887
|
], 14, _hoisted_1$d);
|
25693
25888
|
}
|
25694
25889
|
var HeaderCellTitle = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$w]]);
|
@@ -26873,6 +27068,7 @@
|
|
26873
27068
|
var _a, _b;
|
26874
27069
|
return vue.h(vue.Fragment, [
|
26875
27070
|
typeof props.column.title == "function" ? props.column.title({
|
27071
|
+
column: props.column.originColumn,
|
26876
27072
|
sortColumns: sortColumns.value,
|
26877
27073
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
26878
27074
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -28302,28 +28498,29 @@
|
|
28302
28498
|
event: rowDragEvent.value
|
28303
28499
|
});
|
28304
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
|
+
];
|
28305
28517
|
}
|
28306
|
-
return [
|
28307
|
-
vue.createVNode(
|
28308
|
-
"span",
|
28309
|
-
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28310
|
-
null
|
28311
|
-
),
|
28312
|
-
vue.createVNode(
|
28313
|
-
"span",
|
28314
|
-
{
|
28315
|
-
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28316
|
-
style: { maxWidth: `${parentOffsetWidth}px` }
|
28317
|
-
},
|
28318
|
-
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28319
|
-
)
|
28320
|
-
];
|
28321
28518
|
};
|
28322
28519
|
const renderDragGhost = () => {
|
28323
28520
|
if (!dragGhostImage) {
|
28324
28521
|
dragGhostImage = vue.createVNode(renderDragGhostImage);
|
28522
|
+
vue.render(dragGhostImage, dragGhostDom);
|
28325
28523
|
}
|
28326
|
-
vue.render(dragGhostImage, dragGhostDom);
|
28327
28524
|
};
|
28328
28525
|
vue.watch(
|
28329
28526
|
[prefixCls],
|
@@ -28729,7 +28926,7 @@
|
|
28729
28926
|
newValue: modelValue.value,
|
28730
28927
|
oldValue
|
28731
28928
|
});
|
28732
|
-
if (isPromise
|
28929
|
+
if (isPromise(result)) {
|
28733
28930
|
result.then((res) => {
|
28734
28931
|
res && emit("closeEditor", [props.cellKey]);
|
28735
28932
|
}).catch(() => {
|
@@ -28949,7 +29146,7 @@
|
|
28949
29146
|
recordIndexs
|
28950
29147
|
})) != null ? _c2 : value;
|
28951
29148
|
const beforeOpen = (_e2 = (_d2 = tableContext.props) == null ? void 0 : _d2.onBeforeOpenEditor) == null ? void 0 : _e2.call(_d2, cellRenderArgs);
|
28952
|
-
if (isPromise
|
29149
|
+
if (isPromise(beforeOpen)) {
|
28953
29150
|
beforeOpen.then((res) => {
|
28954
29151
|
var _a3, _b3;
|
28955
29152
|
if (res) {
|
@@ -28970,7 +29167,7 @@
|
|
28970
29167
|
...cellRenderArgs,
|
28971
29168
|
oldValue: oldValuesMap.value[key]
|
28972
29169
|
});
|
28973
|
-
if (isPromise
|
29170
|
+
if (isPromise(beforeClose)) {
|
28974
29171
|
beforeClose.then((res) => {
|
28975
29172
|
var _a3, _b3;
|
28976
29173
|
if (res) {
|
@@ -29024,7 +29221,7 @@
|
|
29024
29221
|
color: option.color,
|
29025
29222
|
bordered: false
|
29026
29223
|
},
|
29027
|
-
option.text
|
29224
|
+
() => option.text
|
29028
29225
|
);
|
29029
29226
|
} else {
|
29030
29227
|
cellValue = option.text || emptyText;
|
@@ -29097,7 +29294,7 @@
|
|
29097
29294
|
// }),
|
29098
29295
|
shouldOpen: (isEllipsis) => {
|
29099
29296
|
var _a2;
|
29100
|
-
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;
|
29101
29298
|
},
|
29102
29299
|
onCellLeave: () => {
|
29103
29300
|
emit("cellLeave");
|
@@ -29729,7 +29926,7 @@
|
|
29729
29926
|
() => (props.type === "center" ? tableContext.centerRowColumnsMap.value.get(props.rowKey) : columns.value).filter((item) => !!item)
|
29730
29927
|
);
|
29731
29928
|
const { tooltipOpen, leftPopupContainer, centerPopupContainer, rightPopupContainer } = useInjectBody();
|
29732
|
-
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey } = useInjectHover();
|
29929
|
+
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey, rowHover } = useInjectHover();
|
29733
29930
|
const popupContainer = vue.computed(
|
29734
29931
|
() => props.type === "left" ? leftPopupContainer.value : props.type === "center" ? centerPopupContainer.value : props.type === "right" ? rightPopupContainer.value : null
|
29735
29932
|
);
|
@@ -29738,7 +29935,7 @@
|
|
29738
29935
|
vue.watch(
|
29739
29936
|
[isRowHover, bodyRow],
|
29740
29937
|
() => {
|
29741
|
-
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`));
|
29742
29939
|
},
|
29743
29940
|
{ immediate: true, flush: "post" }
|
29744
29941
|
);
|
@@ -29805,7 +30002,7 @@
|
|
29805
30002
|
{
|
29806
30003
|
[`${prefixCls}-row`]: true,
|
29807
30004
|
[`${prefixCls}-row-level-${indent}`]: true,
|
29808
|
-
[`${prefixCls}-row-hover`]: isRowHover.value,
|
30005
|
+
[`${prefixCls}-row-hover`]: isRowHover.value && rowHover.value,
|
29809
30006
|
[`${prefixCls}-row-dragging`]: isDragging.value,
|
29810
30007
|
[`${prefixCls}-row-dragging-insert-target`]: tableContext.insertToRowKey.value === props.rowKey,
|
29811
30008
|
[`${prefixCls}-row-odd`]: !isEven,
|
@@ -30482,8 +30679,7 @@
|
|
30482
30679
|
};
|
30483
30680
|
});
|
30484
30681
|
const bodyViewportStyle = vue.computed(() => ({
|
30485
|
-
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value
|
30486
|
-
// width: `calc(100% + 0px)`,
|
30682
|
+
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value : 0}px)`,
|
30487
30683
|
overflowX: "hidden",
|
30488
30684
|
overflowY: "auto",
|
30489
30685
|
height: "100%"
|
@@ -31769,9 +31965,14 @@
|
|
31769
31965
|
var _a;
|
31770
31966
|
const width = col.width;
|
31771
31967
|
const result = (_a = props.onResizeColumn) == null ? void 0 : _a.call(props, w, col, action);
|
31772
|
-
if (result !== false
|
31773
|
-
|
31774
|
-
|
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
|
+
}
|
31775
31976
|
}
|
31776
31977
|
},
|
31777
31978
|
onRowDragEnd: (opt) => {
|
@@ -31945,7 +32146,7 @@
|
|
31945
32146
|
rawColumns.value.splice(index, 1);
|
31946
32147
|
}
|
31947
32148
|
vue.triggerRef(rawColumns);
|
31948
|
-
emit("update:columns", rawColumns.value);
|
32149
|
+
emit("update:columns", rawColumns.value, "drag");
|
31949
32150
|
};
|
31950
32151
|
if (isPromise(dragEnd)) {
|
31951
32152
|
dragEnd.then(() => {
|
@@ -33186,10 +33387,18 @@
|
|
33186
33387
|
class: vue.normalizeClass(`${_ctx.prefixCls}-toolbar-options`)
|
33187
33388
|
}, {
|
33188
33389
|
default: vue.withCtx(() => [
|
33189
|
-
_ctx.mergeOptions.search !== false && !(!!_ctx.title || !!_ctx.$slots.title) ? (vue.openBlock(), vue.
|
33190
|
-
|
33191
|
-
|
33192
|
-
|
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)
|
33193
33402
|
]),
|
33194
33403
|
_: 3
|
33195
33404
|
/* FORWARDED */
|
@@ -33208,7 +33417,18 @@
|
|
33208
33417
|
class: vue.normalizeClass(`${_ctx.prefixCls}-toolbar-actions`)
|
33209
33418
|
}, {
|
33210
33419
|
default: vue.withCtx(() => [
|
33211
|
-
_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),
|
33212
33432
|
vue.renderSlot(_ctx.$slots, "actions", {
|
33213
33433
|
setParams: _ctx.actionsRef.setParams
|
33214
33434
|
}),
|
@@ -33527,7 +33747,8 @@
|
|
33527
33747
|
const {
|
33528
33748
|
hoverRowKey
|
33529
33749
|
} = useProvideHover({
|
33530
|
-
rowHoverDelay: vue.computed(() => props.rowHoverDelay)
|
33750
|
+
rowHoverDelay: vue.computed(() => props.rowHoverDelay),
|
33751
|
+
rowHover: vue.computed(() => props.rowHover)
|
33531
33752
|
});
|
33532
33753
|
const mergedPrefixCls = vue.computed(() => {
|
33533
33754
|
var _a2;
|
@@ -33571,10 +33792,7 @@
|
|
33571
33792
|
if (props.pagination === false) {
|
33572
33793
|
return false;
|
33573
33794
|
}
|
33574
|
-
|
33575
|
-
return Object.assign({}, pagination.value, props.pagination);
|
33576
|
-
}
|
33577
|
-
return Object.assign({}, props.pagination, pagination.value);
|
33795
|
+
return pagination.value;
|
33578
33796
|
});
|
33579
33797
|
const formSubmitLoading = vue.computed(() => {
|
33580
33798
|
if (typeof loading.value === "boolean") {
|
@@ -33636,9 +33854,44 @@
|
|
33636
33854
|
};
|
33637
33855
|
return loopFilter(tableColumn.value);
|
33638
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
|
+
};
|
33639
33892
|
const formItems = vue.computed(() => {
|
33640
33893
|
var _a2, _b, _c;
|
33641
|
-
if (
|
33894
|
+
if (props.search === false) {
|
33642
33895
|
return [];
|
33643
33896
|
}
|
33644
33897
|
if ((_b = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
|
@@ -33650,12 +33903,12 @@
|
|
33650
33903
|
}
|
33651
33904
|
return true;
|
33652
33905
|
}).map((item) => {
|
33653
|
-
return {
|
33906
|
+
return omitKeysAndUndefined({
|
33654
33907
|
...item,
|
33655
33908
|
width: void 0,
|
33656
33909
|
tooltip: item.headerTooltip,
|
33657
33910
|
name: item.dataIndex
|
33658
|
-
};
|
33911
|
+
}, ["dataIndex", "width"]);
|
33659
33912
|
});
|
33660
33913
|
});
|
33661
33914
|
const preserveRecordsRef = vue.ref(/* @__PURE__ */ new Map());
|
@@ -33672,8 +33925,8 @@
|
|
33672
33925
|
}
|
33673
33926
|
onCleanSelected();
|
33674
33927
|
});
|
33675
|
-
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0, {
|
33676
|
-
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))
|
33677
33930
|
});
|
33678
33931
|
const rowSelection = vue.computed(() => ({
|
33679
33932
|
selectedRowKeys: selectedRowKeys.value,
|
@@ -33810,7 +34063,7 @@
|
|
33810
34063
|
actions: slots.alertActions
|
33811
34064
|
}), vue.createVNode(InteralTable, vue.mergeProps({
|
33812
34065
|
"ref": table
|
33813
|
-
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys"]), {
|
34066
|
+
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys", "onUpdate:columns"]), {
|
33814
34067
|
"prefixCls": mergedPrefixCls.value,
|
33815
34068
|
"columns": mergeColumns || [],
|
33816
34069
|
"size": counter.tableSize.value,
|
@@ -33821,7 +34074,8 @@
|
|
33821
34074
|
"expandIcon": expandIcon,
|
33822
34075
|
"expandedRowRender": expandedRowRender,
|
33823
34076
|
"hasContextmenuPopup": !!slots.contextmenuPopup,
|
33824
|
-
"onChange": onTableChange
|
34077
|
+
"onChange": onTableChange,
|
34078
|
+
"onUpdate:columns": onColumnsChange
|
33825
34079
|
}), {
|
33826
34080
|
...slots,
|
33827
34081
|
footer: props.footer || slots.footer
|
@@ -33850,7 +34104,7 @@
|
|
33850
34104
|
"tableShowCard": props.cardProps !== false,
|
33851
34105
|
"loading": formSubmitLoading.value,
|
33852
34106
|
"beforeSearchSubmit": props.beforeSearchSubmit,
|
33853
|
-
"manual": props.manual,
|
34107
|
+
"manual": props.manual || props.manualRequest,
|
33854
34108
|
"onReset": props.onReset,
|
33855
34109
|
"onSubmit": props.onSubmit,
|
33856
34110
|
"onFormSearchSubmit": onFormSearchSubmit,
|
@@ -34691,6 +34945,10 @@
|
|
34691
34945
|
colProps: {
|
34692
34946
|
type: Object,
|
34693
34947
|
default: void 0
|
34948
|
+
},
|
34949
|
+
grid: {
|
34950
|
+
type: Boolean,
|
34951
|
+
default: void 0
|
34694
34952
|
}
|
34695
34953
|
},
|
34696
34954
|
setup(props, {
|
@@ -34704,9 +34962,13 @@
|
|
34704
34962
|
var _a;
|
34705
34963
|
return (_a = props.colProps) != null ? _a : colProps == null ? void 0 : colProps.value;
|
34706
34964
|
});
|
34965
|
+
const mergeGrid = vue.computed(() => {
|
34966
|
+
var _a;
|
34967
|
+
return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
|
34968
|
+
});
|
34707
34969
|
return () => {
|
34708
34970
|
var _a;
|
34709
|
-
if (
|
34971
|
+
if (mergeGrid.value) {
|
34710
34972
|
return vue.createVNode(antDesignVue.Col, mergeColProps.value, {
|
34711
34973
|
default: () => {
|
34712
34974
|
var _a2;
|
@@ -34728,7 +34990,7 @@
|
|
34728
34990
|
default: void 0
|
34729
34991
|
},
|
34730
34992
|
tooltip: {
|
34731
|
-
type: String,
|
34993
|
+
type: [String, Boolean],
|
34732
34994
|
default: ""
|
34733
34995
|
}
|
34734
34996
|
},
|
@@ -34746,12 +35008,17 @@
|
|
34746
35008
|
"props": {
|
34747
35009
|
formData: formData.value
|
34748
35010
|
}
|
34749
|
-
}, null)]), props.tooltip && vue.createVNode(antDesignVue.Tooltip, {
|
34750
|
-
"title": props.tooltip
|
34751
|
-
}, {
|
35011
|
+
}, null)]), props.tooltip && vue.createVNode(antDesignVue.Tooltip, null, {
|
34752
35012
|
default: () => [vue.createVNode(QuestionCircleOutlined, {
|
34753
|
-
"class": `${prefixCls}-item-tooltip
|
34754
|
-
|
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
|
34755
35022
|
})]);
|
34756
35023
|
}
|
34757
35024
|
});
|
@@ -34768,7 +35035,7 @@
|
|
34768
35035
|
default: void 0
|
34769
35036
|
},
|
34770
35037
|
tooltip: {
|
34771
|
-
type: String,
|
35038
|
+
type: [String, Boolean],
|
34772
35039
|
default: void 0
|
34773
35040
|
},
|
34774
35041
|
colProps: {
|
@@ -34872,25 +35139,18 @@
|
|
34872
35139
|
function useFieldValue({
|
34873
35140
|
namePath,
|
34874
35141
|
initialValue,
|
34875
|
-
convertValue
|
34876
|
-
transform
|
35142
|
+
convertValue
|
34877
35143
|
}) {
|
34878
35144
|
const fieldValue = vue.shallowRef();
|
34879
|
-
const { formData, initialValues
|
35145
|
+
const { formData, initialValues } = useInjectForm();
|
34880
35146
|
const modelValue = vue.computed(() => get(formData.value, namePath.value));
|
34881
35147
|
const onValueChange = (value) => {
|
34882
|
-
set(
|
34883
|
-
formData.value,
|
34884
|
-
namePath.value,
|
34885
|
-
transform ? transform(value, namePath.value, formData.value) : value
|
34886
|
-
);
|
35148
|
+
set(formData.value, namePath.value, value);
|
34887
35149
|
};
|
34888
35150
|
vue.watch(
|
34889
35151
|
modelValue,
|
34890
35152
|
(newValue) => {
|
34891
|
-
fieldValue.value = cloneDeep(
|
34892
|
-
convertValue ? convertValue(newValue, namePath.value) : newValue
|
34893
|
-
);
|
35153
|
+
fieldValue.value = cloneDeep(newValue);
|
34894
35154
|
},
|
34895
35155
|
{
|
34896
35156
|
immediate: true,
|
@@ -34899,11 +35159,14 @@
|
|
34899
35159
|
);
|
34900
35160
|
const initFieldInitialValue = () => {
|
34901
35161
|
var _a;
|
34902
|
-
if (
|
34903
|
-
|
35162
|
+
if (
|
35163
|
+
// !mountedRef.value &&
|
35164
|
+
typeof modelValue.value === "undefined" && typeof initialValue !== "undefined"
|
35165
|
+
) {
|
35166
|
+
const value = convertValue ? convertValue(initialValue, namePath.value) : initialValue;
|
34904
35167
|
set(formData.value, namePath.value, cloneDeep(value));
|
34905
|
-
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(
|
34906
|
-
fieldValue.value =
|
35168
|
+
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(initialValue));
|
35169
|
+
fieldValue.value = value;
|
34907
35170
|
}
|
34908
35171
|
};
|
34909
35172
|
initFieldInitialValue();
|
@@ -34932,7 +35195,7 @@
|
|
34932
35195
|
default: void 0
|
34933
35196
|
},
|
34934
35197
|
tooltip: {
|
34935
|
-
type: String,
|
35198
|
+
type: [String, Boolean],
|
34936
35199
|
default: void 0
|
34937
35200
|
},
|
34938
35201
|
colProps: {
|
@@ -35346,7 +35609,7 @@
|
|
35346
35609
|
default: void 0
|
35347
35610
|
},
|
35348
35611
|
tooltip: {
|
35349
|
-
type: String,
|
35612
|
+
type: [String, Boolean],
|
35350
35613
|
default: void 0
|
35351
35614
|
},
|
35352
35615
|
readonly: {
|
@@ -35613,7 +35876,7 @@
|
|
35613
35876
|
default: void 0
|
35614
35877
|
},
|
35615
35878
|
tooltip: {
|
35616
|
-
type: String,
|
35879
|
+
type: [String, Boolean],
|
35617
35880
|
default: void 0
|
35618
35881
|
},
|
35619
35882
|
colProps: {
|
@@ -36443,6 +36706,10 @@
|
|
36443
36706
|
item: {
|
36444
36707
|
type: Object,
|
36445
36708
|
default: () => ({})
|
36709
|
+
},
|
36710
|
+
grid: {
|
36711
|
+
type: Boolean,
|
36712
|
+
default: void 0
|
36446
36713
|
}
|
36447
36714
|
},
|
36448
36715
|
setup(props) {
|
@@ -36477,6 +36744,10 @@
|
|
36477
36744
|
transform: props.item.transform
|
36478
36745
|
});
|
36479
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
|
+
});
|
36480
36751
|
const fieldType = vue.computed(() => {
|
36481
36752
|
var _a;
|
36482
36753
|
return (_a = props.item.fieldType) != null ? _a : "text";
|
@@ -36533,7 +36804,7 @@
|
|
36533
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,
|
36534
36805
|
placeholder: (_f = props.item.placeholder) != null ? _f : baseProps == null ? void 0 : baseProps.placeholder,
|
36535
36806
|
options: (_h = (_g = props.item.options) != null ? _g : baseProps == null ? void 0 : baseProps.options) != null ? _h : baseProps == null ? void 0 : baseProps.treeData,
|
36536
|
-
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
|
36537
36808
|
};
|
36538
36809
|
return omitUndefined({
|
36539
36810
|
valueEnum: props.item.valueEnum,
|
@@ -36559,7 +36830,7 @@
|
|
36559
36830
|
};
|
36560
36831
|
if (props.item.width && !fieldWidthSizeMap[props.item.width]) {
|
36561
36832
|
newStyle.width = isNumber$2(props.item.width) ? props.item.width + "px" : props.item.width;
|
36562
|
-
} else if (
|
36833
|
+
} else if (mergeGrid == null ? void 0 : mergeGrid.value) {
|
36563
36834
|
newStyle.maxWidth = "100%";
|
36564
36835
|
newStyle.width = "100%";
|
36565
36836
|
}
|
@@ -36599,12 +36870,14 @@
|
|
36599
36870
|
}, [vue.createVNode(FormTitle, {
|
36600
36871
|
"title": props.item.title,
|
36601
36872
|
"tooltip": props.item.tooltip
|
36602
|
-
}, null)]), vue.createVNode(
|
36873
|
+
}, null)]), vue.createVNode("div", {
|
36874
|
+
"class": `${prefixCls}-item-title-extra`
|
36875
|
+
}, [vue.createVNode(RenderVNode$1, {
|
36603
36876
|
"vnode": extraRender,
|
36604
36877
|
"props": {
|
36605
36878
|
formData: formData.value
|
36606
36879
|
}
|
36607
|
-
}, null)]);
|
36880
|
+
}, null)])]);
|
36608
36881
|
}
|
36609
36882
|
return temp;
|
36610
36883
|
});
|
@@ -36651,19 +36924,6 @@
|
|
36651
36924
|
});
|
36652
36925
|
return () => {
|
36653
36926
|
var _a, _b;
|
36654
|
-
const render = getSlot(props.item.render, formSlotsContext);
|
36655
|
-
if (render) {
|
36656
|
-
return vue.createVNode(FormColWrapper, {
|
36657
|
-
"colProps": props.item.colProps
|
36658
|
-
}, {
|
36659
|
-
default: () => [vue.createVNode(RenderVNode$1, {
|
36660
|
-
"vnode": render,
|
36661
|
-
"props": {
|
36662
|
-
formData: formData.value
|
36663
|
-
}
|
36664
|
-
}, null)]
|
36665
|
-
});
|
36666
|
-
}
|
36667
36927
|
const renderFormItem = getSlot(props.item.renderFormItem, formSlotsContext);
|
36668
36928
|
const extraRender = getSlot((_a = props.item.extra) == null ? void 0 : _a.item, formSlotsContext);
|
36669
36929
|
const FieldComponent = (_b = fieldComponentMap[fieldType.value]) != null ? _b : fieldComponentMap["text"];
|
@@ -36691,22 +36951,33 @@
|
|
36691
36951
|
if (extraRender) {
|
36692
36952
|
defaultDom = vue.createVNode("div", {
|
36693
36953
|
"style": "display: flex; flex-direction: row; justify-content: flex-start; align-items: center;"
|
36694
|
-
}, [defaultDom, vue.createVNode(
|
36954
|
+
}, [defaultDom, vue.createVNode("div", {
|
36955
|
+
"style": "margin-inline-start: 5px; flex-shrink: 0;"
|
36956
|
+
}, [vue.createVNode(RenderVNode$1, {
|
36695
36957
|
"vnode": extraRender,
|
36696
36958
|
"props": {
|
36697
36959
|
formData: formData.value,
|
36698
36960
|
listName: listName == null ? void 0 : listName.value,
|
36699
36961
|
name: props.item.name
|
36700
36962
|
}
|
36701
|
-
}, null)]);
|
36963
|
+
}, null)])]);
|
36702
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);
|
36703
36970
|
return vue.createVNode(FormColWrapper, {
|
36704
|
-
"colProps": props.item.colProps
|
36971
|
+
"colProps": props.item.colProps,
|
36972
|
+
"grid": mergeGrid.value
|
36705
36973
|
}, {
|
36706
|
-
default: () => [vue.createVNode(
|
36707
|
-
|
36708
|
-
|
36709
|
-
|
36974
|
+
default: () => [render ? vue.createVNode(RenderVNode$1, {
|
36975
|
+
"vnode": render,
|
36976
|
+
"props": {
|
36977
|
+
formData: formData.value,
|
36978
|
+
defaultDom: formItemDom
|
36979
|
+
}
|
36980
|
+
}, null) : formItemDom]
|
36710
36981
|
});
|
36711
36982
|
};
|
36712
36983
|
}
|