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.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Pro Design Vue v1.0.0
|
1
|
+
/*! Pro Design Vue v1.0.0 */
|
2
2
|
|
3
3
|
import { Modal, ConfigProvider, App, Button as Button$1, Tooltip, Popconfirm, Dropdown, Menu, Slider, Drawer, Input, InputNumber, Form as Form$1, Space, Textarea, Select, TreeSelect, Checkbox as Checkbox$1, CheckboxGroup, RadioGroup, Radio as Radio$1, Cascader, Switch, Rate, DatePicker, RangePicker, TimePicker, TimeRangePicker, Upload, theme as theme$1, FormItemRest, Spin, message, Row as Row$1, Col, FormItem as FormItem$3, Steps, Popover, MenuItem, SubMenu, Empty, Badge, Tag, Pagination, InputSearch, Tree, Card, Tabs, TabPane } from 'ant-design-vue';
|
4
4
|
import { inject, ref, getCurrentInstance, nextTick, h, reactive, defineComponent, createVNode, isVNode, Fragment, cloneVNode, provide, computed, renderSlot, createPropsRestProxy, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, shallowRef, shallowReadonly, toValue, getCurrentScope, onScopeDispose, watch, onMounted, hasInjectionContext, isRef, toRefs as toRefs$1, customRef, toRef as toRef$1, readonly, watchEffect, toRaw, createElementBlock, createCommentVNode, resolveDynamicComponent, mergeProps, createElementVNode, normalizeStyle, toDisplayString, normalizeClass, createSlots, useAttrs, useTemplateRef, defineAsyncComponent, Teleport, onUnmounted, Comment as Comment$1, useSlots, useModel, withModifiers, mergeModels, renderList, camelize, isReactive, onActivated, onDeactivated, onBeforeUnmount, triggerRef, resolveDirective, withDirectives, vShow, render as render$1, resolveComponent, createTextVNode, vModelText } from 'vue';
|
@@ -13,7 +13,7 @@ const ELEMENT_ID_MAIN_CONTENT = `__pro_main_content`;
|
|
13
13
|
const SCROLL_FIXED_CLASS = `_scroll__fixed_`;
|
14
14
|
const DEFAULT_NAMESPACE = "pro";
|
15
15
|
|
16
|
-
const version$1 = "1.0.0
|
16
|
+
const version$1 = "1.0.0";
|
17
17
|
|
18
18
|
const makeInstaller = (components = []) => {
|
19
19
|
const install = (app) => {
|
@@ -2203,13 +2203,13 @@ const isNil = (value) => value === null || value === void 0;
|
|
2203
2203
|
function isNumber$2(val) {
|
2204
2204
|
return is$1(val, "Number");
|
2205
2205
|
}
|
2206
|
-
function isPromise
|
2207
|
-
return is$1(val, "Promise") &&
|
2206
|
+
function isPromise(val) {
|
2207
|
+
return is$1(val, "Promise") && isFunction$2(val.then) && isFunction$2(val.catch);
|
2208
2208
|
}
|
2209
2209
|
function isString$1(val) {
|
2210
2210
|
return is$1(val, "String");
|
2211
2211
|
}
|
2212
|
-
function isFunction$
|
2212
|
+
function isFunction$2(val) {
|
2213
2213
|
return typeof val === "function";
|
2214
2214
|
}
|
2215
2215
|
function isArray$2(val) {
|
@@ -2253,7 +2253,7 @@ const confirm = (props) => {
|
|
2253
2253
|
...okButtonProps
|
2254
2254
|
},
|
2255
2255
|
async onOk(...args) {
|
2256
|
-
if (isPromise
|
2256
|
+
if (isPromise(onOk)) {
|
2257
2257
|
return await new Promise(() => {
|
2258
2258
|
onOk == null ? void 0 : onOk(args);
|
2259
2259
|
});
|
@@ -2504,7 +2504,7 @@ var asyncTag = "[object AsyncFunction]";
|
|
2504
2504
|
var funcTag$2 = "[object Function]";
|
2505
2505
|
var genTag$1 = "[object GeneratorFunction]";
|
2506
2506
|
var proxyTag = "[object Proxy]";
|
2507
|
-
function isFunction$
|
2507
|
+
function isFunction$1(value) {
|
2508
2508
|
if (!isObject$3(value)) {
|
2509
2509
|
return false;
|
2510
2510
|
}
|
@@ -2551,7 +2551,7 @@ function baseIsNative(value) {
|
|
2551
2551
|
if (!isObject$3(value) || isMasked(value)) {
|
2552
2552
|
return false;
|
2553
2553
|
}
|
2554
|
-
var pattern = isFunction$
|
2554
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
2555
2555
|
return pattern.test(toSource(value));
|
2556
2556
|
}
|
2557
2557
|
|
@@ -2753,7 +2753,7 @@ function isLength(value) {
|
|
2753
2753
|
}
|
2754
2754
|
|
2755
2755
|
function isArrayLike(value) {
|
2756
|
-
return value != null && isLength(value.length) && !isFunction$
|
2756
|
+
return value != null && isLength(value.length) && !isFunction$1(value);
|
2757
2757
|
}
|
2758
2758
|
|
2759
2759
|
function isIterateeCall(value, index, object) {
|
@@ -4426,7 +4426,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
|
|
4426
4426
|
newValue = objValue;
|
4427
4427
|
if (isArguments(objValue)) {
|
4428
4428
|
newValue = toPlainObject(objValue);
|
4429
|
-
} else if (!isObject$3(objValue) || isFunction$
|
4429
|
+
} else if (!isObject$3(objValue) || isFunction$1(objValue)) {
|
4430
4430
|
newValue = initCloneObject(srcValue);
|
4431
4431
|
}
|
4432
4432
|
} else {
|
@@ -8477,7 +8477,7 @@ var _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
8477
8477
|
});
|
8478
8478
|
const isComponent = computed(() => {
|
8479
8479
|
const { icon } = props;
|
8480
|
-
return !isString$1(icon) && (isObject$4(icon) || isFunction$
|
8480
|
+
return !isString$1(icon) && (isObject$4(icon) || isFunction$2(icon));
|
8481
8481
|
});
|
8482
8482
|
return (_ctx, _cache) => {
|
8483
8483
|
return isComponent.value ? (openBlock(), createBlock(
|
@@ -9141,7 +9141,7 @@ function isPlainObject(value) {
|
|
9141
9141
|
return false;
|
9142
9142
|
}
|
9143
9143
|
}
|
9144
|
-
function isFunction
|
9144
|
+
function isFunction(value) {
|
9145
9145
|
return typeof value === "function";
|
9146
9146
|
}
|
9147
9147
|
var slice = Array.prototype.slice;
|
@@ -9149,7 +9149,7 @@ function toArray$1(value) {
|
|
9149
9149
|
return Array.from ? Array.from(value) : slice.call(value);
|
9150
9150
|
}
|
9151
9151
|
function forEach(data, callback) {
|
9152
|
-
if (data && isFunction
|
9152
|
+
if (data && isFunction(callback)) {
|
9153
9153
|
if (Array.isArray(data) || isNumber(data.length)) {
|
9154
9154
|
toArray$1(data).forEach(function(value, key) {
|
9155
9155
|
callback.call(data, value, key, data);
|
@@ -9363,7 +9363,7 @@ function addListener(element, type, listener) {
|
|
9363
9363
|
}
|
9364
9364
|
function dispatchEvent(element, type, data) {
|
9365
9365
|
var event;
|
9366
|
-
if (isFunction
|
9366
|
+
if (isFunction(Event) && isFunction(CustomEvent)) {
|
9367
9367
|
event = new CustomEvent(type, {
|
9368
9368
|
detail: data,
|
9369
9369
|
bubbles: true,
|
@@ -10102,19 +10102,19 @@ var preview = {
|
|
10102
10102
|
var events$1 = {
|
10103
10103
|
bind: function bind() {
|
10104
10104
|
var element = this.element, options = this.options, cropper = this.cropper;
|
10105
|
-
if (isFunction
|
10105
|
+
if (isFunction(options.cropstart)) {
|
10106
10106
|
addListener(element, EVENT_CROP_START, options.cropstart);
|
10107
10107
|
}
|
10108
|
-
if (isFunction
|
10108
|
+
if (isFunction(options.cropmove)) {
|
10109
10109
|
addListener(element, EVENT_CROP_MOVE, options.cropmove);
|
10110
10110
|
}
|
10111
|
-
if (isFunction
|
10111
|
+
if (isFunction(options.cropend)) {
|
10112
10112
|
addListener(element, EVENT_CROP_END, options.cropend);
|
10113
10113
|
}
|
10114
|
-
if (isFunction
|
10114
|
+
if (isFunction(options.crop)) {
|
10115
10115
|
addListener(element, EVENT_CROP, options.crop);
|
10116
10116
|
}
|
10117
|
-
if (isFunction
|
10117
|
+
if (isFunction(options.zoom)) {
|
10118
10118
|
addListener(element, EVENT_ZOOM, options.zoom);
|
10119
10119
|
}
|
10120
10120
|
addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this));
|
@@ -10135,19 +10135,19 @@ var events$1 = {
|
|
10135
10135
|
},
|
10136
10136
|
unbind: function unbind() {
|
10137
10137
|
var element = this.element, options = this.options, cropper = this.cropper;
|
10138
|
-
if (isFunction
|
10138
|
+
if (isFunction(options.cropstart)) {
|
10139
10139
|
removeListener(element, EVENT_CROP_START, options.cropstart);
|
10140
10140
|
}
|
10141
|
-
if (isFunction
|
10141
|
+
if (isFunction(options.cropmove)) {
|
10142
10142
|
removeListener(element, EVENT_CROP_MOVE, options.cropmove);
|
10143
10143
|
}
|
10144
|
-
if (isFunction
|
10144
|
+
if (isFunction(options.cropend)) {
|
10145
10145
|
removeListener(element, EVENT_CROP_END, options.cropend);
|
10146
10146
|
}
|
10147
|
-
if (isFunction
|
10147
|
+
if (isFunction(options.crop)) {
|
10148
10148
|
removeListener(element, EVENT_CROP, options.crop);
|
10149
10149
|
}
|
10150
|
-
if (isFunction
|
10150
|
+
if (isFunction(options.zoom)) {
|
10151
10151
|
removeListener(element, EVENT_ZOOM, options.zoom);
|
10152
10152
|
}
|
10153
10153
|
removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart);
|
@@ -11552,7 +11552,7 @@ var Cropper = /* @__PURE__ */ (function() {
|
|
11552
11552
|
this.crop();
|
11553
11553
|
}
|
11554
11554
|
this.setData(options.data);
|
11555
|
-
if (isFunction
|
11555
|
+
if (isFunction(options.ready)) {
|
11556
11556
|
addListener(element, EVENT_READY, options.ready, {
|
11557
11557
|
once: true
|
11558
11558
|
});
|
@@ -11748,7 +11748,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11748
11748
|
__name: "drawer",
|
11749
11749
|
props: {
|
11750
11750
|
description: { type: String, required: false },
|
11751
|
-
showFullscreen: { type: Boolean, required: false, default:
|
11751
|
+
showFullscreen: { type: Boolean, required: false, default: false },
|
11752
11752
|
defaultFullscreen: { type: Boolean, required: false },
|
11753
11753
|
autofocus: { type: Boolean, required: false, default: false },
|
11754
11754
|
closable: { type: Boolean, required: false, default: true },
|
@@ -14763,7 +14763,7 @@ var FieldUploadButton = /* @__PURE__ */ defineComponent({
|
|
14763
14763
|
});
|
14764
14764
|
const icon = computed(() => {
|
14765
14765
|
const render = getSlot(props.iconRender, formSlotsContext);
|
14766
|
-
if (isFunction$
|
14766
|
+
if (isFunction$2(render)) {
|
14767
14767
|
return createVNode(RenderVNode$1, {
|
14768
14768
|
"vnode": render
|
14769
14769
|
}, null);
|
@@ -14772,7 +14772,7 @@ var FieldUploadButton = /* @__PURE__ */ defineComponent({
|
|
14772
14772
|
});
|
14773
14773
|
const title = computed(() => {
|
14774
14774
|
const render = getSlot(props.title, formSlotsContext);
|
14775
|
-
if (isFunction$
|
14775
|
+
if (isFunction$2(render)) {
|
14776
14776
|
return createVNode(RenderVNode$1, {
|
14777
14777
|
"vnode": render
|
14778
14778
|
}, null);
|
@@ -14886,7 +14886,7 @@ var FieldUploadDragger = /* @__PURE__ */ defineComponent({
|
|
14886
14886
|
});
|
14887
14887
|
const icon = computed(() => {
|
14888
14888
|
const render = getSlot(props.iconRender, formSlotsContext);
|
14889
|
-
if (isFunction$
|
14889
|
+
if (isFunction$2(render)) {
|
14890
14890
|
return createVNode(RenderVNode$1, {
|
14891
14891
|
"vnode": render
|
14892
14892
|
}, null);
|
@@ -14895,7 +14895,7 @@ var FieldUploadDragger = /* @__PURE__ */ defineComponent({
|
|
14895
14895
|
});
|
14896
14896
|
const title = computed(() => {
|
14897
14897
|
const render = getSlot(props.title, formSlotsContext);
|
14898
|
-
if (isFunction$
|
14898
|
+
if (isFunction$2(render)) {
|
14899
14899
|
return createVNode(RenderVNode$1, {
|
14900
14900
|
"vnode": render
|
14901
14901
|
}, null);
|
@@ -14904,7 +14904,7 @@ var FieldUploadDragger = /* @__PURE__ */ defineComponent({
|
|
14904
14904
|
});
|
14905
14905
|
const description = computed(() => {
|
14906
14906
|
const render = getSlot(props.description, formSlotsContext);
|
14907
|
-
if (isFunction$
|
14907
|
+
if (isFunction$2(render)) {
|
14908
14908
|
return createVNode(RenderVNode$1, {
|
14909
14909
|
"vnode": render
|
14910
14910
|
}, null);
|
@@ -14948,7 +14948,7 @@ var _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
14948
14948
|
__name: "modal",
|
14949
14949
|
props: {
|
14950
14950
|
description: { type: String, required: false },
|
14951
|
-
showFullscreen: { type: Boolean, required: false, default:
|
14951
|
+
showFullscreen: { type: Boolean, required: false, default: false },
|
14952
14952
|
defaultFullscreen: { type: Boolean, required: false },
|
14953
14953
|
draggable: { type: Boolean, required: false, default: false },
|
14954
14954
|
top: { type: Number, required: false, default: 100 },
|
@@ -15764,7 +15764,7 @@ function isPlainObj(itemValue) {
|
|
15764
15764
|
if (Array.isArray(itemValue)) return false;
|
15765
15765
|
return true;
|
15766
15766
|
}
|
15767
|
-
const transformKeySubmitValue = (values, paramsOmitNil) => {
|
15767
|
+
const transformKeySubmitValue = (values, transformerMap, paramsOmitNil) => {
|
15768
15768
|
if (Object.keys(values).length < 1) {
|
15769
15769
|
return values;
|
15770
15770
|
}
|
@@ -15780,6 +15780,7 @@ const transformKeySubmitValue = (values, paramsOmitNil) => {
|
|
15780
15780
|
return result;
|
15781
15781
|
}
|
15782
15782
|
Object.keys(tempValues).forEach((entityKey) => {
|
15783
|
+
var _a;
|
15783
15784
|
const transformForArray = (transformList, subItemValue) => {
|
15784
15785
|
if (!Array.isArray(transformList)) return entityKey;
|
15785
15786
|
transformList.forEach((transform2, idx) => {
|
@@ -15809,9 +15810,8 @@ const transformKeySubmitValue = (values, paramsOmitNil) => {
|
|
15809
15810
|
});
|
15810
15811
|
return entityKey;
|
15811
15812
|
};
|
15812
|
-
const key = parentsKey ? [parentsKey, entityKey].flat(1) : [entityKey].flat(1);
|
15813
15813
|
const itemValue = tempValues[entityKey];
|
15814
|
-
const transformFunction = get(
|
15814
|
+
const transformFunction = (_a = transformerMap.get(entityKey)) == null ? void 0 : _a.transform;
|
15815
15815
|
const transform = () => {
|
15816
15816
|
let tempKey, transformedResult, isTransformedResultPrimitive = false;
|
15817
15817
|
if (typeof transformFunction === "function") {
|
@@ -15847,7 +15847,7 @@ const transformKeySubmitValue = (values, paramsOmitNil) => {
|
|
15847
15847
|
}
|
15848
15848
|
if (typeof window === "undefined") return;
|
15849
15849
|
if (isPlainObj(itemValue)) {
|
15850
|
-
const genValues = gen(itemValue
|
15850
|
+
const genValues = gen(itemValue);
|
15851
15851
|
if (Object.keys(genValues).length < 1) {
|
15852
15852
|
return;
|
15853
15853
|
}
|
@@ -15861,12 +15861,31 @@ const transformKeySubmitValue = (values, paramsOmitNil) => {
|
|
15861
15861
|
finalValues = Array.isArray(values) && Array.isArray(finalValues) ? [...gen(values)] : merge({}, gen(values), finalValues);
|
15862
15862
|
return finalValues;
|
15863
15863
|
};
|
15864
|
+
const convertKeyInitialValue = (values, transformerMap) => {
|
15865
|
+
if (Object.keys(values).length < 1) {
|
15866
|
+
return values;
|
15867
|
+
}
|
15868
|
+
const finalValues = {};
|
15869
|
+
Object.keys(values).forEach((entityKey) => {
|
15870
|
+
var _a;
|
15871
|
+
const itemValue = values[entityKey];
|
15872
|
+
const convertValueFunction = (_a = transformerMap.get(entityKey)) == null ? void 0 : _a.convertValue;
|
15873
|
+
if (typeof convertValueFunction === "function") {
|
15874
|
+
const convertResult = convertValueFunction == null ? void 0 : convertValueFunction(itemValue, entityKey);
|
15875
|
+
finalValues[entityKey] = convertResult;
|
15876
|
+
} else {
|
15877
|
+
finalValues[entityKey] = itemValue;
|
15878
|
+
}
|
15879
|
+
});
|
15880
|
+
return finalValues;
|
15881
|
+
};
|
15864
15882
|
function useAction({
|
15865
15883
|
props,
|
15866
15884
|
formRef,
|
15867
15885
|
formData,
|
15868
15886
|
initialValues,
|
15869
15887
|
hasInitial,
|
15888
|
+
transformerMap,
|
15870
15889
|
onFinish,
|
15871
15890
|
onReset,
|
15872
15891
|
onFinishFailed
|
@@ -15895,20 +15914,20 @@ function useAction({
|
|
15895
15914
|
if (!namePath) throw new Error("name is require");
|
15896
15915
|
const value = get(formData.value, namePath);
|
15897
15916
|
const obj = set({}, namePath, value);
|
15898
|
-
return get(transformKeySubmitValue(obj, props.omitNil), namePath);
|
15917
|
+
return get(transformKeySubmitValue(obj, transformerMap.value, props.omitNil), namePath);
|
15899
15918
|
};
|
15900
15919
|
const getFieldFormatValueObject = (name) => {
|
15901
15920
|
const namePath = covertFormName(name);
|
15902
15921
|
if (!namePath) throw new Error("name is require");
|
15903
15922
|
const value = get(formData.value, namePath);
|
15904
15923
|
const obj = set({}, namePath, value);
|
15905
|
-
return transformKeySubmitValue(obj, props.omitNil);
|
15924
|
+
return transformKeySubmitValue(obj, transformerMap.value, props.omitNil);
|
15906
15925
|
};
|
15907
15926
|
const validateFieldsReturnFormatValue = async (nameList) => {
|
15908
15927
|
var _a;
|
15909
15928
|
if (!Array.isArray(nameList) && nameList) throw new Error("nameList must be array");
|
15910
15929
|
const values = await ((_a = formRef.value) == null ? void 0 : _a.validateFields(nameList));
|
15911
|
-
const transformedKey = transformKeySubmitValue(values, props.omitNil);
|
15930
|
+
const transformedKey = transformKeySubmitValue(values, transformerMap.value, props.omitNil);
|
15912
15931
|
return transformedKey != null ? transformedKey : {};
|
15913
15932
|
};
|
15914
15933
|
const setFieldValue = (name, value) => {
|
@@ -15934,10 +15953,10 @@ function useAction({
|
|
15934
15953
|
var _a;
|
15935
15954
|
hasInitial.value = true;
|
15936
15955
|
(_a = formRef.value) == null ? void 0 : _a.clearValidate();
|
15937
|
-
formData.value = cloneDeep(initialValues.value);
|
15956
|
+
formData.value = cloneDeep(convertKeyInitialValue(initialValues.value, transformerMap.value));
|
15938
15957
|
Promise.resolve().then(() => {
|
15939
15958
|
hasInitial.value = false;
|
15940
|
-
onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, props.omitNil));
|
15959
|
+
onReset == null ? void 0 : onReset(transformKeySubmitValue(formData.value, transformerMap.value, props.omitNil));
|
15941
15960
|
});
|
15942
15961
|
};
|
15943
15962
|
const resetField = (name) => {
|
@@ -16147,7 +16166,8 @@ var FormItems = /* @__PURE__ */ defineComponent({
|
|
16147
16166
|
}
|
16148
16167
|
return createVNode(FormItem$2, {
|
16149
16168
|
"key": item.key,
|
16150
|
-
"item": item
|
16169
|
+
"item": item,
|
16170
|
+
"grid": mergeGrid.value
|
16151
16171
|
}, null);
|
16152
16172
|
});
|
16153
16173
|
});
|
@@ -16211,15 +16231,33 @@ var FormSubmitter = /* @__PURE__ */ defineComponent({
|
|
16211
16231
|
action
|
16212
16232
|
} = useInjectForm();
|
16213
16233
|
const formSlotsContext = useInjectSlots$1();
|
16214
|
-
const submit = () => {
|
16234
|
+
const submit = async () => {
|
16215
16235
|
var _a;
|
16216
|
-
|
16217
|
-
|
16236
|
+
if (!props.onSubmit) {
|
16237
|
+
action.submit();
|
16238
|
+
return;
|
16239
|
+
}
|
16240
|
+
const values = action.getFieldsValue();
|
16241
|
+
const response = (_a = props.onSubmit) == null ? void 0 : _a.call(props, values, action);
|
16242
|
+
const result = await response;
|
16243
|
+
if (result) {
|
16244
|
+
action.submit();
|
16245
|
+
}
|
16246
|
+
return result;
|
16218
16247
|
};
|
16219
|
-
const reset = () => {
|
16220
|
-
var _a
|
16221
|
-
(
|
16222
|
-
|
16248
|
+
const reset = async () => {
|
16249
|
+
var _a;
|
16250
|
+
if (!props.onReset) {
|
16251
|
+
action.reset();
|
16252
|
+
return;
|
16253
|
+
}
|
16254
|
+
const values = action.getFieldsValue();
|
16255
|
+
const response = (_a = props.onReset) == null ? void 0 : _a.call(props, values, action);
|
16256
|
+
const result = await response;
|
16257
|
+
if (result) {
|
16258
|
+
action.reset();
|
16259
|
+
}
|
16260
|
+
return result;
|
16223
16261
|
};
|
16224
16262
|
const resetButton = computed(() => {
|
16225
16263
|
const {
|
@@ -16301,6 +16339,26 @@ var FormSubmitter = /* @__PURE__ */ defineComponent({
|
|
16301
16339
|
}
|
16302
16340
|
});
|
16303
16341
|
|
16342
|
+
function transformer(items) {
|
16343
|
+
const transformerMap = /* @__PURE__ */ new Map();
|
16344
|
+
const handler = (items2) => {
|
16345
|
+
items2.forEach((item) => {
|
16346
|
+
var _a;
|
16347
|
+
if (item.name && (item.transform || item.convertValue)) {
|
16348
|
+
transformerMap.set(item.name, {
|
16349
|
+
transform: item.transform,
|
16350
|
+
convertValue: item.convertValue
|
16351
|
+
});
|
16352
|
+
} else if (item.children) {
|
16353
|
+
const children = (_a = runFunction(item.children)) != null ? _a : [];
|
16354
|
+
handler(children);
|
16355
|
+
}
|
16356
|
+
});
|
16357
|
+
};
|
16358
|
+
handler(items);
|
16359
|
+
return transformerMap;
|
16360
|
+
}
|
16361
|
+
|
16304
16362
|
function _isSlot$5(s) {
|
16305
16363
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
16306
16364
|
}
|
@@ -16317,6 +16375,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16317
16375
|
attrs
|
16318
16376
|
}) {
|
16319
16377
|
const mountedRef = ref(false);
|
16378
|
+
const transformerMap = shallowRef(/* @__PURE__ */ new Map());
|
16320
16379
|
const formRef = ref();
|
16321
16380
|
const prefixCls = usePrefixCls("form");
|
16322
16381
|
const formData = ref({});
|
@@ -16325,7 +16384,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16325
16384
|
var _a;
|
16326
16385
|
return (_a = props.formKey) != null ? _a : requestFormCacheId.toString();
|
16327
16386
|
});
|
16328
|
-
const [loading,
|
16387
|
+
const [loading, setLoading] = useMergedState$1(false, {
|
16329
16388
|
value: computed(() => props.loading),
|
16330
16389
|
onChange: (val) => {
|
16331
16390
|
var _a;
|
@@ -16370,8 +16429,9 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16370
16429
|
});
|
16371
16430
|
};
|
16372
16431
|
watch(() => props.items, () => {
|
16373
|
-
var _a;
|
16374
|
-
|
16432
|
+
var _a, _b;
|
16433
|
+
transformerMap.value = transformer((_a = props.items) != null ? _a : []);
|
16434
|
+
formItems.value = formatItems((_b = props.items) != null ? _b : []);
|
16375
16435
|
}, {
|
16376
16436
|
immediate: true
|
16377
16437
|
});
|
@@ -16382,7 +16442,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16382
16442
|
} = useInitialValues(props);
|
16383
16443
|
watch(initialValues, (newValues, oldValues) => {
|
16384
16444
|
if (!isEqual(newValues, oldValues)) {
|
16385
|
-
formData.value = cloneDeep(newValues);
|
16445
|
+
formData.value = cloneDeep(convertKeyInitialValue(newValues, transformerMap.value));
|
16386
16446
|
if (!props.request || props.requestAbort) {
|
16387
16447
|
Promise.resolve().then(() => {
|
16388
16448
|
hasInitial.value = false;
|
@@ -16394,22 +16454,22 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16394
16454
|
});
|
16395
16455
|
const onValuesChange = debounce(() => {
|
16396
16456
|
var _a;
|
16397
|
-
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, transformKeySubmitValue(cloneDeep(formData.value), props.omitNil));
|
16457
|
+
(_a = props.onValuesChange) == null ? void 0 : _a.call(props, transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil));
|
16398
16458
|
}, 200);
|
16399
16459
|
const onFinish = async () => {
|
16400
16460
|
if (!props.onFinish) return;
|
16401
16461
|
if (props.submitOnLoading) {
|
16402
16462
|
if (loading.value) return;
|
16403
|
-
|
16463
|
+
setLoading(true);
|
16404
16464
|
}
|
16405
16465
|
try {
|
16406
|
-
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), props.omitNil);
|
16466
|
+
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil);
|
16407
16467
|
await props.onFinish(finalValues);
|
16408
16468
|
} catch (error) {
|
16409
16469
|
console.log("\u{1F680} ~ onFinish ~ error:", error);
|
16410
16470
|
} finally {
|
16411
16471
|
if (props.submitOnLoading) {
|
16412
|
-
|
16472
|
+
setLoading(false);
|
16413
16473
|
}
|
16414
16474
|
}
|
16415
16475
|
};
|
@@ -16427,6 +16487,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16427
16487
|
formData,
|
16428
16488
|
initialValues,
|
16429
16489
|
hasInitial,
|
16490
|
+
transformerMap,
|
16430
16491
|
onFinish,
|
16431
16492
|
onReset: props.onReset,
|
16432
16493
|
onFinishFailed: props.onFinishFailed
|
@@ -16463,6 +16524,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16463
16524
|
}), null);
|
16464
16525
|
if (submitterProps.value.teleport) {
|
16465
16526
|
return createVNode(Teleport, {
|
16527
|
+
"defer": true,
|
16466
16528
|
"to": submitterProps.value.teleport
|
16467
16529
|
}, _isSlot$5(dom) ? dom : {
|
16468
16530
|
default: () => [dom]
|
@@ -16477,7 +16539,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16477
16539
|
const finalValues = (_c = (_b = (_a = formRef.value) == null ? void 0 : _a.getFieldsValue) == null ? void 0 : _b.call(_a, true)) != null ? _c : {};
|
16478
16540
|
Promise.resolve().then(() => {
|
16479
16541
|
var _a2;
|
16480
|
-
(_a2 = props.onInit) == null ? void 0 : _a2.call(props, transformKeySubmitValue(finalValues, props.omitNil), action);
|
16542
|
+
(_a2 = props.onInit) == null ? void 0 : _a2.call(props, transformKeySubmitValue(finalValues, transformerMap.value, props.omitNil), action);
|
16481
16543
|
});
|
16482
16544
|
});
|
16483
16545
|
useProvideForm({
|
@@ -17074,7 +17136,7 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17074
17136
|
}
|
17075
17137
|
return void 0;
|
17076
17138
|
});
|
17077
|
-
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed, {
|
17139
|
+
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed && props.submitter !== false, {
|
17078
17140
|
value: computed(() => props.collapsed),
|
17079
17141
|
onChange: (val) => {
|
17080
17142
|
emit("collapse", val);
|
@@ -17145,7 +17207,7 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17145
17207
|
firstRowFull = colSpan === 24 && !item.hidden;
|
17146
17208
|
}
|
17147
17209
|
const hidden = item.hidden || // 如果收起了
|
17148
|
-
|
17210
|
+
collapsed.value && (firstRowFull || // 如果 超过显示长度 且 总长度超过了 24
|
17149
17211
|
totalSize.value > showLength.value) && !!index;
|
17150
17212
|
if (hidden) {
|
17151
17213
|
if (!props.preserve) {
|
@@ -17173,7 +17235,10 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17173
17235
|
return {
|
17174
17236
|
...item,
|
17175
17237
|
hidden,
|
17176
|
-
formItemProps:
|
17238
|
+
formItemProps: {
|
17239
|
+
...item.title ? formItemFixStyle.value : {},
|
17240
|
+
...item.formItemProps
|
17241
|
+
},
|
17177
17242
|
colProps: {
|
17178
17243
|
span: colSpan
|
17179
17244
|
}
|
@@ -17217,9 +17282,16 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17217
17282
|
}), {
|
17218
17283
|
...slots,
|
17219
17284
|
submitter: ({
|
17285
|
+
props: props2,
|
17286
|
+
action,
|
17220
17287
|
defaultDoms
|
17221
17288
|
}) => {
|
17222
|
-
|
17289
|
+
var _a2;
|
17290
|
+
return createVNode(Fragment, null, [slots.submitter ? (_a2 = slots.submitter) == null ? void 0 : _a2.call(slots, {
|
17291
|
+
props: props2,
|
17292
|
+
action,
|
17293
|
+
defaultDoms
|
17294
|
+
}) : defaultDoms, needCollapse.value !== false && createVNode("a", {
|
17223
17295
|
"class": `${prefixCls}-collapse-button`,
|
17224
17296
|
"onClick": () => setCollapsed(!collapsed.value)
|
17225
17297
|
}, [collapsed.value ? intl.getMessage("form.collapsed", "\u5C55\u5F00") : intl.getMessage("form.expand", "\u6536\u8D77"), !!hiddenNum.value && `(${hiddenNum.value})`, createVNode(DownOutlined, {
|
@@ -17380,7 +17452,8 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17380
17452
|
},
|
17381
17453
|
emits: [],
|
17382
17454
|
setup(props, {
|
17383
|
-
slots
|
17455
|
+
slots,
|
17456
|
+
expose
|
17384
17457
|
}) {
|
17385
17458
|
const intl = useIntl();
|
17386
17459
|
const prefixCls = usePrefixCls("steps-form");
|
@@ -17397,7 +17470,7 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17397
17470
|
onChange: props.onCurrentChange
|
17398
17471
|
});
|
17399
17472
|
const regForm = (formRef, index) => {
|
17400
|
-
formArrayRef.value[index] = formRef;
|
17473
|
+
formArrayRef.value[index] = formRef.value;
|
17401
17474
|
};
|
17402
17475
|
const lastStep = computed(() => step.value === props.steps.length - 1);
|
17403
17476
|
const onFormFinish = async (name, formData) => {
|
@@ -17411,10 +17484,7 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17411
17484
|
const success = await props.onFinish(values);
|
17412
17485
|
if (success) {
|
17413
17486
|
setStep(0);
|
17414
|
-
formArrayRef.value.forEach((form) =>
|
17415
|
-
var _a;
|
17416
|
-
return (_a = form.value) == null ? void 0 : _a.reset();
|
17417
|
-
});
|
17487
|
+
formArrayRef.value.forEach((form) => form == null ? void 0 : form.reset());
|
17418
17488
|
}
|
17419
17489
|
} catch (error) {
|
17420
17490
|
console.log(error);
|
@@ -17423,10 +17493,9 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17423
17493
|
}
|
17424
17494
|
};
|
17425
17495
|
const onSubmit = () => {
|
17426
|
-
var _a;
|
17427
17496
|
const from = formArrayRef.value[step.value];
|
17428
17497
|
if (from) {
|
17429
|
-
|
17498
|
+
from == null ? void 0 : from.submit();
|
17430
17499
|
}
|
17431
17500
|
};
|
17432
17501
|
const prePage = () => {
|
@@ -17546,6 +17615,9 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17546
17615
|
regForm,
|
17547
17616
|
onFormFinish
|
17548
17617
|
});
|
17618
|
+
expose({
|
17619
|
+
formArrayRef
|
17620
|
+
});
|
17549
17621
|
return () => createVNode("div", {
|
17550
17622
|
"class": prefixCls
|
17551
17623
|
}, [stepsFormDom.value]);
|
@@ -19677,6 +19749,7 @@ const useProvideHover = (props) => {
|
|
19677
19749
|
}, props.rowHoverDelay.value + 50);
|
19678
19750
|
};
|
19679
19751
|
const hoverContext = {
|
19752
|
+
rowHover: props.rowHover,
|
19680
19753
|
hoverColumnKey,
|
19681
19754
|
hoverRowKey,
|
19682
19755
|
handleCellHover,
|
@@ -19687,6 +19760,7 @@ const useProvideHover = (props) => {
|
|
19687
19760
|
};
|
19688
19761
|
const useInjectHover = () => {
|
19689
19762
|
return inject(HoverContextKey, {
|
19763
|
+
rowHover: computed(() => void 0),
|
19690
19764
|
hoverRowKey: ref(),
|
19691
19765
|
hoverColumnKey: ref(),
|
19692
19766
|
handleCellHover: () => {
|
@@ -19708,9 +19782,6 @@ const useProvideLevel = () => {
|
|
19708
19782
|
function is(val, type) {
|
19709
19783
|
return toString.call(val) === `[object ${type}]`;
|
19710
19784
|
}
|
19711
|
-
function isFunction(val) {
|
19712
|
-
return typeof val === "function";
|
19713
|
-
}
|
19714
19785
|
function isArray(val) {
|
19715
19786
|
return val && Array.isArray(val);
|
19716
19787
|
}
|
@@ -19904,9 +19975,6 @@ function deleteNestItemData(data, indexs, childrenColumnName) {
|
|
19904
19975
|
currentData.splice(indexs[indexsLen - 1], 1);
|
19905
19976
|
return currentData;
|
19906
19977
|
}
|
19907
|
-
function isPromise(val) {
|
19908
|
-
return is(val, "Promise") && isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
19909
|
-
}
|
19910
19978
|
function ensureValidVNode(vnodes) {
|
19911
19979
|
return vnodes.some(
|
19912
19980
|
(vnode) => !isVNode(vnode) || vnode.type !== Comment$1 && !(vnode.type === Fragment && !ensureValidVNode(vnode.children))
|
@@ -19989,7 +20057,8 @@ const baseTableProps = () => ({
|
|
19989
20057
|
type: [Number, String]
|
19990
20058
|
},
|
19991
20059
|
size: {
|
19992
|
-
type: String
|
20060
|
+
type: String,
|
20061
|
+
default: "middle"
|
19993
20062
|
},
|
19994
20063
|
bordered: {
|
19995
20064
|
type: Boolean,
|
@@ -20085,6 +20154,10 @@ const baseTableProps = () => ({
|
|
20085
20154
|
type: Number,
|
20086
20155
|
default: 59
|
20087
20156
|
},
|
20157
|
+
rowHover: {
|
20158
|
+
type: Boolean,
|
20159
|
+
default: void 0
|
20160
|
+
},
|
20088
20161
|
rowKey: {
|
20089
20162
|
type: [Function, String]
|
20090
20163
|
},
|
@@ -20199,6 +20272,9 @@ const baseTableProps = () => ({
|
|
20199
20272
|
"onUpdate:dataSource": {
|
20200
20273
|
type: Function
|
20201
20274
|
},
|
20275
|
+
"onUpdate:columns": {
|
20276
|
+
type: Function
|
20277
|
+
},
|
20202
20278
|
columnEmptyText: {
|
20203
20279
|
type: [String, Boolean],
|
20204
20280
|
default: "-"
|
@@ -20211,6 +20287,7 @@ const baseTableProps = () => ({
|
|
20211
20287
|
params: Object,
|
20212
20288
|
defaultData: Array,
|
20213
20289
|
manual: Boolean,
|
20290
|
+
manualRequest: Boolean,
|
20214
20291
|
polling: [Number, Function],
|
20215
20292
|
debounceTime: Number,
|
20216
20293
|
onLoad: {
|
@@ -20282,8 +20359,9 @@ const tableProps = () => ({
|
|
20282
20359
|
|
20283
20360
|
const mergePropsAndPagination = ({ pagination }, intl) => {
|
20284
20361
|
if (pagination) {
|
20285
|
-
const { current, pageSize, total, showTotal, showSizeChanger } = pagination;
|
20362
|
+
const { current, pageSize, total, showTotal, showSizeChanger, ...rest } = pagination;
|
20286
20363
|
return {
|
20364
|
+
...rest,
|
20287
20365
|
current: current || 1,
|
20288
20366
|
total: total || 0,
|
20289
20367
|
pageSize: pageSize || 10,
|
@@ -20327,19 +20405,16 @@ const formatSorters = (sorter) => {
|
|
20327
20405
|
}
|
20328
20406
|
);
|
20329
20407
|
}
|
20330
|
-
return result.map((item) => {
|
20331
|
-
|
20332
|
-
|
20333
|
-
|
20334
|
-
order: (_a = item.order) == null ? void 0 : _a.toUpperCase()
|
20335
|
-
};
|
20336
|
-
});
|
20408
|
+
return result.map((item) => ({
|
20409
|
+
field: item.field,
|
20410
|
+
order: item.order
|
20411
|
+
}));
|
20337
20412
|
};
|
20338
20413
|
const useFetchData = (getData, props) => {
|
20339
20414
|
var _a;
|
20340
20415
|
const umountRef = ref(false);
|
20341
20416
|
const abortRef = ref(null);
|
20342
|
-
const manualRequestRef = ref(!!props.manual);
|
20417
|
+
const manualRequestRef = ref(!!(props.manual || props.manualRequest));
|
20343
20418
|
const pollingSetTimeRef = ref();
|
20344
20419
|
const pollingLoading = ref(false);
|
20345
20420
|
const keyword = ref("");
|
@@ -20500,16 +20575,13 @@ const useFetchData = (getData, props) => {
|
|
20500
20575
|
}
|
20501
20576
|
}
|
20502
20577
|
);
|
20503
|
-
watch(
|
20504
|
-
()
|
20505
|
-
()
|
20506
|
-
|
20507
|
-
|
20508
|
-
if (!props.manual) {
|
20509
|
-
manualRequestRef.value = false;
|
20510
|
-
}
|
20578
|
+
watch([() => props.manual, () => props.manualRequest], () => {
|
20579
|
+
abortFetch();
|
20580
|
+
fetchListDebounce(false);
|
20581
|
+
if (!props.manual || !props.manualRequest) {
|
20582
|
+
manualRequestRef.value = false;
|
20511
20583
|
}
|
20512
|
-
);
|
20584
|
+
});
|
20513
20585
|
watch(
|
20514
20586
|
() => pagination.value.current,
|
20515
20587
|
() => {
|
@@ -20777,7 +20849,7 @@ const useContainer = (props) => {
|
|
20777
20849
|
var _a2;
|
20778
20850
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceKey;
|
20779
20851
|
},
|
20780
|
-
columnsMap,
|
20852
|
+
() => columnsMap.value,
|
20781
20853
|
() => {
|
20782
20854
|
var _a2;
|
20783
20855
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceType;
|
@@ -20838,8 +20910,8 @@ function genProColumnToColumn(params, parents) {
|
|
20838
20910
|
var _a;
|
20839
20911
|
const { columns, counter } = params;
|
20840
20912
|
return (_a = columns == null ? void 0 : columns.map((columnProps, columnsIndex) => {
|
20841
|
-
var _a2, _b;
|
20842
|
-
const { key, dataIndex, disable, valueEnum } = columnProps;
|
20913
|
+
var _a2, _b, _c;
|
20914
|
+
const { key, dataIndex, disable, valueEnum, width } = columnProps;
|
20843
20915
|
const columnKey = genColumnKey(
|
20844
20916
|
// key || (dataIndex ? `${dataIndex.toString()}-${columnsIndex}` : ''),
|
20845
20917
|
key || (dataIndex == null ? void 0 : dataIndex.toString()),
|
@@ -20854,12 +20926,13 @@ function genProColumnToColumn(params, parents) {
|
|
20854
20926
|
...columnProps,
|
20855
20927
|
valueEnum,
|
20856
20928
|
fixed: config.fixed,
|
20857
|
-
|
20929
|
+
width: (_a2 = config.width) != null ? _a2 : width,
|
20930
|
+
disable: (_b = config.disable) != null ? _b : disable,
|
20858
20931
|
// width: columnProps.width || (columnProps.fixed ? 200 : undefined),
|
20859
20932
|
children: columnProps.children ? genProColumnToColumn(
|
20860
20933
|
{
|
20861
20934
|
...params,
|
20862
|
-
columns: (
|
20935
|
+
columns: (_c = columnProps == null ? void 0 : columnProps.children) != null ? _c : []
|
20863
20936
|
},
|
20864
20937
|
{ ...columnProps, key: columnKey }
|
20865
20938
|
) : void 0
|
@@ -24394,6 +24467,7 @@ function useFlattenRecords(pageDataRef, childrenColumnNameRef, expandedKeysRef,
|
|
24394
24467
|
}
|
24395
24468
|
|
24396
24469
|
const DEFAULT_PAGE_SIZE = 10;
|
24470
|
+
const PAGE_SIZE_OPTIONS = ["5", "10", "20", "50"];
|
24397
24471
|
function getPaginationParam(pagination, mergedPagination) {
|
24398
24472
|
const param = {
|
24399
24473
|
current: mergedPagination.current,
|
@@ -24423,7 +24497,11 @@ function extendsObject(...list) {
|
|
24423
24497
|
return result;
|
24424
24498
|
}
|
24425
24499
|
function usePagination(total, props, mergedData, onChange) {
|
24426
|
-
const innerPagination = reactive({
|
24500
|
+
const innerPagination = reactive({
|
24501
|
+
current: 1,
|
24502
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
24503
|
+
pageSizeOptions: PAGE_SIZE_OPTIONS
|
24504
|
+
});
|
24427
24505
|
const size = computed(() => props.size);
|
24428
24506
|
const mergedPagination = computed(() => {
|
24429
24507
|
const { pagination } = props;
|
@@ -24653,7 +24731,9 @@ const useCellProps = ({
|
|
24653
24731
|
if (copyCustomCellProps.rowSpan > 1) {
|
24654
24732
|
mergeCellStyles.height = `${getRowHeight(rowIndex, copyCustomCellProps.rowSpan) - 1}px`;
|
24655
24733
|
}
|
24656
|
-
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24734
|
+
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24735
|
+
style: { ...copyCustomCellProps.style, ...mergeCellStyles }
|
24736
|
+
});
|
24657
24737
|
return cellProps;
|
24658
24738
|
};
|
24659
24739
|
watchEffect(() => {
|
@@ -25678,6 +25758,7 @@ var _sfc_main$A = defineComponent({
|
|
25678
25758
|
var _a, _b;
|
25679
25759
|
return [
|
25680
25760
|
typeof props.column.title == "function" ? props.column.title({
|
25761
|
+
column: props.column.originColumn,
|
25681
25762
|
sortColumns: sortColumns.value,
|
25682
25763
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
25683
25764
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -25732,7 +25813,7 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
25732
25813
|
[`${_ctx.prefixCls}-header-cell-title-inner`]: true
|
25733
25814
|
}),
|
25734
25815
|
title: _ctx.altTitle,
|
25735
|
-
style: normalizeStyle(`
|
25816
|
+
style: normalizeStyle(`justify-content: ${_ctx.column.align}`)
|
25736
25817
|
}, [
|
25737
25818
|
createElementVNode(
|
25738
25819
|
"span",
|
@@ -25778,16 +25859,28 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
25778
25859
|
1040
|
25779
25860
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
25780
25861
|
)) : createCommentVNode("v-if", true),
|
25781
|
-
_ctx.column.headerTooltip ? (openBlock(), createBlock(_component_Tooltip, {
|
25782
|
-
|
25783
|
-
|
25784
|
-
|
25862
|
+
_ctx.column.headerTooltip ? (openBlock(), createBlock(_component_Tooltip, { key: 1 }, {
|
25863
|
+
title: withCtx(() => [
|
25864
|
+
_ctx.column.headerTooltip === true ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.title), { key: 0 })) : (openBlock(), createElementBlock(
|
25865
|
+
Fragment,
|
25866
|
+
{ key: 1 },
|
25867
|
+
[
|
25868
|
+
createTextVNode(
|
25869
|
+
toDisplayString(_ctx.column.headerTooltip),
|
25870
|
+
1
|
25871
|
+
/* TEXT */
|
25872
|
+
)
|
25873
|
+
],
|
25874
|
+
64
|
25875
|
+
/* STABLE_FRAGMENT */
|
25876
|
+
))
|
25877
|
+
]),
|
25785
25878
|
default: withCtx(() => [
|
25786
25879
|
createVNode(_component_InfoCircleOutlined, { style: { "margin-inline-start": "3px", "font-size": "12px" } })
|
25787
25880
|
]),
|
25788
25881
|
_: 1
|
25789
25882
|
/* STABLE */
|
25790
|
-
}
|
25883
|
+
})) : createCommentVNode("v-if", true)
|
25791
25884
|
], 14, _hoisted_1$d);
|
25792
25885
|
}
|
25793
25886
|
var HeaderCellTitle = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$w]]);
|
@@ -26972,6 +27065,7 @@ var _sfc_main$u = defineComponent({
|
|
26972
27065
|
var _a, _b;
|
26973
27066
|
return h(Fragment, [
|
26974
27067
|
typeof props.column.title == "function" ? props.column.title({
|
27068
|
+
column: props.column.originColumn,
|
26975
27069
|
sortColumns: sortColumns.value,
|
26976
27070
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
26977
27071
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -28401,28 +28495,29 @@ var _sfc_main$n = defineComponent({
|
|
28401
28495
|
event: rowDragEvent.value
|
28402
28496
|
});
|
28403
28497
|
}
|
28498
|
+
} else {
|
28499
|
+
return [
|
28500
|
+
createVNode(
|
28501
|
+
"span",
|
28502
|
+
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28503
|
+
null
|
28504
|
+
),
|
28505
|
+
createVNode(
|
28506
|
+
"span",
|
28507
|
+
{
|
28508
|
+
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28509
|
+
style: { maxWidth: `${parentOffsetWidth}px` }
|
28510
|
+
},
|
28511
|
+
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28512
|
+
)
|
28513
|
+
];
|
28404
28514
|
}
|
28405
|
-
return [
|
28406
|
-
createVNode(
|
28407
|
-
"span",
|
28408
|
-
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28409
|
-
null
|
28410
|
-
),
|
28411
|
-
createVNode(
|
28412
|
-
"span",
|
28413
|
-
{
|
28414
|
-
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28415
|
-
style: { maxWidth: `${parentOffsetWidth}px` }
|
28416
|
-
},
|
28417
|
-
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28418
|
-
)
|
28419
|
-
];
|
28420
28515
|
};
|
28421
28516
|
const renderDragGhost = () => {
|
28422
28517
|
if (!dragGhostImage) {
|
28423
28518
|
dragGhostImage = createVNode(renderDragGhostImage);
|
28519
|
+
render$1(dragGhostImage, dragGhostDom);
|
28424
28520
|
}
|
28425
|
-
render$1(dragGhostImage, dragGhostDom);
|
28426
28521
|
};
|
28427
28522
|
watch(
|
28428
28523
|
[prefixCls],
|
@@ -28828,7 +28923,7 @@ var _sfc_main$m = defineComponent({
|
|
28828
28923
|
newValue: modelValue.value,
|
28829
28924
|
oldValue
|
28830
28925
|
});
|
28831
|
-
if (isPromise
|
28926
|
+
if (isPromise(result)) {
|
28832
28927
|
result.then((res) => {
|
28833
28928
|
res && emit("closeEditor", [props.cellKey]);
|
28834
28929
|
}).catch(() => {
|
@@ -29048,7 +29143,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29048
29143
|
recordIndexs
|
29049
29144
|
})) != null ? _c2 : value;
|
29050
29145
|
const beforeOpen = (_e2 = (_d2 = tableContext.props) == null ? void 0 : _d2.onBeforeOpenEditor) == null ? void 0 : _e2.call(_d2, cellRenderArgs);
|
29051
|
-
if (isPromise
|
29146
|
+
if (isPromise(beforeOpen)) {
|
29052
29147
|
beforeOpen.then((res) => {
|
29053
29148
|
var _a3, _b3;
|
29054
29149
|
if (res) {
|
@@ -29069,7 +29164,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29069
29164
|
...cellRenderArgs,
|
29070
29165
|
oldValue: oldValuesMap.value[key]
|
29071
29166
|
});
|
29072
|
-
if (isPromise
|
29167
|
+
if (isPromise(beforeClose)) {
|
29073
29168
|
beforeClose.then((res) => {
|
29074
29169
|
var _a3, _b3;
|
29075
29170
|
if (res) {
|
@@ -29123,7 +29218,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29123
29218
|
color: option.color,
|
29124
29219
|
bordered: false
|
29125
29220
|
},
|
29126
|
-
option.text
|
29221
|
+
() => option.text
|
29127
29222
|
);
|
29128
29223
|
} else {
|
29129
29224
|
cellValue = option.text || emptyText;
|
@@ -29196,7 +29291,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29196
29291
|
// }),
|
29197
29292
|
shouldOpen: (isEllipsis) => {
|
29198
29293
|
var _a2;
|
29199
|
-
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) :
|
29294
|
+
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) : true;
|
29200
29295
|
},
|
29201
29296
|
onCellLeave: () => {
|
29202
29297
|
emit("cellLeave");
|
@@ -29828,7 +29923,7 @@ var _sfc_main$i = defineComponent({
|
|
29828
29923
|
() => (props.type === "center" ? tableContext.centerRowColumnsMap.value.get(props.rowKey) : columns.value).filter((item) => !!item)
|
29829
29924
|
);
|
29830
29925
|
const { tooltipOpen, leftPopupContainer, centerPopupContainer, rightPopupContainer } = useInjectBody();
|
29831
|
-
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey } = useInjectHover();
|
29926
|
+
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey, rowHover } = useInjectHover();
|
29832
29927
|
const popupContainer = computed(
|
29833
29928
|
() => props.type === "left" ? leftPopupContainer.value : props.type === "center" ? centerPopupContainer.value : props.type === "right" ? rightPopupContainer.value : null
|
29834
29929
|
);
|
@@ -29837,7 +29932,7 @@ var _sfc_main$i = defineComponent({
|
|
29837
29932
|
watch(
|
29838
29933
|
[isRowHover, bodyRow],
|
29839
29934
|
() => {
|
29840
|
-
bodyRow.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29935
|
+
bodyRow.value && rowHover.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29841
29936
|
},
|
29842
29937
|
{ immediate: true, flush: "post" }
|
29843
29938
|
);
|
@@ -29904,7 +29999,7 @@ var _sfc_main$i = defineComponent({
|
|
29904
29999
|
{
|
29905
30000
|
[`${prefixCls}-row`]: true,
|
29906
30001
|
[`${prefixCls}-row-level-${indent}`]: true,
|
29907
|
-
[`${prefixCls}-row-hover`]: isRowHover.value,
|
30002
|
+
[`${prefixCls}-row-hover`]: isRowHover.value && rowHover.value,
|
29908
30003
|
[`${prefixCls}-row-dragging`]: isDragging.value,
|
29909
30004
|
[`${prefixCls}-row-dragging-insert-target`]: tableContext.insertToRowKey.value === props.rowKey,
|
29910
30005
|
[`${prefixCls}-row-odd`]: !isEven,
|
@@ -30581,8 +30676,7 @@ var _sfc_main$g = defineComponent({
|
|
30581
30676
|
};
|
30582
30677
|
});
|
30583
30678
|
const bodyViewportStyle = computed(() => ({
|
30584
|
-
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value
|
30585
|
-
// width: `calc(100% + 0px)`,
|
30679
|
+
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value : 0}px)`,
|
30586
30680
|
overflowX: "hidden",
|
30587
30681
|
overflowY: "auto",
|
30588
30682
|
height: "100%"
|
@@ -31868,9 +31962,14 @@ var _sfc_main$f = defineComponent({
|
|
31868
31962
|
var _a;
|
31869
31963
|
const width = col.width;
|
31870
31964
|
const result = (_a = props.onResizeColumn) == null ? void 0 : _a.call(props, w, col, action);
|
31871
|
-
if (result !== false
|
31872
|
-
|
31873
|
-
|
31965
|
+
if (result !== false) {
|
31966
|
+
if (!(width === w && col.width === w)) {
|
31967
|
+
col.width = width !== col.width ? col.width : w;
|
31968
|
+
triggerRef(rawColumns);
|
31969
|
+
}
|
31970
|
+
if (action === "end") {
|
31971
|
+
emit("update:columns", rawColumns.value, "resize");
|
31972
|
+
}
|
31874
31973
|
}
|
31875
31974
|
},
|
31876
31975
|
onRowDragEnd: (opt) => {
|
@@ -32044,7 +32143,7 @@ var _sfc_main$f = defineComponent({
|
|
32044
32143
|
rawColumns.value.splice(index, 1);
|
32045
32144
|
}
|
32046
32145
|
triggerRef(rawColumns);
|
32047
|
-
emit("update:columns", rawColumns.value);
|
32146
|
+
emit("update:columns", rawColumns.value, "drag");
|
32048
32147
|
};
|
32049
32148
|
if (isPromise(dragEnd)) {
|
32050
32149
|
dragEnd.then(() => {
|
@@ -33285,10 +33384,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33285
33384
|
class: normalizeClass(`${_ctx.prefixCls}-toolbar-options`)
|
33286
33385
|
}, {
|
33287
33386
|
default: withCtx(() => [
|
33288
|
-
_ctx.mergeOptions.search !== false && !(!!_ctx.title || !!_ctx.$slots.title) ? (openBlock(),
|
33289
|
-
|
33290
|
-
|
33291
|
-
|
33387
|
+
_ctx.mergeOptions.search !== false && !(!!_ctx.title || !!_ctx.$slots.title) ? (openBlock(), createElementBlock(
|
33388
|
+
Fragment,
|
33389
|
+
{ key: 0 },
|
33390
|
+
[
|
33391
|
+
createVNode(_component_ProSearch, mergeProps(_ctx.searchConfig, { onSearch: _ctx.onSearch }), null, 16, ["onSearch"]),
|
33392
|
+
renderSlot(_ctx.$slots, "searchExtra", {
|
33393
|
+
setParams: _ctx.actionsRef.setParams
|
33394
|
+
})
|
33395
|
+
],
|
33396
|
+
64
|
33397
|
+
/* STABLE_FRAGMENT */
|
33398
|
+
)) : createCommentVNode("v-if", true)
|
33292
33399
|
]),
|
33293
33400
|
_: 3
|
33294
33401
|
/* FORWARDED */
|
@@ -33307,7 +33414,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33307
33414
|
class: normalizeClass(`${_ctx.prefixCls}-toolbar-actions`)
|
33308
33415
|
}, {
|
33309
33416
|
default: withCtx(() => [
|
33310
|
-
_ctx.mergeOptions.search !== false && (!!_ctx.title || !!_ctx.$slots.title) ? (openBlock(),
|
33417
|
+
_ctx.mergeOptions.search !== false && (!!_ctx.title || !!_ctx.$slots.title) ? (openBlock(), createElementBlock(
|
33418
|
+
Fragment,
|
33419
|
+
{ key: 0 },
|
33420
|
+
[
|
33421
|
+
createVNode(_component_ProSearch, mergeProps(_ctx.searchConfig, { onSearch: _ctx.onSearch }), null, 16, ["onSearch"]),
|
33422
|
+
renderSlot(_ctx.$slots, "searchExtra", {
|
33423
|
+
setParams: _ctx.actionsRef.setParams
|
33424
|
+
})
|
33425
|
+
],
|
33426
|
+
64
|
33427
|
+
/* STABLE_FRAGMENT */
|
33428
|
+
)) : createCommentVNode("v-if", true),
|
33311
33429
|
renderSlot(_ctx.$slots, "actions", {
|
33312
33430
|
setParams: _ctx.actionsRef.setParams
|
33313
33431
|
}),
|
@@ -33626,7 +33744,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33626
33744
|
const {
|
33627
33745
|
hoverRowKey
|
33628
33746
|
} = useProvideHover({
|
33629
|
-
rowHoverDelay: computed(() => props.rowHoverDelay)
|
33747
|
+
rowHoverDelay: computed(() => props.rowHoverDelay),
|
33748
|
+
rowHover: computed(() => props.rowHover)
|
33630
33749
|
});
|
33631
33750
|
const mergedPrefixCls = computed(() => {
|
33632
33751
|
var _a2;
|
@@ -33670,10 +33789,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33670
33789
|
if (props.pagination === false) {
|
33671
33790
|
return false;
|
33672
33791
|
}
|
33673
|
-
|
33674
|
-
return Object.assign({}, pagination.value, props.pagination);
|
33675
|
-
}
|
33676
|
-
return Object.assign({}, props.pagination, pagination.value);
|
33792
|
+
return pagination.value;
|
33677
33793
|
});
|
33678
33794
|
const formSubmitLoading = computed(() => {
|
33679
33795
|
if (typeof loading.value === "boolean") {
|
@@ -33735,9 +33851,44 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33735
33851
|
};
|
33736
33852
|
return loopFilter(tableColumn.value);
|
33737
33853
|
});
|
33854
|
+
const onColumnsChange = (rawColumns, action) => {
|
33855
|
+
var _a2;
|
33856
|
+
const newMap = {
|
33857
|
+
...counter.columnsMap.value
|
33858
|
+
};
|
33859
|
+
const newColumns = rawColumns.map((item) => genColumnKey(item.key, item.index));
|
33860
|
+
if (action === "resize") {
|
33861
|
+
const loopSetWidth = (rawColumns2) => {
|
33862
|
+
rawColumns2.forEach((item) => {
|
33863
|
+
var _a3;
|
33864
|
+
const key = genColumnKey(item.key, item.index);
|
33865
|
+
const newSetting = {
|
33866
|
+
...newMap[key]
|
33867
|
+
};
|
33868
|
+
if ((_a3 = item.children) == null ? void 0 : _a3.length) {
|
33869
|
+
loopSetWidth(item.children);
|
33870
|
+
} else {
|
33871
|
+
newSetting.width = item.width;
|
33872
|
+
newMap[key] = newSetting;
|
33873
|
+
}
|
33874
|
+
});
|
33875
|
+
};
|
33876
|
+
loopSetWidth(rawColumns);
|
33877
|
+
} else {
|
33878
|
+
newColumns.forEach((key, order) => {
|
33879
|
+
newMap[key] = {
|
33880
|
+
...newMap[key] || {},
|
33881
|
+
order
|
33882
|
+
};
|
33883
|
+
});
|
33884
|
+
}
|
33885
|
+
counter.setColumnsMap(newMap);
|
33886
|
+
counter.setSortKeyColumns(newColumns);
|
33887
|
+
(_a2 = props["onUpdate:columns"]) == null ? void 0 : _a2.call(props, rawColumns, action);
|
33888
|
+
};
|
33738
33889
|
const formItems = computed(() => {
|
33739
33890
|
var _a2, _b, _c;
|
33740
|
-
if (
|
33891
|
+
if (props.search === false) {
|
33741
33892
|
return [];
|
33742
33893
|
}
|
33743
33894
|
if ((_b = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
|
@@ -33749,12 +33900,12 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33749
33900
|
}
|
33750
33901
|
return true;
|
33751
33902
|
}).map((item) => {
|
33752
|
-
return {
|
33903
|
+
return omitKeysAndUndefined({
|
33753
33904
|
...item,
|
33754
33905
|
width: void 0,
|
33755
33906
|
tooltip: item.headerTooltip,
|
33756
33907
|
name: item.dataIndex
|
33757
|
-
};
|
33908
|
+
}, ["dataIndex", "width"]);
|
33758
33909
|
});
|
33759
33910
|
});
|
33760
33911
|
const preserveRecordsRef = ref(/* @__PURE__ */ new Map());
|
@@ -33771,8 +33922,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33771
33922
|
}
|
33772
33923
|
onCleanSelected();
|
33773
33924
|
});
|
33774
|
-
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0, {
|
33775
|
-
value: computed(() => props.rowSelection ? props.rowSelection.selectedRowKeys : void 0)
|
33925
|
+
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.selectedRowKeys || (props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0), {
|
33926
|
+
value: computed(() => props.selectedRowKeys || (props.rowSelection ? props.rowSelection.selectedRowKeys : void 0))
|
33776
33927
|
});
|
33777
33928
|
const rowSelection = computed(() => ({
|
33778
33929
|
selectedRowKeys: selectedRowKeys.value,
|
@@ -33909,7 +34060,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33909
34060
|
actions: slots.alertActions
|
33910
34061
|
}), createVNode(InteralTable, mergeProps({
|
33911
34062
|
"ref": table
|
33912
|
-
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys"]), {
|
34063
|
+
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys", "onUpdate:columns"]), {
|
33913
34064
|
"prefixCls": mergedPrefixCls.value,
|
33914
34065
|
"columns": mergeColumns || [],
|
33915
34066
|
"size": counter.tableSize.value,
|
@@ -33920,7 +34071,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33920
34071
|
"expandIcon": expandIcon,
|
33921
34072
|
"expandedRowRender": expandedRowRender,
|
33922
34073
|
"hasContextmenuPopup": !!slots.contextmenuPopup,
|
33923
|
-
"onChange": onTableChange
|
34074
|
+
"onChange": onTableChange,
|
34075
|
+
"onUpdate:columns": onColumnsChange
|
33924
34076
|
}), {
|
33925
34077
|
...slots,
|
33926
34078
|
footer: props.footer || slots.footer
|
@@ -33949,7 +34101,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33949
34101
|
"tableShowCard": props.cardProps !== false,
|
33950
34102
|
"loading": formSubmitLoading.value,
|
33951
34103
|
"beforeSearchSubmit": props.beforeSearchSubmit,
|
33952
|
-
"manual": props.manual,
|
34104
|
+
"manual": props.manual || props.manualRequest,
|
33953
34105
|
"onReset": props.onReset,
|
33954
34106
|
"onSubmit": props.onSubmit,
|
33955
34107
|
"onFormSearchSubmit": onFormSearchSubmit,
|
@@ -34790,6 +34942,10 @@ var FormColWrapper = /* @__PURE__ */ defineComponent({
|
|
34790
34942
|
colProps: {
|
34791
34943
|
type: Object,
|
34792
34944
|
default: void 0
|
34945
|
+
},
|
34946
|
+
grid: {
|
34947
|
+
type: Boolean,
|
34948
|
+
default: void 0
|
34793
34949
|
}
|
34794
34950
|
},
|
34795
34951
|
setup(props, {
|
@@ -34803,9 +34959,13 @@ var FormColWrapper = /* @__PURE__ */ defineComponent({
|
|
34803
34959
|
var _a;
|
34804
34960
|
return (_a = props.colProps) != null ? _a : colProps == null ? void 0 : colProps.value;
|
34805
34961
|
});
|
34962
|
+
const mergeGrid = computed(() => {
|
34963
|
+
var _a;
|
34964
|
+
return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
|
34965
|
+
});
|
34806
34966
|
return () => {
|
34807
34967
|
var _a;
|
34808
|
-
if (
|
34968
|
+
if (mergeGrid.value) {
|
34809
34969
|
return createVNode(Col, mergeColProps.value, {
|
34810
34970
|
default: () => {
|
34811
34971
|
var _a2;
|
@@ -34827,7 +34987,7 @@ var FormTitle = /* @__PURE__ */ defineComponent({
|
|
34827
34987
|
default: void 0
|
34828
34988
|
},
|
34829
34989
|
tooltip: {
|
34830
|
-
type: String,
|
34990
|
+
type: [String, Boolean],
|
34831
34991
|
default: ""
|
34832
34992
|
}
|
34833
34993
|
},
|
@@ -34845,12 +35005,17 @@ var FormTitle = /* @__PURE__ */ defineComponent({
|
|
34845
35005
|
"props": {
|
34846
35006
|
formData: formData.value
|
34847
35007
|
}
|
34848
|
-
}, null)]), props.tooltip && createVNode(Tooltip, {
|
34849
|
-
"title": props.tooltip
|
34850
|
-
}, {
|
35008
|
+
}, null)]), props.tooltip && createVNode(Tooltip, null, {
|
34851
35009
|
default: () => [createVNode(QuestionCircleOutlined, {
|
34852
|
-
"class": `${prefixCls}-item-tooltip
|
34853
|
-
|
35010
|
+
"class": `${prefixCls}-item-tooltip`,
|
35011
|
+
"style": "margin-right: 3px"
|
35012
|
+
}, null)],
|
35013
|
+
title: () => props.tooltip === true ? createVNode(RenderVNode$1, {
|
35014
|
+
"vnode": title.value,
|
35015
|
+
"props": {
|
35016
|
+
formData: formData.value
|
35017
|
+
}
|
35018
|
+
}, null) : props.tooltip
|
34854
35019
|
})]);
|
34855
35020
|
}
|
34856
35021
|
});
|
@@ -34867,7 +35032,7 @@ var FormGroup = /* @__PURE__ */ defineComponent({
|
|
34867
35032
|
default: void 0
|
34868
35033
|
},
|
34869
35034
|
tooltip: {
|
34870
|
-
type: String,
|
35035
|
+
type: [String, Boolean],
|
34871
35036
|
default: void 0
|
34872
35037
|
},
|
34873
35038
|
colProps: {
|
@@ -34971,25 +35136,18 @@ var FormGroup$1 = /*#__PURE__*/Object.freeze({
|
|
34971
35136
|
function useFieldValue({
|
34972
35137
|
namePath,
|
34973
35138
|
initialValue,
|
34974
|
-
convertValue
|
34975
|
-
transform
|
35139
|
+
convertValue
|
34976
35140
|
}) {
|
34977
35141
|
const fieldValue = shallowRef();
|
34978
|
-
const { formData, initialValues
|
35142
|
+
const { formData, initialValues } = useInjectForm();
|
34979
35143
|
const modelValue = computed(() => get(formData.value, namePath.value));
|
34980
35144
|
const onValueChange = (value) => {
|
34981
|
-
set(
|
34982
|
-
formData.value,
|
34983
|
-
namePath.value,
|
34984
|
-
transform ? transform(value, namePath.value, formData.value) : value
|
34985
|
-
);
|
35145
|
+
set(formData.value, namePath.value, value);
|
34986
35146
|
};
|
34987
35147
|
watch(
|
34988
35148
|
modelValue,
|
34989
35149
|
(newValue) => {
|
34990
|
-
fieldValue.value = cloneDeep(
|
34991
|
-
convertValue ? convertValue(newValue, namePath.value) : newValue
|
34992
|
-
);
|
35150
|
+
fieldValue.value = cloneDeep(newValue);
|
34993
35151
|
},
|
34994
35152
|
{
|
34995
35153
|
immediate: true,
|
@@ -34998,11 +35156,14 @@ function useFieldValue({
|
|
34998
35156
|
);
|
34999
35157
|
const initFieldInitialValue = () => {
|
35000
35158
|
var _a;
|
35001
|
-
if (
|
35002
|
-
|
35159
|
+
if (
|
35160
|
+
// !mountedRef.value &&
|
35161
|
+
typeof modelValue.value === "undefined" && typeof initialValue !== "undefined"
|
35162
|
+
) {
|
35163
|
+
const value = convertValue ? convertValue(initialValue, namePath.value) : initialValue;
|
35003
35164
|
set(formData.value, namePath.value, cloneDeep(value));
|
35004
|
-
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(
|
35005
|
-
fieldValue.value =
|
35165
|
+
set((_a = initialValues == null ? void 0 : initialValues.value) != null ? _a : {}, namePath.value, cloneDeep(initialValue));
|
35166
|
+
fieldValue.value = value;
|
35006
35167
|
}
|
35007
35168
|
};
|
35008
35169
|
initFieldInitialValue();
|
@@ -35031,7 +35192,7 @@ var FormSet = /* @__PURE__ */ defineComponent({
|
|
35031
35192
|
default: void 0
|
35032
35193
|
},
|
35033
35194
|
tooltip: {
|
35034
|
-
type: String,
|
35195
|
+
type: [String, Boolean],
|
35035
35196
|
default: void 0
|
35036
35197
|
},
|
35037
35198
|
colProps: {
|
@@ -35445,7 +35606,7 @@ var FormListContainer = /* @__PURE__ */ defineComponent({
|
|
35445
35606
|
default: void 0
|
35446
35607
|
},
|
35447
35608
|
tooltip: {
|
35448
|
-
type: String,
|
35609
|
+
type: [String, Boolean],
|
35449
35610
|
default: void 0
|
35450
35611
|
},
|
35451
35612
|
readonly: {
|
@@ -35712,7 +35873,7 @@ var FormList = /* @__PURE__ */ defineComponent({
|
|
35712
35873
|
default: void 0
|
35713
35874
|
},
|
35714
35875
|
tooltip: {
|
35715
|
-
type: String,
|
35876
|
+
type: [String, Boolean],
|
35716
35877
|
default: void 0
|
35717
35878
|
},
|
35718
35879
|
colProps: {
|
@@ -36542,6 +36703,10 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36542
36703
|
item: {
|
36543
36704
|
type: Object,
|
36544
36705
|
default: () => ({})
|
36706
|
+
},
|
36707
|
+
grid: {
|
36708
|
+
type: Boolean,
|
36709
|
+
default: void 0
|
36545
36710
|
}
|
36546
36711
|
},
|
36547
36712
|
setup(props) {
|
@@ -36576,6 +36741,10 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36576
36741
|
transform: props.item.transform
|
36577
36742
|
});
|
36578
36743
|
const fieldRef = ref();
|
36744
|
+
const mergeGrid = computed(() => {
|
36745
|
+
var _a;
|
36746
|
+
return (_a = props.grid) != null ? _a : grid == null ? void 0 : grid.value;
|
36747
|
+
});
|
36579
36748
|
const fieldType = computed(() => {
|
36580
36749
|
var _a;
|
36581
36750
|
return (_a = props.item.fieldType) != null ? _a : "text";
|
@@ -36632,7 +36801,7 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36632
36801
|
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,
|
36633
36802
|
placeholder: (_f = props.item.placeholder) != null ? _f : baseProps == null ? void 0 : baseProps.placeholder,
|
36634
36803
|
options: (_h = (_g = props.item.options) != null ? _g : baseProps == null ? void 0 : baseProps.options) != null ? _h : baseProps == null ? void 0 : baseProps.treeData,
|
36635
|
-
allowClear: (_j = (_i = props.item.allowClear) != null ? _i : baseProps == null ? void 0 : baseProps.allowClear) != null ? _j :
|
36804
|
+
allowClear: (_j = (_i = props.item.allowClear) != null ? _i : baseProps == null ? void 0 : baseProps.allowClear) != null ? _j : true
|
36636
36805
|
};
|
36637
36806
|
return omitUndefined({
|
36638
36807
|
valueEnum: props.item.valueEnum,
|
@@ -36658,7 +36827,7 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36658
36827
|
};
|
36659
36828
|
if (props.item.width && !fieldWidthSizeMap[props.item.width]) {
|
36660
36829
|
newStyle.width = isNumber$2(props.item.width) ? props.item.width + "px" : props.item.width;
|
36661
|
-
} else if (
|
36830
|
+
} else if (mergeGrid == null ? void 0 : mergeGrid.value) {
|
36662
36831
|
newStyle.maxWidth = "100%";
|
36663
36832
|
newStyle.width = "100%";
|
36664
36833
|
}
|
@@ -36698,12 +36867,14 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36698
36867
|
}, [createVNode(FormTitle, {
|
36699
36868
|
"title": props.item.title,
|
36700
36869
|
"tooltip": props.item.tooltip
|
36701
|
-
}, null)]), createVNode(
|
36870
|
+
}, null)]), createVNode("div", {
|
36871
|
+
"class": `${prefixCls}-item-title-extra`
|
36872
|
+
}, [createVNode(RenderVNode$1, {
|
36702
36873
|
"vnode": extraRender,
|
36703
36874
|
"props": {
|
36704
36875
|
formData: formData.value
|
36705
36876
|
}
|
36706
|
-
}, null)]);
|
36877
|
+
}, null)])]);
|
36707
36878
|
}
|
36708
36879
|
return temp;
|
36709
36880
|
});
|
@@ -36750,19 +36921,6 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36750
36921
|
});
|
36751
36922
|
return () => {
|
36752
36923
|
var _a, _b;
|
36753
|
-
const render = getSlot(props.item.render, formSlotsContext);
|
36754
|
-
if (render) {
|
36755
|
-
return createVNode(FormColWrapper, {
|
36756
|
-
"colProps": props.item.colProps
|
36757
|
-
}, {
|
36758
|
-
default: () => [createVNode(RenderVNode$1, {
|
36759
|
-
"vnode": render,
|
36760
|
-
"props": {
|
36761
|
-
formData: formData.value
|
36762
|
-
}
|
36763
|
-
}, null)]
|
36764
|
-
});
|
36765
|
-
}
|
36766
36924
|
const renderFormItem = getSlot(props.item.renderFormItem, formSlotsContext);
|
36767
36925
|
const extraRender = getSlot((_a = props.item.extra) == null ? void 0 : _a.item, formSlotsContext);
|
36768
36926
|
const FieldComponent = (_b = fieldComponentMap[fieldType.value]) != null ? _b : fieldComponentMap["text"];
|
@@ -36790,22 +36948,33 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36790
36948
|
if (extraRender) {
|
36791
36949
|
defaultDom = createVNode("div", {
|
36792
36950
|
"style": "display: flex; flex-direction: row; justify-content: flex-start; align-items: center;"
|
36793
|
-
}, [defaultDom, createVNode(
|
36951
|
+
}, [defaultDom, createVNode("div", {
|
36952
|
+
"style": "margin-inline-start: 5px; flex-shrink: 0;"
|
36953
|
+
}, [createVNode(RenderVNode$1, {
|
36794
36954
|
"vnode": extraRender,
|
36795
36955
|
"props": {
|
36796
36956
|
formData: formData.value,
|
36797
36957
|
listName: listName == null ? void 0 : listName.value,
|
36798
36958
|
name: props.item.name
|
36799
36959
|
}
|
36800
|
-
}, null)]);
|
36960
|
+
}, null)])]);
|
36801
36961
|
}
|
36962
|
+
const formItemDom = createVNode(Form$1.Item, restItemProps.value, {
|
36963
|
+
default: () => [defaultDom],
|
36964
|
+
...slotsGetter.value
|
36965
|
+
});
|
36966
|
+
const render = getSlot(props.item.render, formSlotsContext);
|
36802
36967
|
return createVNode(FormColWrapper, {
|
36803
|
-
"colProps": props.item.colProps
|
36968
|
+
"colProps": props.item.colProps,
|
36969
|
+
"grid": mergeGrid.value
|
36804
36970
|
}, {
|
36805
|
-
default: () => [createVNode(
|
36806
|
-
|
36807
|
-
|
36808
|
-
|
36971
|
+
default: () => [render ? createVNode(RenderVNode$1, {
|
36972
|
+
"vnode": render,
|
36973
|
+
"props": {
|
36974
|
+
formData: formData.value,
|
36975
|
+
defaultDom: formItemDom
|
36976
|
+
}
|
36977
|
+
}, null) : formItemDom]
|
36809
36978
|
});
|
36810
36979
|
};
|
36811
36980
|
}
|