@qin-ui/antd-vue-pro 2.3.2 → 2.3.3
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/api.json +1 -1
- package/es/antd-vue-pro.css +11 -11
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/form/constants/index.d.ts +1 -6
- package/es/components/form/constants/index.d.ts.map +1 -1
- package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -1
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/components/table/components/SearchForm.vue.d.ts.map +1 -1
- package/es/index.js +80 -45
- package/es/index.js.map +1 -1
- package/es/shared/core/index.d.ts +1 -1
- package/es/shared/core/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/form/components/BaseField/index.vue +8 -8
- package/src/components/form/components/ProForm/index.vue +5 -11
- package/src/components/form/constants/index.ts +5 -7
- package/src/components/table/components/ColumnControl.vue +7 -2
- package/src/components/table/components/ProTable.vue +2 -13
- package/src/components/table/components/SearchForm.vue +81 -15
- package/src/shared/core/index.ts +1 -0
package/api.json
CHANGED
package/es/antd-vue-pro.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.pro-table_search-form[data-v-
|
|
1
|
+
.pro-table_search-form[data-v-7bd701e4] [class*='-form-item'] {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
|
-
.pro-table_search-form_expand-toggle-button[data-v-
|
|
4
|
+
.pro-table_search-form_expand-toggle-button[data-v-7bd701e4] {
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 0;
|
|
8
8
|
padding-left: 4px;
|
|
9
9
|
}
|
|
10
|
-
.pro-table_search-form .transition[data-v-
|
|
10
|
+
.pro-table_search-form .transition[data-v-7bd701e4] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
13
|
.pro-table_search-form-container[data-v-c385cd54] {
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
.pro-table_size-control_button[data-v-a718ce24] svg {
|
|
28
28
|
transform: scale(1.3);
|
|
29
29
|
}
|
|
30
|
-
.pro-table_column-control_button[data-v-
|
|
30
|
+
.pro-table_column-control_button[data-v-9899456e] {
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
padding-right: 12px;
|
|
34
34
|
padding-left: 12px;
|
|
35
35
|
}
|
|
36
|
-
.pro-table_column-control_button[data-v-
|
|
36
|
+
.pro-table_column-control_button[data-v-9899456e] svg {
|
|
37
37
|
transform: scale(1.2, 1.4);
|
|
38
38
|
}
|
|
39
|
-
.pro-table_header[data-v-
|
|
39
|
+
.pro-table_header[data-v-ff6f01f4] {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: flex-end;
|
|
43
43
|
}
|
|
44
|
-
.pro-table_header[data-v-
|
|
44
|
+
.pro-table_header[data-v-ff6f01f4]:empty {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
47
|
+
.pro-table_header + .pro-table_header_content[data-v-ff6f01f4] {
|
|
48
48
|
margin-top: 16px;
|
|
49
49
|
}
|
|
50
|
-
.pro-table_header_button-bar[data-v-
|
|
50
|
+
.pro-table_header_button-bar[data-v-ff6f01f4] {
|
|
51
51
|
flex: 1;
|
|
52
52
|
}
|
|
53
|
-
.pro-table_header_toolbar[data-v-
|
|
53
|
+
.pro-table_header_toolbar[data-v-ff6f01f4] {
|
|
54
54
|
margin-left: 12px;
|
|
55
55
|
}
|
|
56
|
-
.pro-table[data-v-
|
|
56
|
+
.pro-table[data-v-ff6f01f4] [class*='-pagination'] [class*='-pagination-total-text'] {
|
|
57
57
|
flex: 1;
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"
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AI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -69,10 +69,5 @@ export type GetComponentType<K extends ComponentName> = K extends keyof Componen
|
|
|
69
69
|
* 组件名称到 Ant Design Vue 组件的映射
|
|
70
70
|
*/
|
|
71
71
|
export declare const componentMap: BaseComponentMap;
|
|
72
|
-
|
|
73
|
-
* Teleport 组件名称前缀
|
|
74
|
-
* @description 用于通过插槽动态替换指定 path 的组件
|
|
75
|
-
*/
|
|
76
|
-
export declare const TeleportComponentNamePrefix = "TeleportComponent_";
|
|
77
|
-
export { InjectionFormKey, InjectionPathKey } from '../../../shared/core';
|
|
72
|
+
export { InjectionFormKey, InjectionPathKey, InjectionFormSlotsKey, } from '../../../shared/core';
|
|
78
73
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gDAKtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;CAAG;AAEhC;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,KAAK,CAAC;IACtB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,QAAQ,CAAC;CAC7B,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,gBAAgB,GACtB,MAAM,YAAY,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAClD,CAAC,SAAS,MAAM,YAAY,GACxB,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,MAAM,gBAAgB,GAC9B,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;AAEd;;GAEG;AAEH,eAAO,MAAM,YAAY,EAAE,gBAiB1B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gDAKtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;CAAG;AAEhC;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,KAAK,CAAC;IACtB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,QAAQ,CAAC;CAC7B,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,gBAAgB,GACtB,MAAM,YAAY,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAClD,CAAC,SAAS,MAAM,YAAY,GACxB,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,MAAM,gBAAgB,GAC9B,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;AAEd;;GAEG;AAEH,eAAO,MAAM,YAAY,EAAE,gBAiB1B,CAAA;AAGD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC;;AAqTF,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAuYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAGL,UAAU,EACV,UAAU,EAEX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAIL,IAAI,EACL,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,MAAM,EAAW,mBAAmB,EAAE,MAAM,UAAU,CAAC;yBAE/C,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,EAC5C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,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,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,OAgYO,EAAiB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EAOrB,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKvC,KAAK,MAAM,GAAG;IAEZ,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CACpB,OAAO,CAAC,SAAS,CAAC,EAChB,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,UAAU,GACV,WAAW,GACX,MAAM,GACN,YAAY,CACf,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAC3C,KAAK,iBAAiB,GAAG,WAAW,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC7E,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5E,YAAY,CAAC,EACT,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAAC,UAAU,GAC9B,qBAAqB,CAAC;;;;;;;;;;QA2Za,GAAG;;;QACF,GAAG;;;QACH,GAAG;;AA3ZzC,wBAycK;AAQL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./antd-vue-pro.css";
|
|
2
|
-
import { defineComponent, computed, provide, renderSlot, inject, mergeProps, toValue, normalizeProps, guardReactiveProps, resolveComponent, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList, createVNode, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString, useSlots,
|
|
3
|
-
import { InjectionPathKey, isPlainObject, getObject, toPath, useForm as useForm$1, resolveLocaleName, zhTW, enUS, zhCN, format, omit, cloneDeep, InjectionFormKey, camelizeProperties, useFields as useFields$1, useFormRef as useFormRef$1, pick, useTable as useTable$1 } from "@qin-ui/pro-components-core";
|
|
2
|
+
import { defineComponent, computed, provide, renderSlot, inject, mergeProps, toValue, normalizeProps, guardReactiveProps, resolveComponent, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList, createVNode, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString, useSlots, reactive, createElementVNode, onBeforeUnmount, watch, watchEffect, normalizeStyle, nextTick, useModel, onMounted, mergeModels, normalizeClass } from "vue";
|
|
3
|
+
import { InjectionPathKey, isPlainObject, getObject, toPath, useForm as useForm$1, resolveLocaleName, zhTW, enUS, zhCN, format, omit, InjectionFormSlotsKey, cloneDeep, InjectionFormKey, camelizeProperties, useFields as useFields$1, useFormRef as useFormRef$1, pick, useTable as useTable$1 } from "@qin-ui/pro-components-core";
|
|
4
4
|
import { enUS as enUS2, useFormData, zhCN as zhCN2, zhTW as zhTW2 } from "@qin-ui/pro-components-core";
|
|
5
5
|
import { Transfer, TreeSelect, Slider, Switch, RadioGroup, CheckboxGroup, TimePicker, RangePicker, DatePicker, Cascader, Select, InputNumber, InputPassword, InputSearch, Textarea, Input, Row, Col, FormItem, Form, Space, Button, theme, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
6
6
|
import { formItemProps, useInjectFormItemContext } from "ant-design-vue/es/form";
|
|
@@ -169,7 +169,6 @@ const componentMap = {
|
|
|
169
169
|
"tree-select": TreeSelect,
|
|
170
170
|
"transfer": Transfer
|
|
171
171
|
};
|
|
172
|
-
const TeleportComponentNamePrefix = "TeleportComponent_";
|
|
173
172
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
174
173
|
__name: "index",
|
|
175
174
|
props: {
|
|
@@ -496,13 +495,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
496
495
|
valueFormatter
|
|
497
496
|
};
|
|
498
497
|
});
|
|
499
|
-
const
|
|
500
|
-
`${TeleportComponentNamePrefix}${__props.path}`,
|
|
501
|
-
void 0
|
|
502
|
-
);
|
|
498
|
+
const formSlots = inject(InjectionFormSlotsKey, void 0);
|
|
503
499
|
const customComponents = inject(INJECT_COMPONENTS, {});
|
|
504
500
|
const is = computed(() => {
|
|
505
|
-
|
|
501
|
+
const teleportSlot = __props.path && (formSlots == null ? void 0 : formSlots[__props.path]);
|
|
502
|
+
if (teleportSlot) return teleportSlot;
|
|
506
503
|
if (typeof __props.component === "string") {
|
|
507
504
|
return customComponents[__props.component] || componentMap[__props.component] || __props.component;
|
|
508
505
|
}
|
|
@@ -587,12 +584,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
587
584
|
config.default
|
|
588
585
|
);
|
|
589
586
|
const slots = useSlots();
|
|
590
|
-
|
|
591
|
-
Object.keys(slots).forEach((name) => {
|
|
592
|
-
if (name === "default") return;
|
|
593
|
-
provide(`${TeleportComponentNamePrefix}${name}`, slots[name]);
|
|
594
|
-
});
|
|
595
|
-
});
|
|
587
|
+
provide(InjectionFormSlotsKey, reactive(slots));
|
|
596
588
|
return (_ctx, _cache) => {
|
|
597
589
|
return openBlock(), createBlock(unref(Form), mergeProps({
|
|
598
590
|
ref: (el) => {
|
|
@@ -663,7 +655,22 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
663
655
|
const emit = __emit;
|
|
664
656
|
const proFormHeight = ref("unset");
|
|
665
657
|
const collapseHeight = ref(0);
|
|
666
|
-
|
|
658
|
+
const rowHeight = ref(32);
|
|
659
|
+
let resizeObserver = null;
|
|
660
|
+
let intersectionObserver = null;
|
|
661
|
+
const cleanupObservers = () => {
|
|
662
|
+
if (resizeObserver) {
|
|
663
|
+
resizeObserver.disconnect();
|
|
664
|
+
resizeObserver = null;
|
|
665
|
+
}
|
|
666
|
+
if (intersectionObserver) {
|
|
667
|
+
intersectionObserver.disconnect();
|
|
668
|
+
intersectionObserver = null;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
onBeforeUnmount(() => {
|
|
672
|
+
cleanupObservers();
|
|
673
|
+
});
|
|
667
674
|
const computedExpand = computed(() => {
|
|
668
675
|
if (!__props.expand) return false;
|
|
669
676
|
if (__props.expand === true) return { minExpandRows: 2, expandStatus: false };
|
|
@@ -674,33 +681,57 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
674
681
|
});
|
|
675
682
|
const showExpandToggle = ref(false);
|
|
676
683
|
const expandStatus = ref(true);
|
|
684
|
+
const { formRef, getFormData } = __props.form;
|
|
685
|
+
const updateHeights = () => {
|
|
686
|
+
var _a, _b, _c, _d, _e, _f;
|
|
687
|
+
if (!__props.expand || !formRef.value) return;
|
|
688
|
+
const proFormEl = (_a = formRef.value) == null ? void 0 : _a.$el;
|
|
689
|
+
if (!proFormEl) return;
|
|
690
|
+
const itemHeight = (_d = (_c = (_b = proFormEl == null ? void 0 : proFormEl.querySelector("[class*='-form-item']")) == null ? void 0 : _b.getBoundingClientRect) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.height;
|
|
691
|
+
if (itemHeight && itemHeight > 0) {
|
|
692
|
+
rowHeight.value = itemHeight;
|
|
693
|
+
}
|
|
694
|
+
const naturalHeight = proFormEl.scrollHeight || ((_f = (_e = proFormEl.getBoundingClientRect) == null ? void 0 : _e.call(proFormEl)) == null ? void 0 : _f.height) || 0;
|
|
695
|
+
if (naturalHeight > 0) {
|
|
696
|
+
proFormHeight.value = naturalHeight;
|
|
697
|
+
}
|
|
698
|
+
};
|
|
677
699
|
const changeExpandStatus = () => {
|
|
678
700
|
expandStatus.value = !expandStatus.value;
|
|
701
|
+
nextTick(() => {
|
|
702
|
+
updateHeights();
|
|
703
|
+
});
|
|
679
704
|
};
|
|
680
|
-
const
|
|
705
|
+
const hasFieldValue = (val) => val !== null && val !== void 0 && val !== "" && !(Array.isArray(val) && val.length === 0) && !(typeof val === "object" && Object.keys(val).length === 0);
|
|
681
706
|
const setInitExpandStatus = () => {
|
|
707
|
+
var _a;
|
|
682
708
|
expandStatus.value = false;
|
|
683
709
|
if (formRef.value && __props.expand) {
|
|
684
710
|
const formEl = formRef.value.$el;
|
|
685
|
-
const formItemsEl = formEl.querySelectorAll(
|
|
711
|
+
const formItemsEl = (_a = formEl == null ? void 0 : formEl.querySelectorAll) == null ? void 0 : _a.call(
|
|
712
|
+
formEl,
|
|
686
713
|
"[class*='-form-item'] > [path]"
|
|
687
714
|
);
|
|
688
|
-
|
|
715
|
+
if (!formItemsEl || formItemsEl.length === 0) return;
|
|
716
|
+
if (intersectionObserver) {
|
|
717
|
+
intersectionObserver.disconnect();
|
|
718
|
+
}
|
|
719
|
+
intersectionObserver = new IntersectionObserver(
|
|
689
720
|
(entries) => {
|
|
690
721
|
expandStatus.value = entries.some((e) => {
|
|
691
722
|
if (e.intersectionRatio === 0) {
|
|
692
723
|
const path = e.target.getAttribute("path");
|
|
693
724
|
const searchFieldValue = path ? getFormData == null ? void 0 : getFormData(path) : void 0;
|
|
694
|
-
return
|
|
725
|
+
return hasFieldValue(searchFieldValue);
|
|
695
726
|
}
|
|
696
727
|
return __props.expand.expandStatus;
|
|
697
728
|
});
|
|
698
|
-
|
|
729
|
+
intersectionObserver == null ? void 0 : intersectionObserver.disconnect();
|
|
699
730
|
},
|
|
700
731
|
{ root: formEl }
|
|
701
732
|
);
|
|
702
733
|
formItemsEl.forEach((element) => {
|
|
703
|
-
|
|
734
|
+
intersectionObserver == null ? void 0 : intersectionObserver.observe(element);
|
|
704
735
|
});
|
|
705
736
|
}
|
|
706
737
|
};
|
|
@@ -714,22 +745,34 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
714
745
|
() => __props.expand
|
|
715
746
|
],
|
|
716
747
|
() => {
|
|
717
|
-
|
|
718
|
-
if (!__props.expand || !expandStatus.value || !formRef.value) return;
|
|
719
|
-
const proFormEl = (_a = formRef.value) == null ? void 0 : _a.$el;
|
|
720
|
-
const { height = 0 } = ((_b = proFormEl == null ? void 0 : proFormEl.getBoundingClientRect) == null ? void 0 : _b.call(proFormEl)) || {};
|
|
721
|
-
proFormHeight.value = height;
|
|
722
|
-
rowHeight = (_e = (_d = (_c = proFormEl == null ? void 0 : proFormEl.querySelector("[class*='-form-item']")) == null ? void 0 : _c.getBoundingClientRect) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.height;
|
|
748
|
+
updateHeights();
|
|
723
749
|
},
|
|
724
750
|
{ flush: "post", immediate: true }
|
|
725
751
|
);
|
|
752
|
+
watch(
|
|
753
|
+
() => formRef.value,
|
|
754
|
+
(val) => {
|
|
755
|
+
if (resizeObserver) {
|
|
756
|
+
resizeObserver.disconnect();
|
|
757
|
+
resizeObserver = null;
|
|
758
|
+
}
|
|
759
|
+
const formEl = val == null ? void 0 : val.$el;
|
|
760
|
+
if (formEl && typeof ResizeObserver !== "undefined") {
|
|
761
|
+
resizeObserver = new ResizeObserver(() => {
|
|
762
|
+
updateHeights();
|
|
763
|
+
});
|
|
764
|
+
resizeObserver.observe(formEl);
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
{ immediate: true }
|
|
768
|
+
);
|
|
726
769
|
watchEffect(
|
|
727
770
|
() => {
|
|
728
771
|
if (typeof proFormHeight.value !== "number") return;
|
|
729
772
|
if (__props.layout === "grid" && computedExpand.value) {
|
|
730
773
|
const { minExpandRows } = computedExpand.value;
|
|
731
774
|
collapseHeight.value = Math.min(
|
|
732
|
-
minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
|
|
775
|
+
minExpandRows * rowHeight.value + (minExpandRows - 1) * __props.rowGap,
|
|
733
776
|
+proFormHeight.value
|
|
734
777
|
);
|
|
735
778
|
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
@@ -844,7 +887,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
844
887
|
};
|
|
845
888
|
}
|
|
846
889
|
});
|
|
847
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
890
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-7bd701e4"]]);
|
|
848
891
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
849
892
|
__name: "DefaultSearchFormContainer",
|
|
850
893
|
setup(__props) {
|
|
@@ -973,8 +1016,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
973
1016
|
const checkedColumnsOptions = computed(
|
|
974
1017
|
() => __props.columns.flatMap((item) => {
|
|
975
1018
|
var _a, _b, _c, _d, _e, _f;
|
|
976
|
-
|
|
977
|
-
|
|
1019
|
+
const rawKey = item.key ?? (Array.isArray(item.dataIndex) ? item.dataIndex.join(".") : item.dataIndex);
|
|
1020
|
+
if (!rawKey || !item.title) return [];
|
|
1021
|
+
const key = String(rawKey);
|
|
978
1022
|
if ((_b = (_a = __props.columnControl) == null ? void 0 : _a.excludedKeys) == null ? void 0 : _b.some((ek) => String(ek) === key)) return [];
|
|
979
1023
|
const disabled = ((_d = (_c = __props.columnControl) == null ? void 0 : _c.disabledKeys) == null ? void 0 : _d.some((dk) => String(dk) === key)) ?? false;
|
|
980
1024
|
const label = ((_f = (_e = __props.columnControl) == null ? void 0 : _e.labels) == null ? void 0 : _f[key]) ?? (typeof item.title === "string" ? item.title : key);
|
|
@@ -1126,7 +1170,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1126
1170
|
};
|
|
1127
1171
|
}
|
|
1128
1172
|
});
|
|
1129
|
-
const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
1173
|
+
const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9899456e"]]);
|
|
1130
1174
|
const _hoisted_1 = { class: "pro-table_header" };
|
|
1131
1175
|
const _hoisted_2 = {
|
|
1132
1176
|
key: 0,
|
|
@@ -1234,16 +1278,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1234
1278
|
const computedColumns = computed(
|
|
1235
1279
|
() => [
|
|
1236
1280
|
...__props.addIndexColumn ?? injectProps.addIndexColumn ? [indexColumn()] : [],
|
|
1237
|
-
...
|
|
1238
|
-
(item, index2) => {
|
|
1239
|
-
if (item.key) return [{ ...item, key: item.key }];
|
|
1240
|
-
if (item.dataIndex) {
|
|
1241
|
-
const dataIndexKey = Array.isArray(item.dataIndex) ? item.dataIndex.join(".") : item.dataIndex;
|
|
1242
|
-
return [{ ...item, key: dataIndexKey }];
|
|
1243
|
-
}
|
|
1244
|
-
return [{ ...item, key: index2 }];
|
|
1245
|
-
}
|
|
1246
|
-
)
|
|
1281
|
+
...tableAttrs.value.columns ?? (columns == null ? void 0 : columns.value) ?? []
|
|
1247
1282
|
]
|
|
1248
1283
|
);
|
|
1249
1284
|
const visibleComputedColumns = computed(() => {
|
|
@@ -1293,8 +1328,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1293
1328
|
});
|
|
1294
1329
|
return (_ctx, _cache) => {
|
|
1295
1330
|
return openBlock(), createElementBlock("div", {
|
|
1296
|
-
class: normalizeClass(["pro-table",
|
|
1297
|
-
style: normalizeStyle(
|
|
1331
|
+
class: normalizeClass(["pro-table", unref(attrs).class]),
|
|
1332
|
+
style: normalizeStyle(unref(attrs).style)
|
|
1298
1333
|
}, [
|
|
1299
1334
|
showSearch.value ? (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
1300
1335
|
key: 0,
|
|
@@ -1362,7 +1397,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1362
1397
|
};
|
|
1363
1398
|
}
|
|
1364
1399
|
});
|
|
1365
|
-
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
1400
|
+
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ff6f01f4"]]);
|
|
1366
1401
|
function useTable(params) {
|
|
1367
1402
|
return useTable$1(params);
|
|
1368
1403
|
}
|