pro-design-vue 1.0.0-rc.12 → 1.0.0-rc.14
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 +211 -132
- 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 +211 -132
- 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 +4 -3
- 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/FormGroup.d.ts +3 -1
- package/es/components/form/src/components/FormItem.mjs +20 -22
- package/es/components/form/src/components/FormItem.mjs.map +1 -1
- package/es/components/form/src/components/FormList.d.ts +3 -1
- package/es/components/form/src/components/FormListContainer.d.ts +3 -1
- package/es/components/form/src/components/FormSet.d.ts +3 -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 +3 -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 +1 -2
- 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 +3 -7
- package/es/components/form/src/layouts/StepsForm.mjs.map +1 -1
- package/es/components/form/src/type.d.ts +17 -8
- 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 +1 -1
- 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 +18 -6
- 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 +18 -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 +22 -4
- package/es/components/table/src/components/Table.mjs +47 -13
- package/es/components/table/src/components/Table.mjs.map +1 -1
- package/es/components/table/src/components/interface.d.ts +30 -3
- package/es/components/table/src/components/interface.mjs +9 -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 +2 -1
- 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 +6 -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 +54 -16
- 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/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 +4 -3
- 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/FormGroup.d.ts +3 -1
- package/lib/components/form/src/components/FormItem.js +20 -22
- package/lib/components/form/src/components/FormItem.js.map +1 -1
- package/lib/components/form/src/components/FormList.d.ts +3 -1
- package/lib/components/form/src/components/FormListContainer.d.ts +3 -1
- package/lib/components/form/src/components/FormSet.d.ts +3 -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 +3 -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 +1 -2
- 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 +3 -7
- package/lib/components/form/src/layouts/StepsForm.js.map +1 -1
- package/lib/components/form/src/type.d.ts +17 -8
- 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 +1 -1
- 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 +17 -5
- 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 +18 -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 +22 -4
- package/lib/components/table/src/components/Table.js +46 -12
- package/lib/components/table/src/components/Table.js.map +1 -1
- package/lib/components/table/src/components/interface.d.ts +30 -3
- package/lib/components/table/src/components/interface.js +9 -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 +2 -1
- 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 +6 -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 +54 -16
- 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/index.css +1 -1
- package/theme-chalk/pro-form.css +1 -1
- package/theme-chalk/src/form.less +5 -0
- package/theme-chalk/src/table/table.less +1 -1
package/dist/index.full.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Pro Design Vue v1.0.0-rc.
|
1
|
+
/*! Pro Design Vue v1.0.0-rc.14 */
|
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-rc.
|
16
|
+
const version$1 = "1.0.0-rc.14";
|
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
|
});
|
@@ -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);
|
@@ -16231,15 +16231,33 @@ var FormSubmitter = /* @__PURE__ */ defineComponent({
|
|
16231
16231
|
action
|
16232
16232
|
} = useInjectForm();
|
16233
16233
|
const formSlotsContext = useInjectSlots$1();
|
16234
|
-
const submit = () => {
|
16234
|
+
const submit = async () => {
|
16235
16235
|
var _a;
|
16236
|
-
|
16237
|
-
|
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;
|
16238
16247
|
};
|
16239
|
-
const reset = () => {
|
16240
|
-
var _a
|
16241
|
-
(
|
16242
|
-
|
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;
|
16243
16261
|
};
|
16244
16262
|
const resetButton = computed(() => {
|
16245
16263
|
const {
|
@@ -16366,7 +16384,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16366
16384
|
var _a;
|
16367
16385
|
return (_a = props.formKey) != null ? _a : requestFormCacheId.toString();
|
16368
16386
|
});
|
16369
|
-
const [loading,
|
16387
|
+
const [loading, setLoading] = useMergedState$1(false, {
|
16370
16388
|
value: computed(() => props.loading),
|
16371
16389
|
onChange: (val) => {
|
16372
16390
|
var _a;
|
@@ -16442,7 +16460,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16442
16460
|
if (!props.onFinish) return;
|
16443
16461
|
if (props.submitOnLoading) {
|
16444
16462
|
if (loading.value) return;
|
16445
|
-
|
16463
|
+
setLoading(true);
|
16446
16464
|
}
|
16447
16465
|
try {
|
16448
16466
|
const finalValues = transformKeySubmitValue(cloneDeep(formData.value), transformerMap.value, props.omitNil);
|
@@ -16451,7 +16469,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16451
16469
|
console.log("\u{1F680} ~ onFinish ~ error:", error);
|
16452
16470
|
} finally {
|
16453
16471
|
if (props.submitOnLoading) {
|
16454
|
-
|
16472
|
+
setLoading(false);
|
16455
16473
|
}
|
16456
16474
|
}
|
16457
16475
|
};
|
@@ -16506,6 +16524,7 @@ var BaseForm = /* @__PURE__ */ defineComponent({
|
|
16506
16524
|
}), null);
|
16507
16525
|
if (submitterProps.value.teleport) {
|
16508
16526
|
return createVNode(Teleport, {
|
16527
|
+
"defer": true,
|
16509
16528
|
"to": submitterProps.value.teleport
|
16510
16529
|
}, _isSlot$5(dom) ? dom : {
|
16511
16530
|
default: () => [dom]
|
@@ -17081,7 +17100,6 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17081
17100
|
}
|
17082
17101
|
if (props.defaultColsNumber !== void 0) {
|
17083
17102
|
const oneRowControlsNumber = 24 / spanSize.value.span - 1;
|
17084
|
-
console.log("\u{1F680} ~ showLength ~ oneRowControlsNumber:", oneRowControlsNumber);
|
17085
17103
|
return props.defaultColsNumber > oneRowControlsNumber ? oneRowControlsNumber : props.defaultColsNumber;
|
17086
17104
|
}
|
17087
17105
|
return Math.max(1, 24 / spanSize.value.span - 1);
|
@@ -17118,7 +17136,7 @@ var QueryFilter = /* @__PURE__ */ defineComponent({
|
|
17118
17136
|
}
|
17119
17137
|
return void 0;
|
17120
17138
|
});
|
17121
|
-
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed &&
|
17139
|
+
const [collapsed, setCollapsed] = useMergedState$1(() => props.defaultCollapsed && props.submitter !== false, {
|
17122
17140
|
value: computed(() => props.collapsed),
|
17123
17141
|
onChange: (val) => {
|
17124
17142
|
emit("collapse", val);
|
@@ -17452,7 +17470,7 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17452
17470
|
onChange: props.onCurrentChange
|
17453
17471
|
});
|
17454
17472
|
const regForm = (formRef, index) => {
|
17455
|
-
formArrayRef.value[index] = formRef;
|
17473
|
+
formArrayRef.value[index] = formRef.value;
|
17456
17474
|
};
|
17457
17475
|
const lastStep = computed(() => step.value === props.steps.length - 1);
|
17458
17476
|
const onFormFinish = async (name, formData) => {
|
@@ -17466,10 +17484,7 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17466
17484
|
const success = await props.onFinish(values);
|
17467
17485
|
if (success) {
|
17468
17486
|
setStep(0);
|
17469
|
-
formArrayRef.value.forEach((form) =>
|
17470
|
-
var _a;
|
17471
|
-
return (_a = form.value) == null ? void 0 : _a.reset();
|
17472
|
-
});
|
17487
|
+
formArrayRef.value.forEach((form) => form == null ? void 0 : form.reset());
|
17473
17488
|
}
|
17474
17489
|
} catch (error) {
|
17475
17490
|
console.log(error);
|
@@ -17478,10 +17493,9 @@ var StepsForm = /* @__PURE__ */ defineComponent({
|
|
17478
17493
|
}
|
17479
17494
|
};
|
17480
17495
|
const onSubmit = () => {
|
17481
|
-
var _a;
|
17482
17496
|
const from = formArrayRef.value[step.value];
|
17483
17497
|
if (from) {
|
17484
|
-
|
17498
|
+
from == null ? void 0 : from.submit();
|
17485
17499
|
}
|
17486
17500
|
};
|
17487
17501
|
const prePage = () => {
|
@@ -19735,6 +19749,7 @@ const useProvideHover = (props) => {
|
|
19735
19749
|
}, props.rowHoverDelay.value + 50);
|
19736
19750
|
};
|
19737
19751
|
const hoverContext = {
|
19752
|
+
rowHover: props.rowHover,
|
19738
19753
|
hoverColumnKey,
|
19739
19754
|
hoverRowKey,
|
19740
19755
|
handleCellHover,
|
@@ -19745,6 +19760,7 @@ const useProvideHover = (props) => {
|
|
19745
19760
|
};
|
19746
19761
|
const useInjectHover = () => {
|
19747
19762
|
return inject(HoverContextKey, {
|
19763
|
+
rowHover: computed(() => void 0),
|
19748
19764
|
hoverRowKey: ref(),
|
19749
19765
|
hoverColumnKey: ref(),
|
19750
19766
|
handleCellHover: () => {
|
@@ -19766,9 +19782,6 @@ const useProvideLevel = () => {
|
|
19766
19782
|
function is(val, type) {
|
19767
19783
|
return toString.call(val) === `[object ${type}]`;
|
19768
19784
|
}
|
19769
|
-
function isFunction(val) {
|
19770
|
-
return typeof val === "function";
|
19771
|
-
}
|
19772
19785
|
function isArray(val) {
|
19773
19786
|
return val && Array.isArray(val);
|
19774
19787
|
}
|
@@ -19962,9 +19975,6 @@ function deleteNestItemData(data, indexs, childrenColumnName) {
|
|
19962
19975
|
currentData.splice(indexs[indexsLen - 1], 1);
|
19963
19976
|
return currentData;
|
19964
19977
|
}
|
19965
|
-
function isPromise(val) {
|
19966
|
-
return is(val, "Promise") && isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
19967
|
-
}
|
19968
19978
|
function ensureValidVNode(vnodes) {
|
19969
19979
|
return vnodes.some(
|
19970
19980
|
(vnode) => !isVNode(vnode) || vnode.type !== Comment$1 && !(vnode.type === Fragment && !ensureValidVNode(vnode.children))
|
@@ -20047,7 +20057,8 @@ const baseTableProps = () => ({
|
|
20047
20057
|
type: [Number, String]
|
20048
20058
|
},
|
20049
20059
|
size: {
|
20050
|
-
type: String
|
20060
|
+
type: String,
|
20061
|
+
default: "middle"
|
20051
20062
|
},
|
20052
20063
|
bordered: {
|
20053
20064
|
type: Boolean,
|
@@ -20143,6 +20154,10 @@ const baseTableProps = () => ({
|
|
20143
20154
|
type: Number,
|
20144
20155
|
default: 59
|
20145
20156
|
},
|
20157
|
+
rowHover: {
|
20158
|
+
type: Boolean,
|
20159
|
+
default: void 0
|
20160
|
+
},
|
20146
20161
|
rowKey: {
|
20147
20162
|
type: [Function, String]
|
20148
20163
|
},
|
@@ -20257,6 +20272,9 @@ const baseTableProps = () => ({
|
|
20257
20272
|
"onUpdate:dataSource": {
|
20258
20273
|
type: Function
|
20259
20274
|
},
|
20275
|
+
"onUpdate:columns": {
|
20276
|
+
type: Function
|
20277
|
+
},
|
20260
20278
|
columnEmptyText: {
|
20261
20279
|
type: [String, Boolean],
|
20262
20280
|
default: "-"
|
@@ -20340,8 +20358,9 @@ const tableProps = () => ({
|
|
20340
20358
|
|
20341
20359
|
const mergePropsAndPagination = ({ pagination }, intl) => {
|
20342
20360
|
if (pagination) {
|
20343
|
-
const { current, pageSize, total, showTotal, showSizeChanger } = pagination;
|
20361
|
+
const { current, pageSize, total, showTotal, showSizeChanger, ...rest } = pagination;
|
20344
20362
|
return {
|
20363
|
+
...rest,
|
20345
20364
|
current: current || 1,
|
20346
20365
|
total: total || 0,
|
20347
20366
|
pageSize: pageSize || 10,
|
@@ -20835,7 +20854,7 @@ const useContainer = (props) => {
|
|
20835
20854
|
var _a2;
|
20836
20855
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceKey;
|
20837
20856
|
},
|
20838
|
-
columnsMap,
|
20857
|
+
() => columnsMap.value,
|
20839
20858
|
() => {
|
20840
20859
|
var _a2;
|
20841
20860
|
return (_a2 = props.columnsState) == null ? void 0 : _a2.persistenceType;
|
@@ -20896,8 +20915,8 @@ function genProColumnToColumn(params, parents) {
|
|
20896
20915
|
var _a;
|
20897
20916
|
const { columns, counter } = params;
|
20898
20917
|
return (_a = columns == null ? void 0 : columns.map((columnProps, columnsIndex) => {
|
20899
|
-
var _a2, _b;
|
20900
|
-
const { key, dataIndex, disable, valueEnum } = columnProps;
|
20918
|
+
var _a2, _b, _c;
|
20919
|
+
const { key, dataIndex, disable, valueEnum, width } = columnProps;
|
20901
20920
|
const columnKey = genColumnKey(
|
20902
20921
|
// key || (dataIndex ? `${dataIndex.toString()}-${columnsIndex}` : ''),
|
20903
20922
|
key || (dataIndex == null ? void 0 : dataIndex.toString()),
|
@@ -20906,18 +20925,20 @@ function genProColumnToColumn(params, parents) {
|
|
20906
20925
|
const config = counter.columnsMap.value[columnKey] || {
|
20907
20926
|
fixed: columnProps.fixed
|
20908
20927
|
};
|
20928
|
+
console.log("\u{1F680} ~ ?.map ~ config:", config);
|
20909
20929
|
const tempColumns = {
|
20910
20930
|
index: columnsIndex,
|
20911
20931
|
key: columnKey,
|
20912
20932
|
...columnProps,
|
20913
20933
|
valueEnum,
|
20914
20934
|
fixed: config.fixed,
|
20915
|
-
|
20935
|
+
width: (_a2 = config.width) != null ? _a2 : width,
|
20936
|
+
disable: (_b = config.disable) != null ? _b : disable,
|
20916
20937
|
// width: columnProps.width || (columnProps.fixed ? 200 : undefined),
|
20917
20938
|
children: columnProps.children ? genProColumnToColumn(
|
20918
20939
|
{
|
20919
20940
|
...params,
|
20920
|
-
columns: (
|
20941
|
+
columns: (_c = columnProps == null ? void 0 : columnProps.children) != null ? _c : []
|
20921
20942
|
},
|
20922
20943
|
{ ...columnProps, key: columnKey }
|
20923
20944
|
) : void 0
|
@@ -24452,6 +24473,7 @@ function useFlattenRecords(pageDataRef, childrenColumnNameRef, expandedKeysRef,
|
|
24452
24473
|
}
|
24453
24474
|
|
24454
24475
|
const DEFAULT_PAGE_SIZE = 10;
|
24476
|
+
const PAGE_SIZE_OPTIONS = ["5", "10", "20", "50"];
|
24455
24477
|
function getPaginationParam(pagination, mergedPagination) {
|
24456
24478
|
const param = {
|
24457
24479
|
current: mergedPagination.current,
|
@@ -24481,7 +24503,11 @@ function extendsObject(...list) {
|
|
24481
24503
|
return result;
|
24482
24504
|
}
|
24483
24505
|
function usePagination(total, props, mergedData, onChange) {
|
24484
|
-
const innerPagination = reactive({
|
24506
|
+
const innerPagination = reactive({
|
24507
|
+
current: 1,
|
24508
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
24509
|
+
pageSizeOptions: PAGE_SIZE_OPTIONS
|
24510
|
+
});
|
24485
24511
|
const size = computed(() => props.size);
|
24486
24512
|
const mergedPagination = computed(() => {
|
24487
24513
|
const { pagination } = props;
|
@@ -24711,7 +24737,9 @@ const useCellProps = ({
|
|
24711
24737
|
if (copyCustomCellProps.rowSpan > 1) {
|
24712
24738
|
mergeCellStyles.height = `${getRowHeight(rowIndex, copyCustomCellProps.rowSpan) - 1}px`;
|
24713
24739
|
}
|
24714
|
-
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24740
|
+
cellProps.props = Object.assign({}, copyCustomCellProps, {
|
24741
|
+
style: { ...copyCustomCellProps.style, ...mergeCellStyles }
|
24742
|
+
});
|
24715
24743
|
return cellProps;
|
24716
24744
|
};
|
24717
24745
|
watchEffect(() => {
|
@@ -25736,6 +25764,7 @@ var _sfc_main$A = defineComponent({
|
|
25736
25764
|
var _a, _b;
|
25737
25765
|
return [
|
25738
25766
|
typeof props.column.title == "function" ? props.column.title({
|
25767
|
+
column: props.column.originColumn,
|
25739
25768
|
sortColumns: sortColumns.value,
|
25740
25769
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
25741
25770
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -25836,16 +25865,28 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
25836
25865
|
1040
|
25837
25866
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
25838
25867
|
)) : createCommentVNode("v-if", true),
|
25839
|
-
_ctx.column.headerTooltip ? (openBlock(), createBlock(_component_Tooltip, {
|
25840
|
-
|
25841
|
-
|
25842
|
-
|
25868
|
+
_ctx.column.headerTooltip ? (openBlock(), createBlock(_component_Tooltip, { key: 1 }, {
|
25869
|
+
title: withCtx(() => [
|
25870
|
+
_ctx.column.headerTooltip === true ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.title), { key: 0 })) : (openBlock(), createElementBlock(
|
25871
|
+
Fragment,
|
25872
|
+
{ key: 1 },
|
25873
|
+
[
|
25874
|
+
createTextVNode(
|
25875
|
+
toDisplayString(_ctx.column.headerTooltip),
|
25876
|
+
1
|
25877
|
+
/* TEXT */
|
25878
|
+
)
|
25879
|
+
],
|
25880
|
+
64
|
25881
|
+
/* STABLE_FRAGMENT */
|
25882
|
+
))
|
25883
|
+
]),
|
25843
25884
|
default: withCtx(() => [
|
25844
25885
|
createVNode(_component_InfoCircleOutlined, { style: { "margin-inline-start": "3px", "font-size": "12px" } })
|
25845
25886
|
]),
|
25846
25887
|
_: 1
|
25847
25888
|
/* STABLE */
|
25848
|
-
}
|
25889
|
+
})) : createCommentVNode("v-if", true)
|
25849
25890
|
], 14, _hoisted_1$d);
|
25850
25891
|
}
|
25851
25892
|
var HeaderCellTitle = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$w]]);
|
@@ -27030,6 +27071,7 @@ var _sfc_main$u = defineComponent({
|
|
27030
27071
|
var _a, _b;
|
27031
27072
|
return h(Fragment, [
|
27032
27073
|
typeof props.column.title == "function" ? props.column.title({
|
27074
|
+
column: props.column.originColumn,
|
27033
27075
|
sortColumns: sortColumns.value,
|
27034
27076
|
sortColumn: (_a = sortColumns.value[0]) == null ? void 0 : _a.column,
|
27035
27077
|
sortOrder: (_b = sortColumns.value[0]) == null ? void 0 : _b.order
|
@@ -28459,28 +28501,29 @@ var _sfc_main$n = defineComponent({
|
|
28459
28501
|
event: rowDragEvent.value
|
28460
28502
|
});
|
28461
28503
|
}
|
28504
|
+
} else {
|
28505
|
+
return [
|
28506
|
+
createVNode(
|
28507
|
+
"span",
|
28508
|
+
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28509
|
+
null
|
28510
|
+
),
|
28511
|
+
createVNode(
|
28512
|
+
"span",
|
28513
|
+
{
|
28514
|
+
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28515
|
+
style: { maxWidth: `${parentOffsetWidth}px` }
|
28516
|
+
},
|
28517
|
+
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28518
|
+
)
|
28519
|
+
];
|
28462
28520
|
}
|
28463
|
-
return [
|
28464
|
-
createVNode(
|
28465
|
-
"span",
|
28466
|
-
{ class: `${prefixCls.value}-drag-ghost-image-icon`, innerHTML: dragIcon2 },
|
28467
|
-
null
|
28468
|
-
),
|
28469
|
-
createVNode(
|
28470
|
-
"span",
|
28471
|
-
{
|
28472
|
-
class: `${prefixCls.value}-drag-ghost-image-label`,
|
28473
|
-
style: { maxWidth: `${parentOffsetWidth}px` }
|
28474
|
-
},
|
28475
|
-
[(_a = slots.label) == null ? void 0 : _a.call(slots)]
|
28476
|
-
)
|
28477
|
-
];
|
28478
28521
|
};
|
28479
28522
|
const renderDragGhost = () => {
|
28480
28523
|
if (!dragGhostImage) {
|
28481
28524
|
dragGhostImage = createVNode(renderDragGhostImage);
|
28525
|
+
render$1(dragGhostImage, dragGhostDom);
|
28482
28526
|
}
|
28483
|
-
render$1(dragGhostImage, dragGhostDom);
|
28484
28527
|
};
|
28485
28528
|
watch(
|
28486
28529
|
[prefixCls],
|
@@ -28886,7 +28929,7 @@ var _sfc_main$m = defineComponent({
|
|
28886
28929
|
newValue: modelValue.value,
|
28887
28930
|
oldValue
|
28888
28931
|
});
|
28889
|
-
if (isPromise
|
28932
|
+
if (isPromise(result)) {
|
28890
28933
|
result.then((res) => {
|
28891
28934
|
res && emit("closeEditor", [props.cellKey]);
|
28892
28935
|
}).catch(() => {
|
@@ -29106,7 +29149,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29106
29149
|
recordIndexs
|
29107
29150
|
})) != null ? _c2 : value;
|
29108
29151
|
const beforeOpen = (_e2 = (_d2 = tableContext.props) == null ? void 0 : _d2.onBeforeOpenEditor) == null ? void 0 : _e2.call(_d2, cellRenderArgs);
|
29109
|
-
if (isPromise
|
29152
|
+
if (isPromise(beforeOpen)) {
|
29110
29153
|
beforeOpen.then((res) => {
|
29111
29154
|
var _a3, _b3;
|
29112
29155
|
if (res) {
|
@@ -29127,7 +29170,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29127
29170
|
...cellRenderArgs,
|
29128
29171
|
oldValue: oldValuesMap.value[key]
|
29129
29172
|
});
|
29130
|
-
if (isPromise
|
29173
|
+
if (isPromise(beforeClose)) {
|
29131
29174
|
beforeClose.then((res) => {
|
29132
29175
|
var _a3, _b3;
|
29133
29176
|
if (res) {
|
@@ -29254,7 +29297,7 @@ const BodyCell = (props, { slots, emit }) => {
|
|
29254
29297
|
// }),
|
29255
29298
|
shouldOpen: (isEllipsis) => {
|
29256
29299
|
var _a2;
|
29257
|
-
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) :
|
29300
|
+
return (tooltipProps == null ? void 0 : tooltipProps.shouldOpen) ? (_a2 = tooltipProps == null ? void 0 : tooltipProps.shouldOpen) == null ? void 0 : _a2.call(tooltipProps, isEllipsis, cellRenderArgs) : true;
|
29258
29301
|
},
|
29259
29302
|
onCellLeave: () => {
|
29260
29303
|
emit("cellLeave");
|
@@ -29886,7 +29929,7 @@ var _sfc_main$i = defineComponent({
|
|
29886
29929
|
() => (props.type === "center" ? tableContext.centerRowColumnsMap.value.get(props.rowKey) : columns.value).filter((item) => !!item)
|
29887
29930
|
);
|
29888
29931
|
const { tooltipOpen, leftPopupContainer, centerPopupContainer, rightPopupContainer } = useInjectBody();
|
29889
|
-
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey } = useInjectHover();
|
29932
|
+
const { handleCellBlur, handleCellHover, hoverRowKey, hoverColumnKey, rowHover } = useInjectHover();
|
29890
29933
|
const popupContainer = computed(
|
29891
29934
|
() => props.type === "left" ? leftPopupContainer.value : props.type === "center" ? centerPopupContainer.value : props.type === "right" ? rightPopupContainer.value : null
|
29892
29935
|
);
|
@@ -29895,7 +29938,7 @@ var _sfc_main$i = defineComponent({
|
|
29895
29938
|
watch(
|
29896
29939
|
[isRowHover, bodyRow],
|
29897
29940
|
() => {
|
29898
|
-
bodyRow.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29941
|
+
bodyRow.value && rowHover.value && (isRowHover.value ? addClass(bodyRow.value, `${props.prefixCls}-row-hover`) : removeClass(bodyRow.value, `${props.prefixCls}-row-hover`));
|
29899
29942
|
},
|
29900
29943
|
{ immediate: true, flush: "post" }
|
29901
29944
|
);
|
@@ -29962,7 +30005,7 @@ var _sfc_main$i = defineComponent({
|
|
29962
30005
|
{
|
29963
30006
|
[`${prefixCls}-row`]: true,
|
29964
30007
|
[`${prefixCls}-row-level-${indent}`]: true,
|
29965
|
-
[`${prefixCls}-row-hover`]: isRowHover.value,
|
30008
|
+
[`${prefixCls}-row-hover`]: isRowHover.value && rowHover.value,
|
29966
30009
|
[`${prefixCls}-row-dragging`]: isDragging.value,
|
29967
30010
|
[`${prefixCls}-row-dragging-insert-target`]: tableContext.insertToRowKey.value === props.rowKey,
|
29968
30011
|
[`${prefixCls}-row-odd`]: !isEven,
|
@@ -30639,8 +30682,7 @@ var _sfc_main$g = defineComponent({
|
|
30639
30682
|
};
|
30640
30683
|
});
|
30641
30684
|
const bodyViewportStyle = computed(() => ({
|
30642
|
-
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value
|
30643
|
-
// width: `calc(100% + 0px)`,
|
30685
|
+
width: `calc(100% + ${tableContext.showVerticalScrollbar.value ? tableContext.scrollBarSize.value : 0}px)`,
|
30644
30686
|
overflowX: "hidden",
|
30645
30687
|
overflowY: "auto",
|
30646
30688
|
height: "100%"
|
@@ -31926,9 +31968,14 @@ var _sfc_main$f = defineComponent({
|
|
31926
31968
|
var _a;
|
31927
31969
|
const width = col.width;
|
31928
31970
|
const result = (_a = props.onResizeColumn) == null ? void 0 : _a.call(props, w, col, action);
|
31929
|
-
if (result !== false
|
31930
|
-
|
31931
|
-
|
31971
|
+
if (result !== false) {
|
31972
|
+
if (!(width === w && col.width === w)) {
|
31973
|
+
col.width = width !== col.width ? col.width : w;
|
31974
|
+
triggerRef(rawColumns);
|
31975
|
+
}
|
31976
|
+
if (action === "end") {
|
31977
|
+
emit("update:columns", rawColumns.value, "resize");
|
31978
|
+
}
|
31932
31979
|
}
|
31933
31980
|
},
|
31934
31981
|
onRowDragEnd: (opt) => {
|
@@ -32102,7 +32149,7 @@ var _sfc_main$f = defineComponent({
|
|
32102
32149
|
rawColumns.value.splice(index, 1);
|
32103
32150
|
}
|
32104
32151
|
triggerRef(rawColumns);
|
32105
|
-
emit("update:columns", rawColumns.value);
|
32152
|
+
emit("update:columns", rawColumns.value, "drag");
|
32106
32153
|
};
|
32107
32154
|
if (isPromise(dragEnd)) {
|
32108
32155
|
dragEnd.then(() => {
|
@@ -33684,7 +33731,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33684
33731
|
const {
|
33685
33732
|
hoverRowKey
|
33686
33733
|
} = useProvideHover({
|
33687
|
-
rowHoverDelay: computed(() => props.rowHoverDelay)
|
33734
|
+
rowHoverDelay: computed(() => props.rowHoverDelay),
|
33735
|
+
rowHover: computed(() => props.rowHover)
|
33688
33736
|
});
|
33689
33737
|
const mergedPrefixCls = computed(() => {
|
33690
33738
|
var _a2;
|
@@ -33728,10 +33776,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33728
33776
|
if (props.pagination === false) {
|
33729
33777
|
return false;
|
33730
33778
|
}
|
33731
|
-
|
33732
|
-
return Object.assign({}, pagination.value, props.pagination);
|
33733
|
-
}
|
33734
|
-
return Object.assign({}, props.pagination, pagination.value);
|
33779
|
+
return pagination.value;
|
33735
33780
|
});
|
33736
33781
|
const formSubmitLoading = computed(() => {
|
33737
33782
|
if (typeof loading.value === "boolean") {
|
@@ -33793,9 +33838,44 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33793
33838
|
};
|
33794
33839
|
return loopFilter(tableColumn.value);
|
33795
33840
|
});
|
33841
|
+
const onColumnsChange = (rawColumns, action) => {
|
33842
|
+
var _a2;
|
33843
|
+
const newMap = {
|
33844
|
+
...counter.columnsMap.value
|
33845
|
+
};
|
33846
|
+
const newColumns = rawColumns.map((item) => genColumnKey(item.key, item.index));
|
33847
|
+
if (action === "resize") {
|
33848
|
+
const loopSetWidth = (rawColumns2) => {
|
33849
|
+
rawColumns2.forEach((item) => {
|
33850
|
+
var _a3;
|
33851
|
+
const key = genColumnKey(item.key, item.index);
|
33852
|
+
const newSetting = {
|
33853
|
+
...newMap[key]
|
33854
|
+
};
|
33855
|
+
if ((_a3 = item.children) == null ? void 0 : _a3.length) {
|
33856
|
+
loopSetWidth(item.children);
|
33857
|
+
} else {
|
33858
|
+
newSetting.width = item.width;
|
33859
|
+
newMap[key] = newSetting;
|
33860
|
+
}
|
33861
|
+
});
|
33862
|
+
};
|
33863
|
+
loopSetWidth(rawColumns);
|
33864
|
+
} else {
|
33865
|
+
newColumns.forEach((key, order) => {
|
33866
|
+
newMap[key] = {
|
33867
|
+
...newMap[key] || {},
|
33868
|
+
order
|
33869
|
+
};
|
33870
|
+
});
|
33871
|
+
}
|
33872
|
+
counter.setColumnsMap(newMap);
|
33873
|
+
counter.setSortKeyColumns(newColumns);
|
33874
|
+
(_a2 = props["onUpdate:columns"]) == null ? void 0 : _a2.call(props, rawColumns, action);
|
33875
|
+
};
|
33796
33876
|
const formItems = computed(() => {
|
33797
33877
|
var _a2, _b, _c;
|
33798
|
-
if (
|
33878
|
+
if (props.search === false) {
|
33799
33879
|
return [];
|
33800
33880
|
}
|
33801
33881
|
if ((_b = (_a2 = props.search) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
|
@@ -33807,12 +33887,12 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33807
33887
|
}
|
33808
33888
|
return true;
|
33809
33889
|
}).map((item) => {
|
33810
|
-
return {
|
33890
|
+
return omitKeysAndUndefined({
|
33811
33891
|
...item,
|
33812
33892
|
width: void 0,
|
33813
33893
|
tooltip: item.headerTooltip,
|
33814
33894
|
name: item.dataIndex
|
33815
|
-
};
|
33895
|
+
}, ["dataIndex", "width", "tooltip", "disable"]);
|
33816
33896
|
});
|
33817
33897
|
});
|
33818
33898
|
const preserveRecordsRef = ref(/* @__PURE__ */ new Map());
|
@@ -33829,8 +33909,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33829
33909
|
}
|
33830
33910
|
onCleanSelected();
|
33831
33911
|
});
|
33832
|
-
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0, {
|
33833
|
-
value: computed(() => props.rowSelection ? props.rowSelection.selectedRowKeys : void 0)
|
33912
|
+
const [selectedRowKeys, setSelectedRowKeys] = useMergedState(props.selectedRowKeys || (props.rowSelection ? ((_a = props.rowSelection) == null ? void 0 : _a.defaultSelectedRowKeys) || [] : void 0), {
|
33913
|
+
value: computed(() => props.selectedRowKeys || (props.rowSelection ? props.rowSelection.selectedRowKeys : void 0))
|
33834
33914
|
});
|
33835
33915
|
const rowSelection = computed(() => ({
|
33836
33916
|
selectedRowKeys: selectedRowKeys.value,
|
@@ -33967,7 +34047,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33967
34047
|
actions: slots.alertActions
|
33968
34048
|
}), createVNode(InteralTable, mergeProps({
|
33969
34049
|
"ref": table
|
33970
|
-
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys"]), {
|
34050
|
+
}, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys", "onUpdate:columns"]), {
|
33971
34051
|
"prefixCls": mergedPrefixCls.value,
|
33972
34052
|
"columns": mergeColumns || [],
|
33973
34053
|
"size": counter.tableSize.value,
|
@@ -33978,7 +34058,8 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
33978
34058
|
"expandIcon": expandIcon,
|
33979
34059
|
"expandedRowRender": expandedRowRender,
|
33980
34060
|
"hasContextmenuPopup": !!slots.contextmenuPopup,
|
33981
|
-
"onChange": onTableChange
|
34061
|
+
"onChange": onTableChange,
|
34062
|
+
"onUpdate:columns": onColumnsChange
|
33982
34063
|
}), {
|
33983
34064
|
...slots,
|
33984
34065
|
footer: props.footer || slots.footer
|
@@ -36768,12 +36849,14 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36768
36849
|
}, [createVNode(FormTitle, {
|
36769
36850
|
"title": props.item.title,
|
36770
36851
|
"tooltip": props.item.tooltip
|
36771
|
-
}, null)]), createVNode(
|
36852
|
+
}, null)]), createVNode("div", {
|
36853
|
+
"class": `${prefixCls}-item-title-extra`
|
36854
|
+
}, [createVNode(RenderVNode$1, {
|
36772
36855
|
"vnode": extraRender,
|
36773
36856
|
"props": {
|
36774
36857
|
formData: formData.value
|
36775
36858
|
}
|
36776
|
-
}, null)]);
|
36859
|
+
}, null)])]);
|
36777
36860
|
}
|
36778
36861
|
return temp;
|
36779
36862
|
});
|
@@ -36820,20 +36903,6 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36820
36903
|
});
|
36821
36904
|
return () => {
|
36822
36905
|
var _a, _b;
|
36823
|
-
const render = getSlot(props.item.render, formSlotsContext);
|
36824
|
-
if (render) {
|
36825
|
-
return createVNode(FormColWrapper, {
|
36826
|
-
"colProps": props.item.colProps,
|
36827
|
-
"grid": mergeGrid.value
|
36828
|
-
}, {
|
36829
|
-
default: () => [createVNode(RenderVNode$1, {
|
36830
|
-
"vnode": render,
|
36831
|
-
"props": {
|
36832
|
-
formData: formData.value
|
36833
|
-
}
|
36834
|
-
}, null)]
|
36835
|
-
});
|
36836
|
-
}
|
36837
36906
|
const renderFormItem = getSlot(props.item.renderFormItem, formSlotsContext);
|
36838
36907
|
const extraRender = getSlot((_a = props.item.extra) == null ? void 0 : _a.item, formSlotsContext);
|
36839
36908
|
const FieldComponent = (_b = fieldComponentMap[fieldType.value]) != null ? _b : fieldComponentMap["text"];
|
@@ -36861,23 +36930,33 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
36861
36930
|
if (extraRender) {
|
36862
36931
|
defaultDom = createVNode("div", {
|
36863
36932
|
"style": "display: flex; flex-direction: row; justify-content: flex-start; align-items: center;"
|
36864
|
-
}, [defaultDom, createVNode(
|
36933
|
+
}, [defaultDom, createVNode("div", {
|
36934
|
+
"style": "margin-inline-start: 5px; flex-shrink: 0;"
|
36935
|
+
}, [createVNode(RenderVNode$1, {
|
36865
36936
|
"vnode": extraRender,
|
36866
36937
|
"props": {
|
36867
36938
|
formData: formData.value,
|
36868
36939
|
listName: listName == null ? void 0 : listName.value,
|
36869
36940
|
name: props.item.name
|
36870
36941
|
}
|
36871
|
-
}, null)]);
|
36942
|
+
}, null)])]);
|
36872
36943
|
}
|
36944
|
+
const formItemDom = createVNode(Form$1.Item, restItemProps.value, {
|
36945
|
+
default: () => [defaultDom],
|
36946
|
+
...slotsGetter.value
|
36947
|
+
});
|
36948
|
+
const render = getSlot(props.item.render, formSlotsContext);
|
36873
36949
|
return createVNode(FormColWrapper, {
|
36874
36950
|
"colProps": props.item.colProps,
|
36875
36951
|
"grid": mergeGrid.value
|
36876
36952
|
}, {
|
36877
|
-
default: () => [createVNode(
|
36878
|
-
|
36879
|
-
|
36880
|
-
|
36953
|
+
default: () => [render ? createVNode(RenderVNode$1, {
|
36954
|
+
"vnode": render,
|
36955
|
+
"props": {
|
36956
|
+
formData: formData.value,
|
36957
|
+
defaultDom: formItemDom
|
36958
|
+
}
|
36959
|
+
}, null) : formItemDom]
|
36881
36960
|
});
|
36882
36961
|
};
|
36883
36962
|
}
|