@qin-ui/antd-vue-pro 1.0.40 → 1.0.41
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/es/component-provider/index.js +1 -1
- package/es/form/{index-3d6ef0b7.js → index-914194dc.js} +15 -14
- package/es/form/index.js +14 -14
- package/es/index.js +15 -15
- package/es/style.css +7 -7
- package/es/table/index.js +43 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, renderSlot } from "vue";
|
|
2
2
|
import "ant-design-vue";
|
|
3
|
-
import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-
|
|
3
|
+
import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-914194dc.js";
|
|
4
4
|
import { PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS } from "../table/index.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "index",
|
|
@@ -16653,19 +16653,20 @@ export {
|
|
|
16653
16653
|
_sfc_main$4 as d,
|
|
16654
16654
|
_sfc_main$1 as e,
|
|
16655
16655
|
FORM_DATA as f,
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16656
|
+
get$1 as g,
|
|
16657
|
+
UPDATE_REFS as h,
|
|
16658
|
+
COMMAND as i,
|
|
16659
|
+
UPDATE_ACTIVE_PATH as j,
|
|
16660
|
+
FunctionRegexp as k,
|
|
16661
|
+
ArrowFunctionRegexp as l,
|
|
16662
|
+
INIT_COMPONENT_PROPS_MAP as m,
|
|
16663
|
+
isFunctionString as n,
|
|
16664
16664
|
omit$1 as o,
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
useForm as u
|
|
16665
|
+
jsonStringifyReplacer as p,
|
|
16666
|
+
jsonParseReviver as q,
|
|
16667
|
+
useFields as r,
|
|
16668
|
+
useFormData as s,
|
|
16669
|
+
useCommand as t,
|
|
16670
|
+
useForm as u,
|
|
16671
|
+
useInitProps as v
|
|
16671
16672
|
};
|
package/es/form/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l, B, d, i, C, b, f, F, k, m, I, R, e, j, U, h, _, n, q, p, t, r, u, s, v } from "./index-914194dc.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ant-design-vue";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
l as ArrowFunctionRegexp,
|
|
6
6
|
B as BaseField,
|
|
7
7
|
d as BaseFormItem,
|
|
8
|
-
|
|
8
|
+
i as COMMAND,
|
|
9
9
|
C as COMPONENT_MAP,
|
|
10
10
|
b as ContainerFragment,
|
|
11
11
|
f as FORM_DATA,
|
|
12
12
|
F as FORM_ITEM_SLOT_KEYS,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
k as FunctionRegexp,
|
|
14
|
+
m as INIT_COMPONENT_PROPS_MAP,
|
|
15
15
|
I as INJECT_COMPONENT_PROPS_KEYS,
|
|
16
16
|
R as RULE_TYPE_MAP,
|
|
17
17
|
e as SlotComponent,
|
|
18
|
-
|
|
18
|
+
j as UPDATE_ACTIVE_PATH,
|
|
19
19
|
U as UPDATE_FORM_DATA,
|
|
20
|
-
|
|
20
|
+
h as UPDATE_REFS,
|
|
21
21
|
_ as default,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
n as isFunctionString,
|
|
23
|
+
q as jsonParseReviver,
|
|
24
|
+
p as jsonStringifyReplacer,
|
|
25
|
+
t as useCommand,
|
|
26
|
+
r as useFields,
|
|
27
27
|
u as useForm,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
s as useFormData,
|
|
29
|
+
v as useInitProps
|
|
30
30
|
};
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-914194dc.js";
|
|
3
|
+
import { l, B, d, i, C, b, f, F, k, m, I, R, e, j, U, h, n, q, p, t, r, u, s, v } from "./form/index-914194dc.js";
|
|
4
4
|
import BaseTable from "./table/index.js";
|
|
5
5
|
import { PRO_TABLE_INIT_COMPONENT_PROPS_MAP, PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS, useTable } from "./table/index.js";
|
|
6
6
|
import _sfc_main$1 from "./component-provider/index.js";
|
|
@@ -24,16 +24,16 @@ const index = {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
l as ArrowFunctionRegexp,
|
|
28
28
|
B as BaseField,
|
|
29
29
|
d as BaseFormItem,
|
|
30
|
-
|
|
30
|
+
i as COMMAND,
|
|
31
31
|
C as COMPONENT_MAP,
|
|
32
32
|
b as ContainerFragment,
|
|
33
33
|
f as FORM_DATA,
|
|
34
34
|
F as FORM_ITEM_SLOT_KEYS,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
k as FunctionRegexp,
|
|
36
|
+
m as INIT_COMPONENT_PROPS_MAP,
|
|
37
37
|
I as INJECT_COMPONENT_PROPS_KEYS,
|
|
38
38
|
PRO_TABLE_INIT_COMPONENT_PROPS_MAP,
|
|
39
39
|
PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS,
|
|
@@ -42,17 +42,17 @@ export {
|
|
|
42
42
|
ProTable,
|
|
43
43
|
R as RULE_TYPE_MAP,
|
|
44
44
|
e as SlotComponent,
|
|
45
|
-
|
|
45
|
+
j as UPDATE_ACTIVE_PATH,
|
|
46
46
|
U as UPDATE_FORM_DATA,
|
|
47
|
-
|
|
47
|
+
h as UPDATE_REFS,
|
|
48
48
|
index as default,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
n as isFunctionString,
|
|
50
|
+
q as jsonParseReviver,
|
|
51
|
+
p as jsonStringifyReplacer,
|
|
52
|
+
t as useCommand,
|
|
53
|
+
r as useFields,
|
|
54
54
|
u as useForm,
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
s as useFormData,
|
|
56
|
+
v as useInitProps,
|
|
57
57
|
useTable
|
|
58
58
|
};
|
package/es/style.css
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
min-width: 120px;
|
|
4
4
|
}
|
|
5
|
-
.search[data-v-
|
|
5
|
+
.search[data-v-917bc550] {
|
|
6
6
|
display: flex;
|
|
7
7
|
gap: 24px;
|
|
8
8
|
}
|
|
9
|
-
.search .pro-form[data-v-
|
|
9
|
+
.search .pro-form[data-v-917bc550] {
|
|
10
10
|
flex: 1;
|
|
11
11
|
}
|
|
12
|
-
.search .pro-form[data-v-
|
|
12
|
+
.search .pro-form[data-v-917bc550] .ant-form-item {
|
|
13
13
|
margin-bottom: 0;
|
|
14
14
|
}
|
|
15
|
-
.search .buttons[data-v-
|
|
15
|
+
.search .buttons[data-v-917bc550] {
|
|
16
16
|
display: flex;
|
|
17
17
|
gap: 8px;
|
|
18
18
|
}
|
|
19
|
-
.search .expand-transition[data-v-
|
|
19
|
+
.search .expand-transition[data-v-917bc550] {
|
|
20
20
|
transition: all 0.25s;
|
|
21
21
|
}
|
|
22
22
|
.control-icon[data-v-2776fca6] {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
padding: 24px 24px 16px;
|
|
42
42
|
background-color: #fff;
|
|
43
43
|
}
|
|
44
|
-
.pro-table[data-v-
|
|
44
|
+
.pro-table[data-v-fd9aab35] {
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
min-width: 800px;
|
|
48
48
|
}
|
|
49
|
-
.pro-table[data-v-
|
|
49
|
+
.pro-table[data-v-fd9aab35] .ant-pagination .ant-pagination-total-text {
|
|
50
50
|
flex: 1;
|
|
51
51
|
}
|
package/es/table/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, inject, useAttrs, useSlots, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
3
|
-
import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-
|
|
3
|
+
import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-914194dc.js";
|
|
4
4
|
var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" };
|
|
5
5
|
const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
|
|
6
6
|
function _objectSpread$2(target) {
|
|
@@ -117,21 +117,46 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
117
117
|
},
|
|
118
118
|
emits: ["search", "reset"],
|
|
119
119
|
setup(__props, { emit: __emit }) {
|
|
120
|
-
const
|
|
121
|
-
const expandStatus = ref(true);
|
|
120
|
+
const props = __props;
|
|
122
121
|
const emit = __emit;
|
|
123
122
|
let initProFormHeight = "unset";
|
|
124
123
|
const showExpandToggle = ref(false);
|
|
124
|
+
const proFormRef = ref();
|
|
125
|
+
const expandStatus = ref(true);
|
|
125
126
|
const expand = () => {
|
|
126
127
|
expandStatus.value = !expandStatus.value;
|
|
127
128
|
};
|
|
129
|
+
const setInitExpandStatus = () => {
|
|
130
|
+
expandStatus.value = false;
|
|
131
|
+
if (proFormRef.value) {
|
|
132
|
+
const formEl = proFormRef.value.$el;
|
|
133
|
+
const formItemsEl = formEl.querySelectorAll(".ant-form-item>[path]");
|
|
134
|
+
const observer = new IntersectionObserver(
|
|
135
|
+
(entries) => {
|
|
136
|
+
expandStatus.value = entries.some((e) => {
|
|
137
|
+
if (e.intersectionRatio === 0) {
|
|
138
|
+
const path = e.target.getAttribute("path");
|
|
139
|
+
const searchFieldValue = path ? get(props.form.formData.value, path) : void 0;
|
|
140
|
+
return ![null, void 0].includes(searchFieldValue);
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
});
|
|
144
|
+
observer.disconnect();
|
|
145
|
+
},
|
|
146
|
+
{ root: formEl }
|
|
147
|
+
);
|
|
148
|
+
formItemsEl.forEach((element) => {
|
|
149
|
+
observer.observe(element);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
};
|
|
128
153
|
onMounted(() => {
|
|
129
154
|
var _a, _b;
|
|
130
155
|
const proFormEl = (_a = proFormRef.value) == null ? void 0 : _a.$el;
|
|
131
156
|
const { height = 0 } = ((_b = proFormEl == null ? void 0 : proFormEl.getBoundingClientRect) == null ? void 0 : _b.call(proFormEl)) || {};
|
|
132
157
|
initProFormHeight = height;
|
|
133
158
|
showExpandToggle.value = height > HEIGHT_THRESHOLD;
|
|
134
|
-
|
|
159
|
+
setInitExpandStatus();
|
|
135
160
|
});
|
|
136
161
|
return (_ctx, _cache) => {
|
|
137
162
|
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
@@ -184,8 +209,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
184
209
|
};
|
|
185
210
|
}
|
|
186
211
|
});
|
|
187
|
-
const
|
|
188
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
212
|
+
const SearchForm_vue_vue_type_style_index_0_scoped_917bc550_lang = "";
|
|
213
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-917bc550"]]);
|
|
189
214
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
190
215
|
__name: "Control",
|
|
191
216
|
props: mergeModels({
|
|
@@ -409,7 +434,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
409
434
|
const injectProps = inject(
|
|
410
435
|
PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS.table
|
|
411
436
|
);
|
|
412
|
-
const cache = props.paramCache ===
|
|
437
|
+
const cache = props.paramCache === null ? null : props.paramCache ?? (injectProps == null ? void 0 : injectProps.paramCache);
|
|
413
438
|
const size = ref(unref(props.size));
|
|
414
439
|
const attrs = useAttrs();
|
|
415
440
|
const { table = {} } = props;
|
|
@@ -431,11 +456,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
431
456
|
current,
|
|
432
457
|
pageSize
|
|
433
458
|
});
|
|
434
|
-
cache == null ? void 0 : cache.set(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
459
|
+
cache == null ? void 0 : cache.set(
|
|
460
|
+
(pre = {}) => cloneDeep({
|
|
461
|
+
...pre,
|
|
462
|
+
pagination: unref(pagination),
|
|
463
|
+
searchParam: unref(searchParam)
|
|
464
|
+
})
|
|
465
|
+
);
|
|
439
466
|
};
|
|
440
467
|
const reset = () => {
|
|
441
468
|
var _a2;
|
|
@@ -538,9 +565,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
538
565
|
Object.hasOwn(_ctx.$slots, "search") ? renderSlot(_ctx.$slots, "search", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(SearchForm), {
|
|
539
566
|
key: 1,
|
|
540
567
|
form,
|
|
568
|
+
cache: unref(cache),
|
|
541
569
|
onSearch: searchPage1st,
|
|
542
570
|
onReset: reset
|
|
543
|
-
}, null, 8, ["form"]))
|
|
571
|
+
}, null, 8, ["form", "cache"]))
|
|
544
572
|
]),
|
|
545
573
|
_: 3
|
|
546
574
|
}, 8, ["component"])) : createCommentVNode("", true),
|
|
@@ -586,8 +614,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
586
614
|
};
|
|
587
615
|
}
|
|
588
616
|
});
|
|
589
|
-
const
|
|
590
|
-
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
617
|
+
const Table_vue_vue_type_style_index_0_scoped_fd9aab35_lang = "";
|
|
618
|
+
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd9aab35"]]);
|
|
591
619
|
const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
|
|
592
620
|
const useTable = ({
|
|
593
621
|
columns: initColumns = [],
|