@aplus-frontend/ui 0.6.0-beta.20 → 0.6.0-beta.22
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/index.mjs +172 -168
- package/es/src/ap-drawer/ApDrawer.vue.d.ts +26 -0
- package/es/src/ap-drawer/ApDrawer.vue.mjs +78 -0
- package/es/src/ap-drawer/ApDrawer.vue2.mjs +4 -0
- package/es/src/ap-drawer/components/ApDrawerClose.vue.d.ts +8 -0
- package/es/src/ap-drawer/components/ApDrawerClose.vue.mjs +25 -0
- package/es/src/ap-drawer/components/ApDrawerClose.vue2.mjs +4 -0
- package/es/src/ap-drawer/index.d.ts +3 -7
- package/es/src/ap-drawer/index.mjs +10 -5
- package/es/src/ap-drawer/interface.d.ts +3 -0
- package/es/src/ap-drawer/style/css.d.ts +0 -1
- package/es/src/ap-drawer/style/css.js +1 -1
- package/es/src/ap-drawer/style/index.d.ts +0 -1
- package/es/src/ap-drawer/style/index.js +1 -1
- package/es/src/ap-drawer/utils/createDrawer.mjs +36 -31
- package/es/src/ap-form/item/index.vue.mjs +75 -83
- package/es/src/ap-form/item-group/index.vue.mjs +34 -35
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +18 -20
- package/es/src/ap-grid/index.vue.mjs +46 -46
- package/es/src/ap-grid/interface.d.ts +3 -3
- package/es/src/ap-list/index.vue.mjs +34 -34
- package/es/src/ap-list/interface.d.ts +4 -3
- package/es/src/ap-table/ap-table.vue2.mjs +57 -57
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +15 -15
- package/es/src/ap-table/interface.d.ts +3 -3
- package/es/src/business/ap-keep-alive/index.d.ts +2 -1
- package/es/src/business/ap-keep-alive/index.mjs +11 -9
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +7 -7
- package/es/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/es/src/business/ap-keep-alive/utils.mjs +10 -9
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +36 -30
- package/es/src/business/ap-radio-group/index.d.ts +6 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
- package/es/src/index.mjs +277 -272
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-drawer/ApDrawer.vue.d.ts +26 -0
- package/lib/src/ap-drawer/ApDrawer.vue.js +1 -0
- package/lib/src/ap-drawer/ApDrawer.vue2.js +1 -0
- package/lib/src/ap-drawer/components/ApDrawerClose.vue.d.ts +8 -0
- package/lib/src/ap-drawer/components/ApDrawerClose.vue.js +1 -0
- package/lib/src/ap-drawer/components/ApDrawerClose.vue2.js +1 -0
- package/lib/src/ap-drawer/index.d.ts +3 -7
- package/lib/src/ap-drawer/index.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +3 -0
- package/lib/src/ap-drawer/style/css.cjs +1 -1
- package/lib/src/ap-drawer/style/css.d.ts +0 -1
- package/lib/src/ap-drawer/style/index.cjs +1 -1
- package/lib/src/ap-drawer/style/index.d.ts +0 -1
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +3 -3
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +4 -3
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +3 -3
- package/lib/src/business/ap-keep-alive/index.d.ts +2 -1
- package/lib/src/business/ap-keep-alive/index.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -1
- package/lib/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-radio-group/index.d.ts +6 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +11 -8
- package/theme/antd-global-overwrite/admin/alert.css +1 -1
- package/theme/antd-global-overwrite/admin/field.css +3 -0
- package/theme/antd-global-overwrite/admin/field.less +4 -0
- package/theme/antd-global-overwrite/admin/index.css +10 -1
- package/theme/antd-global-overwrite/admin/modal.css +6 -0
- package/theme/antd-global-overwrite/admin/modal.less +8 -0
- package/theme/antd-global-overwrite/aplus/alert.css +1 -1
- package/theme/antd-global-overwrite/aplus/field.css +3 -0
- package/theme/antd-global-overwrite/aplus/field.less +4 -0
- package/theme/antd-global-overwrite/aplus/index.css +11 -2
- package/theme/antd-global-overwrite/aplus/modal.css +7 -1
- package/theme/antd-global-overwrite/aplus/modal.less +9 -1
- package/theme/ap-action/item-dropdown.css +1 -1
- package/theme/ap-action/item.css +2 -2
- package/theme/ap-appendix/ap-appendix.css +2 -2
- package/theme/ap-attachment/ap-attachment.css +2 -2
- package/theme/ap-batch-action/ap-batch-action.css +1 -1
- package/theme/ap-button/ap-button.css +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-copy/ap-copy.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-download/ap-download.css +4 -4
- package/theme/ap-drawer/ap-drawer.css +74 -0
- package/theme/ap-drawer/ap-drawer.less +39 -0
- package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
- package/theme/ap-field/checkbox.css +1 -1
- package/theme/ap-field/index.css +1 -1
- package/theme/ap-field/number.css +1 -1
- package/theme/ap-field/radio.css +1 -1
- package/theme/ap-field/text-area.css +1 -1
- package/theme/ap-form/ap-form-item-group.css +1 -1
- package/theme/ap-form/ap-form-item.css +4 -1
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/drawer-form.css +1 -1
- package/theme/ap-form/index.css +8 -5
- package/theme/ap-form/item-text-group.css +1 -1
- package/theme/ap-form/item-text.css +1 -1
- package/theme/ap-form/modal-form.css +1 -1
- package/theme/ap-form/search-form-sorter.css +5 -5
- package/theme/ap-form/search-form.css +8 -5
- package/theme/ap-grid/editable.css +1 -1
- package/theme/ap-grid/index.css +18 -13
- package/theme/ap-grid/index.less +4 -4
- package/theme/ap-group-search/ap-extension-select.css +1 -1
- package/theme/ap-group-search/ap-group-search.css +1 -1
- package/theme/ap-group-search/ap-popover-select.css +1 -1
- package/theme/ap-image/ap-image.css +1 -1
- package/theme/ap-input-radio/ap-input-radio.css +1 -1
- package/theme/ap-label/ap-label.css +1 -1
- package/theme/ap-ladder/ap-ladder.css +4 -4
- package/theme/ap-layout/ap-info-layout.css +1 -1
- package/theme/ap-list/index.css +1 -1
- package/theme/ap-product-info/ap-product-info.css +1 -1
- package/theme/ap-radio-group/ap-radio-group.css +2 -1
- package/theme/ap-radio-group/ap-radio-group.less +1 -0
- package/theme/ap-select-layout/ap-select-layout.css +3 -3
- package/theme/ap-size-input/ap-size-input.css +1 -1
- package/theme/ap-status/ap-status.css +1 -1
- package/theme/ap-summary/index.css +1 -1
- package/theme/ap-table/ap-table-index.css +1 -1
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +1 -1
- package/theme/ap-table/ap-table.css +12 -9
- package/theme/ap-table/setting/index.css +3 -3
- package/theme/ap-table/setting/modal.css +2 -2
- package/theme/ap-table/setting/select-group.css +1 -1
- package/theme/ap-table/setting/sortable-item-meta.css +1 -1
- package/theme/ap-table/setting/sortable-item.css +1 -1
- package/theme/ap-table/setting/sorter.css +2 -2
- package/theme/ap-table-modal/index.css +12 -9
- package/theme/ap-tag/ap-tag-group.css +1 -1
- package/theme/ap-tag/ap-tag.css +4 -4
- package/theme/ap-title/ap-title.css +1 -1
- package/theme/ap-upload/index.css +2 -2
- package/theme/ap-upload/multiple-file.css +1 -1
- package/theme/ap-upload/picture.css +1 -1
- package/theme/ap-upload/single-file.css +2 -2
- package/theme/ap-upload/upload.css +1 -1
- package/theme/ap-upload-single/index.css +1 -1
- package/theme/ap-view/ap-view.css +1 -1
- package/theme/batch-input-group/index.css +1 -1
- package/theme/batch-input-group/popover-input.css +1 -1
- package/theme/check-card/index.css +4 -4
- package/theme/editable-table/index.css +9 -6
- package/theme/full-screen/index.css +1 -1
- package/theme/index.css +72 -36
- package/theme/index.less +1 -0
- package/theme/mask/index.css +1 -1
- package/theme/mixins/config.less +3 -3
- package/theme/mixins/mixins.css +1 -1
- package/theme/scroll-bar/index.css +1 -1
- package/theme/scroll-view/index.css +1 -1
- package/theme/splitter/index.css +2 -2
- package/theme/text/group.css +1 -1
- package/theme/text/index.css +2 -2
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +2 -0
- package/theme/work-order-modal/index.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@aplus-frontend/ui/theme/ap-drawer/ap-drawer.less';
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { render as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { render as b, defineComponent as O, createVNode as u, mergeProps as V, h as D } from "vue";
|
|
2
|
+
import "../ApDrawer.vue2.mjs";
|
|
3
|
+
import "../components/ApDrawerClose.vue2.mjs";
|
|
4
|
+
import { ConfigProvider as E, globalConfigCached as U } from "../../config-provider/config-provider.mjs";
|
|
5
|
+
import { omit as A } from "lodash-unified";
|
|
6
|
+
import N from "../ApDrawer.vue.mjs";
|
|
7
|
+
import T from "../components/ApDrawerClose.vue.mjs";
|
|
8
|
+
const G = (l) => {
|
|
6
9
|
let o, c;
|
|
7
10
|
const {
|
|
8
|
-
destroyOnClose:
|
|
11
|
+
destroyOnClose: m = !0
|
|
9
12
|
} = l;
|
|
10
|
-
function
|
|
13
|
+
function f() {
|
|
11
14
|
o && o(!1), setTimeout(() => {
|
|
12
15
|
var e;
|
|
13
|
-
|
|
16
|
+
b(null, t), (e = t.parentElement) == null || e.removeChild(t);
|
|
14
17
|
}, 500);
|
|
15
18
|
}
|
|
16
|
-
function
|
|
19
|
+
function P() {
|
|
17
20
|
o && o(!0);
|
|
18
21
|
}
|
|
19
|
-
function
|
|
22
|
+
function h() {
|
|
20
23
|
o && o(!1);
|
|
21
24
|
}
|
|
22
25
|
function w(e) {
|
|
23
26
|
c && c(e);
|
|
24
27
|
}
|
|
25
|
-
const
|
|
28
|
+
const y = /* @__PURE__ */ O({
|
|
26
29
|
data() {
|
|
27
30
|
return {
|
|
28
|
-
open:
|
|
31
|
+
open: m,
|
|
29
32
|
props: l
|
|
30
33
|
};
|
|
31
34
|
},
|
|
@@ -41,42 +44,44 @@ const z = (l) => {
|
|
|
41
44
|
},
|
|
42
45
|
methods: {
|
|
43
46
|
async handleClose() {
|
|
44
|
-
var e, n, r, s,
|
|
47
|
+
var e, n, r, s, i;
|
|
45
48
|
if ((e = this.props) != null && e.onClose) {
|
|
46
|
-
const
|
|
47
|
-
await ((
|
|
49
|
+
const p = ((s = (r = (n = this.props) == null ? void 0 : n.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
|
|
50
|
+
await ((i = this.props) == null ? void 0 : i.onClose(p));
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
m ? f() : h();
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
55
|
render() {
|
|
53
|
-
var s,
|
|
54
|
-
const e =
|
|
55
|
-
return
|
|
56
|
+
var s, i, p;
|
|
57
|
+
const e = A(this.props, ["onClose", "extra", "footer", "visible", "onUpdate:visible", "afterVisibleChange", "onAfterVisibleOChange", "open", "onUpdate:open", "getContainer"]), n = ((p = (i = (s = this.props) == null ? void 0 : s.content) == null ? void 0 : i.component) == null ? void 0 : p.exposed) ?? void 0, r = () => m ? f() : h();
|
|
58
|
+
return u(E, U.value, {
|
|
56
59
|
default: () => {
|
|
57
|
-
var a,
|
|
58
|
-
return [
|
|
60
|
+
var C, a, g, d, x;
|
|
61
|
+
return [u(N, V({
|
|
59
62
|
open: this.open,
|
|
60
63
|
onClose: this.handleClose,
|
|
61
|
-
extra: (
|
|
62
|
-
|
|
64
|
+
extra: (C = this.props) != null && C.extra ? (g = (a = this.props) == null ? void 0 : a.extra) == null ? void 0 : g.call(a, n, r) : u(T, {
|
|
65
|
+
onClose: () => this.handleClose()
|
|
66
|
+
}, null),
|
|
67
|
+
footer: (x = (d = this.props) == null ? void 0 : d.footer) == null ? void 0 : x.call(d, n, r)
|
|
63
68
|
}, e), {
|
|
64
69
|
default: () => {
|
|
65
|
-
var
|
|
66
|
-
return [(
|
|
70
|
+
var v;
|
|
71
|
+
return [(v = this.props) == null ? void 0 : v.content];
|
|
67
72
|
}
|
|
68
73
|
})];
|
|
69
74
|
}
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
|
-
}),
|
|
73
|
-
return
|
|
74
|
-
destroy:
|
|
77
|
+
}), _ = l.getContainer || document.body, t = document.createElement("div");
|
|
78
|
+
return _.appendChild(t), b(D(y), t), {
|
|
79
|
+
destroy: f,
|
|
75
80
|
update: w,
|
|
76
|
-
open:
|
|
77
|
-
close:
|
|
81
|
+
open: P,
|
|
82
|
+
close: h
|
|
78
83
|
};
|
|
79
84
|
};
|
|
80
85
|
export {
|
|
81
|
-
|
|
86
|
+
G as createDrawer
|
|
82
87
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as D, useSlots as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { isFunction as
|
|
5
|
-
import { apFormItemColPropKeys as
|
|
6
|
-
import { QuestionCircleOutlined as
|
|
1
|
+
import { defineComponent as D, useSlots as L, ref as b, onMounted as _, computed as $, unref as l, cloneVNode as j, createBlock as v, openBlock as F, mergeProps as q, createSlots as E, withCtx as i, resolveDynamicComponent as K, renderList as O, createElementVNode as Q, normalizeClass as U, createVNode as p, normalizeStyle as Y, renderSlot as G, normalizeProps as H, guardReactiveProps as J } from "vue";
|
|
2
|
+
import { Form as M, Tooltip as W, TypographyText as X } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Z } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { isFunction as V, cloneDeep as ee, isArray as oe, omit as g } from "lodash-unified";
|
|
5
|
+
import { apFormItemColPropKeys as le } from "../constant.mjs";
|
|
6
|
+
import { QuestionCircleOutlined as te } from "@ant-design/icons-vue";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
9
|
-
import { isPromise as
|
|
10
|
-
import {
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
const
|
|
8
|
+
import { useInjectForm as re } from "../context.mjs";
|
|
9
|
+
import { isPromise as ae } from "@fruits-chain/utils";
|
|
10
|
+
import { getValidVNodeList as ne } from "../../utils/slot.mjs";
|
|
11
|
+
import { useNamespace as ie } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
const Ve = /* @__PURE__ */ D({
|
|
13
13
|
name: "ApFormItem",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -54,110 +54,102 @@ const Ce = /* @__PURE__ */ D({
|
|
|
54
54
|
transform: {},
|
|
55
55
|
description: {}
|
|
56
56
|
},
|
|
57
|
-
setup(
|
|
58
|
-
const o =
|
|
59
|
-
|
|
60
|
-
let e =
|
|
61
|
-
|
|
57
|
+
setup(B, { expose: h }) {
|
|
58
|
+
const o = B, s = L(), { model: u, updateModel: f, internalInstance: m } = re(), { m: c, b: x } = ie("ap-form-item"), d = b(!1), a = b(), [, C] = Z();
|
|
59
|
+
_(async () => {
|
|
60
|
+
let e = V(o.initialValue) ? o.initialValue() : o.initialValue;
|
|
61
|
+
ae(e) && (e = await e), m == null || m.registerField({
|
|
62
62
|
name: o.name,
|
|
63
|
-
initialValue:
|
|
63
|
+
initialValue: ee(e),
|
|
64
64
|
transform: o.transform
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
const y =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(e)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
const y = $(() => o.name ? oe(o.name) ? o.name.reduce((e, t) => e == null ? void 0 : e[t], l(u)) : u == null ? void 0 : u.value[o.name] : null);
|
|
68
|
+
function k() {
|
|
69
|
+
var r, n;
|
|
70
|
+
const e = ((r = s.default) == null ? void 0 : r.call(s)) || [];
|
|
71
|
+
if (!o.name)
|
|
72
|
+
return e[0];
|
|
73
|
+
const t = ne(e)[0];
|
|
74
|
+
return t ? j(t, {
|
|
75
|
+
[o.valuePropName]: l(y),
|
|
76
|
+
[`onUpdate:${o.valuePropName}`]: N,
|
|
77
|
+
bordered: o.bordered ? !1 : (n = t == null ? void 0 : t.props) == null ? void 0 : n.bordered,
|
|
78
|
+
onFocus: P,
|
|
79
|
+
onBlur: S
|
|
80
|
+
}) : null;
|
|
79
81
|
}
|
|
80
|
-
function
|
|
81
|
-
f.
|
|
82
|
+
function N(e) {
|
|
83
|
+
f == null || f(o.name, e);
|
|
82
84
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function P() {
|
|
86
|
+
d.value = !0;
|
|
85
87
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const e = t(v);
|
|
91
|
-
return e ? E(e, {
|
|
92
|
-
[o.valuePropName]: t(y),
|
|
93
|
-
[`onUpdate:${o.valuePropName}`]: S,
|
|
94
|
-
bordered: o.bordered ? !1 : (r = e == null ? void 0 : e.props) == null ? void 0 : r.bordered,
|
|
95
|
-
onFocus: w,
|
|
96
|
-
onBlur: T
|
|
97
|
-
}) : null;
|
|
98
|
-
});
|
|
99
|
-
function I() {
|
|
88
|
+
function S() {
|
|
89
|
+
d.value = !1;
|
|
90
|
+
}
|
|
91
|
+
function T() {
|
|
100
92
|
var e;
|
|
101
|
-
(e =
|
|
93
|
+
(e = a.value) == null || e.onFieldBlur();
|
|
102
94
|
}
|
|
103
|
-
function
|
|
95
|
+
function w() {
|
|
104
96
|
var e;
|
|
105
|
-
(e =
|
|
97
|
+
(e = a.value) == null || e.onFieldChange();
|
|
106
98
|
}
|
|
107
|
-
function
|
|
99
|
+
function I() {
|
|
108
100
|
var e;
|
|
109
|
-
(e =
|
|
101
|
+
(e = a.value) == null || e.clearValidate();
|
|
110
102
|
}
|
|
111
|
-
function
|
|
103
|
+
function z() {
|
|
112
104
|
var e;
|
|
113
|
-
(e =
|
|
105
|
+
(e = a.value) == null || e.resetField();
|
|
114
106
|
}
|
|
115
107
|
function R(e = !1) {
|
|
116
|
-
const
|
|
108
|
+
const t = l(y);
|
|
117
109
|
if (!e || !o.transform)
|
|
118
|
-
return
|
|
119
|
-
const r =
|
|
120
|
-
return o.transform ? r(
|
|
110
|
+
return t;
|
|
111
|
+
const r = V(o.transform) ? o.transform : o.transform.transformer;
|
|
112
|
+
return o.transform ? r(t) : t;
|
|
121
113
|
}
|
|
122
|
-
return
|
|
123
|
-
onFieldBlur:
|
|
124
|
-
onFieldChange:
|
|
125
|
-
clearValidate:
|
|
126
|
-
resetField:
|
|
114
|
+
return h({
|
|
115
|
+
onFieldBlur: T,
|
|
116
|
+
onFieldChange: w,
|
|
117
|
+
clearValidate: I,
|
|
118
|
+
resetField: z,
|
|
127
119
|
getFieldValue: R
|
|
128
|
-
}), (e,
|
|
120
|
+
}), (e, t) => (F(), v(l(M).Item, q(
|
|
129
121
|
{
|
|
130
122
|
ref_key: "formItemRef",
|
|
131
|
-
ref:
|
|
123
|
+
ref: a
|
|
132
124
|
},
|
|
133
|
-
|
|
125
|
+
l(g)(o, [...l(le), "tooltip", "label", "description"]),
|
|
134
126
|
{
|
|
135
127
|
class: {
|
|
136
|
-
[
|
|
137
|
-
[
|
|
138
|
-
[
|
|
128
|
+
[l(c)("bordered")]: e.bordered,
|
|
129
|
+
[l(c)("focused")]: e.bordered && d.value,
|
|
130
|
+
[l(x)()]: !0
|
|
139
131
|
},
|
|
140
132
|
colon: e.bordered ? !1 : o.colon
|
|
141
133
|
}
|
|
142
|
-
),
|
|
134
|
+
), E({
|
|
143
135
|
default: i(() => [
|
|
144
|
-
|
|
136
|
+
(F(), v(K(k())))
|
|
145
137
|
]),
|
|
146
138
|
_: 2
|
|
147
139
|
}, [
|
|
148
140
|
o.tooltip ? {
|
|
149
141
|
name: "tooltip",
|
|
150
142
|
fn: i(({ class: r }) => [
|
|
151
|
-
|
|
152
|
-
class:
|
|
143
|
+
Q("span", {
|
|
144
|
+
class: U(r)
|
|
153
145
|
}, [
|
|
154
|
-
p(
|
|
146
|
+
p(l(W), {
|
|
155
147
|
title: o.tooltip
|
|
156
148
|
}, {
|
|
157
149
|
default: i(() => [
|
|
158
|
-
p(
|
|
159
|
-
style:
|
|
160
|
-
color:
|
|
150
|
+
p(l(te), {
|
|
151
|
+
style: Y({
|
|
152
|
+
color: l(C).colorTextTertiary,
|
|
161
153
|
fontSize: "14px",
|
|
162
154
|
transform: "translateY(1px)"
|
|
163
155
|
})
|
|
@@ -172,7 +164,7 @@ const Ce = /* @__PURE__ */ D({
|
|
|
172
164
|
e.label ? {
|
|
173
165
|
name: "label",
|
|
174
166
|
fn: i(() => [
|
|
175
|
-
p(
|
|
167
|
+
p(l(X), {
|
|
176
168
|
content: e.label,
|
|
177
169
|
ellipsis: { tooltip: e.label },
|
|
178
170
|
style: { "min-width": "0px", flex: "1" }
|
|
@@ -180,15 +172,15 @@ const Ce = /* @__PURE__ */ D({
|
|
|
180
172
|
]),
|
|
181
173
|
key: "1"
|
|
182
174
|
} : void 0,
|
|
183
|
-
|
|
184
|
-
name:
|
|
185
|
-
fn: i((
|
|
186
|
-
|
|
175
|
+
O(l(g)(s, "default"), (r, n) => ({
|
|
176
|
+
name: n,
|
|
177
|
+
fn: i((A) => [
|
|
178
|
+
G(e.$slots, n, H(J(A || {})))
|
|
187
179
|
])
|
|
188
180
|
}))
|
|
189
181
|
]), 1040, ["class", "colon"]));
|
|
190
182
|
}
|
|
191
183
|
});
|
|
192
184
|
export {
|
|
193
|
-
|
|
185
|
+
Ve as default
|
|
194
186
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { isVNode as C, defineComponent as
|
|
2
|
-
import { Col as
|
|
3
|
-
import { pick as
|
|
4
|
-
import { apFormItemColPropKeys as
|
|
5
|
-
import { genRealChildren as
|
|
1
|
+
import { isVNode as C, defineComponent as _, useSlots as k, unref as r, createVNode as w, mergeProps as u, createBlock as l, openBlock as i, withCtx as P, createElementBlock as R, Fragment as S, renderList as b, resolveDynamicComponent as h } from "vue";
|
|
2
|
+
import { Col as x, Row as B } from "@aplus-frontend/antdv";
|
|
3
|
+
import { pick as N, isBoolean as j, omit as F } from "lodash-unified";
|
|
4
|
+
import { apFormItemColPropKeys as D } from "../constant.mjs";
|
|
5
|
+
import { genRealChildren as I, buildColSpan as O, getStringName as V } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isDef as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
function
|
|
10
|
-
return typeof
|
|
7
|
+
import { isDef as $ } from "../../utils/index.mjs";
|
|
8
|
+
import { useNamespace as v } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
function A(o) {
|
|
10
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !C(o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const M = /* @__PURE__ */ _({
|
|
13
13
|
name: "ApFormItemGroup",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -27,30 +27,29 @@ const T = /* @__PURE__ */ h({
|
|
|
27
27
|
default: 3
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const {
|
|
32
|
-
b:
|
|
33
|
-
} =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
default: S(() => [(s(!0), b(x, null, N(f.value, (e) => (s(), d(j(e.node), {
|
|
30
|
+
setup(o) {
|
|
31
|
+
const m = o, p = k(), {
|
|
32
|
+
b: s
|
|
33
|
+
} = v("ap-form-item-group");
|
|
34
|
+
function d() {
|
|
35
|
+
var a;
|
|
36
|
+
const c = I(((a = p.default) == null ? void 0 : a.call(p)) || []);
|
|
37
|
+
return r(c).map((e, f) => {
|
|
38
|
+
const t = e.props, n = N(t, D), g = n != null && n.span ? {} : O(m.countPerRow), y = j(t.hidden) ? !!t.hidden : $(t.hidden);
|
|
39
|
+
return {
|
|
40
|
+
key: `${f}-${V(t.name)}`,
|
|
41
|
+
node: w(x, u(g, n, {
|
|
42
|
+
class: y ? s("col-hidden") : ""
|
|
43
|
+
}), A(e) ? e : {
|
|
44
|
+
default: () => [e]
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return (c, a) => (i(), l(r(B), u({
|
|
50
|
+
class: r(s)()
|
|
51
|
+
}, r(F)(m, ["countPerRow"])), {
|
|
52
|
+
default: P(() => [(i(!0), R(S, null, b(d(), (e) => (i(), l(h(e.node), {
|
|
54
53
|
key: e.key
|
|
55
54
|
}))), 128))]),
|
|
56
55
|
_: 1
|
|
@@ -58,5 +57,5 @@ const T = /* @__PURE__ */ h({
|
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
M as default
|
|
62
61
|
};
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as w, watchEffect as a, computed as s, unref as i } from "vue";
|
|
2
2
|
import { useResizeObserver as P } from "@vueuse/core";
|
|
3
3
|
import { isUndefined as R } from "lodash-unified";
|
|
4
|
-
const c = [1, 2, 3, 4, 6, 8, 12, 24], g = { xs: 0, sm: 768, md: 1280, lg: 1728 },
|
|
5
|
-
(
|
|
6
|
-
),
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
return;
|
|
12
|
-
const { stop: o } = P(e.resizeTarget, (f) => {
|
|
4
|
+
const c = [1, 2, 3, 4, 6, 8, 12, 24], g = { xs: 0, sm: 768, md: 1280, lg: 1728 }, h = Object.entries(g).sort(
|
|
5
|
+
(t, r) => r[1] - t[1]
|
|
6
|
+
), v = (t) => {
|
|
7
|
+
const r = w(0);
|
|
8
|
+
a(
|
|
9
|
+
(e) => {
|
|
10
|
+
const n = R(t.resizeTarget) ? document.documentElement : t.resizeTarget, { stop: o } = P(n, (f) => {
|
|
13
11
|
const m = f[0], { width: d } = m.contentRect;
|
|
14
|
-
|
|
12
|
+
r.value = d;
|
|
15
13
|
});
|
|
16
|
-
|
|
14
|
+
e(() => {
|
|
17
15
|
o();
|
|
18
16
|
});
|
|
19
17
|
},
|
|
20
18
|
{ flush: "post" }
|
|
21
19
|
);
|
|
22
20
|
const u = s(() => {
|
|
23
|
-
for (const [
|
|
24
|
-
if (i(
|
|
25
|
-
return
|
|
21
|
+
for (const [e, n] of h)
|
|
22
|
+
if (i(r) > n)
|
|
23
|
+
return e;
|
|
26
24
|
return "md";
|
|
27
25
|
});
|
|
28
26
|
return s(() => {
|
|
29
|
-
const
|
|
30
|
-
(o) => o ===
|
|
31
|
-
),
|
|
32
|
-
return
|
|
27
|
+
const e = c.findIndex(
|
|
28
|
+
(o) => o === t.countPerRow
|
|
29
|
+
), n = i(u);
|
|
30
|
+
return n === "lg" ? c[e + 1] || t.countPerRow : n === "xs" && c[e - 1] || t.countPerRow;
|
|
33
31
|
});
|
|
34
32
|
};
|
|
35
33
|
export {
|
|
36
|
-
|
|
34
|
+
v as useCountPerRow
|
|
37
35
|
};
|