@aplus-frontend/ui 7.13.8 → 7.13.9
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/src/ag-grid/components/body-cell/index.vue2.mjs +7 -7
- package/es/src/ag-grid/components/empty/index.vue2.mjs +10 -10
- package/es/src/ag-grid/components/header-cell/index.vue2.mjs +37 -37
- package/es/src/ag-grid/components/row/index.vue2.mjs +5 -5
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +12 -12
- package/es/src/ag-grid/editable/form-item.vue.mjs +49 -49
- package/es/src/ag-grid/editable/index.vue.mjs +27 -27
- package/es/src/ag-grid/index.vue.mjs +249 -249
- package/es/src/ap-action/group/index.vue.mjs +15 -15
- package/es/src/ap-action/item/index.vue2.mjs +28 -28
- package/es/src/ap-action/item-dropdown/index.vue.mjs +39 -39
- package/es/src/ap-field/checkbox/index.vue.mjs +19 -19
- package/es/src/ap-field/checkbox/read.vue2.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +50 -50
- package/es/src/ap-field/date/read.vue2.mjs +7 -7
- package/es/src/ap-field/date-range/index.vue.mjs +30 -30
- package/es/src/ap-field/date-range/read.vue2.mjs +20 -20
- package/es/src/ap-field/number/index.vue.mjs +24 -24
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/second/index.vue.mjs +15 -15
- package/es/src/ap-field/second/read.vue2.mjs +7 -7
- package/es/src/ap-field/segmented/index.vue.mjs +24 -24
- package/es/src/ap-field/select/index.vue.d.ts +12 -2
- package/es/src/ap-field/select/index.vue.mjs +127 -124
- package/es/src/ap-field/select/read.vue2.mjs +6 -6
- package/es/src/ap-field/slider/index.vue.mjs +11 -11
- package/es/src/ap-field/style/select.mjs +53 -36
- package/es/src/ap-field/switch/index.vue.mjs +45 -45
- package/es/src/ap-field/text/read-password.vue2.mjs +13 -13
- package/es/src/ap-field/text/read.vue2.mjs +3 -3
- package/es/src/ap-field/text-area/index.vue.mjs +29 -29
- package/es/src/ap-field/text-area/read.vue2.mjs +12 -12
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -31
- package/es/src/ap-form/ap-form.vue2.mjs +46 -46
- package/es/src/ap-form/drawer-form/index.vue.mjs +30 -30
- package/es/src/ap-form/item/index.vue.mjs +75 -75
- package/es/src/ap-form/items/checkbox/index.vue.mjs +10 -10
- package/es/src/ap-form/items/number/index.vue.mjs +17 -17
- package/es/src/ap-form/items/radio/index.vue.mjs +13 -13
- package/es/src/ap-form/items/switch/index.vue.mjs +14 -14
- package/es/src/ap-form/items/text/index.vue2.mjs +26 -26
- package/es/src/ap-form/items/text/password.vue.mjs +19 -19
- package/es/src/ap-form/items/text-area/index.vue.mjs +17 -17
- package/es/src/ap-form/modal-form/index.vue.mjs +34 -34
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +39 -39
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +7 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +46 -46
- package/es/src/ap-grid/editable/index.vue.mjs +19 -19
- package/es/src/ap-grid/index.vue.mjs +212 -212
- package/es/src/ap-list/index.vue.mjs +116 -116
- package/es/src/ap-table/ap-table.vue2.mjs +217 -217
- package/es/src/ap-table/components/index/index.vue2.mjs +9 -9
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +52 -51
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +21 -21
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +15 -15
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +69 -69
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +31 -30
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +41 -40
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -14
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +54 -54
- package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +13 -13
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +20 -20
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +33 -33
- package/es/src/business/ap-descriptions/help-message/index.vue2.mjs +13 -13
- package/es/src/business/ap-download/ap-download.vue.mjs +24 -24
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.mjs +77 -77
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +33 -33
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +12 -12
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +43 -43
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +57 -57
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +37 -37
- package/es/src/business/ap-tag/ap-tag.vue.mjs +24 -24
- package/es/src/business/ap-title/ApTitle.vue2.mjs +27 -27
- package/es/src/business/ap-value-select-card/index.vue2.mjs +98 -98
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +25 -25
- package/es/src/business/batch-input-group/index.vue.mjs +60 -60
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +29 -29
- package/es/src/editable-table/form-item.vue.mjs +35 -35
- package/es/src/editable-table/index.vue.mjs +19 -19
- package/es/src/full-screen/index.vue.mjs +46 -46
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/mask/index.vue.mjs +48 -48
- package/es/src/portal/index.vue.mjs +5 -5
- package/es/src/scroll-bar/internal.vue.mjs +62 -62
- package/es/src/scroll-view/index.vue.mjs +66 -66
- package/es/src/skeleton/components/desc/index.vue2.mjs +9 -9
- package/es/src/skeleton/components/desc/item-large.vue2.mjs +25 -25
- package/es/src/skeleton/components/desc/item.vue2.mjs +13 -13
- package/es/src/skeleton/components/list/index.vue2.mjs +14 -14
- package/es/src/skeleton/components/list/item.vue2.mjs +12 -12
- package/es/src/skeleton/components/page-header/index.vue2.mjs +8 -8
- package/es/src/skeleton/components/search-form/index.vue2.mjs +35 -35
- package/es/src/skeleton/components/table/index.vue2.mjs +17 -17
- package/es/src/skeleton/components/table/item.vue2.mjs +23 -23
- package/es/src/skeleton/descriptions.vue2.mjs +15 -15
- package/es/src/skeleton/list-page.vue2.mjs +12 -12
- package/es/src/splitter/Panel.vue2.mjs +11 -11
- package/es/src/splitter/SplitBar.vue2.mjs +79 -79
- package/es/src/splitter/Splitter.vue2.mjs +50 -50
- package/es/src/text/group.vue.mjs +8 -8
- package/es/src/text/index.vue.mjs +48 -48
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/row/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +12 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/business/ap-download/ap-download.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-status/group/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/portal/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/skeleton/components/desc/index.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item.vue2.js +1 -1
- package/lib/src/skeleton/components/list/index.vue2.js +1 -1
- package/lib/src/skeleton/components/list/item.vue2.js +1 -1
- package/lib/src/skeleton/components/page-header/index.vue2.js +1 -1
- package/lib/src/skeleton/components/search-form/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/item.vue2.js +1 -1
- package/lib/src/skeleton/descriptions.vue2.js +1 -1
- package/lib/src/skeleton/list-page.vue2.js +1 -1
- package/lib/src/splitter/Panel.vue2.js +1 -1
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as z, ref as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { omit as
|
|
1
|
+
import { defineComponent as z, ref as g, computed as u, unref as t, createElementBlock as T, openBlock as B, normalizeClass as C, createVNode as d, withCtx as b, createBlock as _, createCommentVNode as K, normalizeStyle as M, mergeProps as $ } from "vue";
|
|
2
|
+
import { Form as D, Space as G } from "@aplus-frontend/antdv";
|
|
3
|
+
import { omit as q } from "lodash-unified";
|
|
4
4
|
import "../../ap-field/index.mjs";
|
|
5
|
-
import { useDefaultPlaceholder as
|
|
5
|
+
import { useDefaultPlaceholder as H } from "../../ap-field/hooks/use-default-placeholder.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
8
|
import "../../utils/index.mjs";
|
|
9
9
|
import "./popover-input/index.vue.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { splitValue as
|
|
12
|
-
import { useControllableValue as
|
|
13
|
-
import { useLocale as
|
|
14
|
-
import { useNamespace as
|
|
15
|
-
import { isDef as
|
|
10
|
+
import Y from "./style/index.mjs";
|
|
11
|
+
import { splitValue as J } from "./utils.mjs";
|
|
12
|
+
import { useControllableValue as Q } from "../../hooks/useControllableValue.mjs";
|
|
13
|
+
import { useLocale as W } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { isDef as Z } from "../../utils/is.mjs";
|
|
16
16
|
import ee from "../../ap-field/select/index.vue.mjs";
|
|
17
17
|
import { ApFieldText as te } from "../../ap-field/text/index.mjs";
|
|
18
18
|
import oe from "./popover-input/index.vue2.mjs";
|
|
19
|
-
const
|
|
19
|
+
const c = "GROUP_SEARCH_ALL", be = /* @__PURE__ */ z({
|
|
20
20
|
name: "BatchInputGroup",
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
@@ -78,84 +78,84 @@ const f = "GROUP_SEARCH_ALL", Ce = /* @__PURE__ */ z({
|
|
|
78
78
|
beforeInput: {}
|
|
79
79
|
},
|
|
80
80
|
emits: ["update:value"],
|
|
81
|
-
setup(
|
|
82
|
-
const o =
|
|
81
|
+
setup(A, { emit: I }) {
|
|
82
|
+
const o = A, V = H("Text", o), x = I, { value: a, updateValue: r } = Q(
|
|
83
83
|
o,
|
|
84
|
-
|
|
85
|
-
),
|
|
86
|
-
{ value:
|
|
84
|
+
x
|
|
85
|
+
), s = g(), f = g(), { t: S } = W(), { b: k } = X("batch-input-group"), v = Y("batch-input-group"), p = D.useInjectFormItemContext(), F = u(() => o.options ? o.options.length > 1 && o.hasAll ? [
|
|
86
|
+
{ value: c, label: S("ap.common.all") },
|
|
87
87
|
...o.options
|
|
88
|
-
] : o.options : []), U =
|
|
89
|
-
`) : ""), R =
|
|
90
|
-
const e = t(
|
|
88
|
+
] : o.options : []), U = u(() => o.options ? o.options.map((e) => e.value) : []), w = u(() => t(a)?.value?.length ? t(a).value.join(",") : ""), P = u(() => t(a)?.value?.length ? t(a).value.join(`
|
|
89
|
+
`) : ""), R = u(() => {
|
|
90
|
+
const e = t(a)?.key;
|
|
91
91
|
if (e?.length)
|
|
92
|
-
return e.length === 1 || !o.hasAll ? e[0] :
|
|
93
|
-
}), j =
|
|
94
|
-
const e = t(
|
|
95
|
-
return !e || e?.length <= 1 || o.hasAll === !1 ? t(
|
|
92
|
+
return e.length === 1 || !o.hasAll ? e[0] : c;
|
|
93
|
+
}), j = u(() => {
|
|
94
|
+
const e = t(a)?.key;
|
|
95
|
+
return !e || e?.length <= 1 || o.hasAll === !1 ? t(V) : (o.options || []).filter((n) => e.includes(n.value)).map((n) => n.label).join("/");
|
|
96
96
|
});
|
|
97
97
|
function E(e) {
|
|
98
|
-
const l = t(
|
|
99
|
-
|
|
98
|
+
const l = t(a) || {}, n = e === c ? t(U) : Z(e) ? [e] : [];
|
|
99
|
+
r({
|
|
100
100
|
...l,
|
|
101
101
|
key: n
|
|
102
102
|
}), p.onFieldChange();
|
|
103
103
|
}
|
|
104
104
|
function L(e) {
|
|
105
|
-
const l = t(
|
|
106
|
-
let m =
|
|
105
|
+
const l = t(a) || {}, n = e.target.value || "";
|
|
106
|
+
let m = J(n, ",", ",", o.maxNum);
|
|
107
107
|
if (n !== m) {
|
|
108
|
-
const
|
|
109
|
-
|
|
108
|
+
const h = f.value?.$el?.querySelector("input");
|
|
109
|
+
h && (h.value = m);
|
|
110
110
|
}
|
|
111
|
-
let
|
|
112
|
-
|
|
111
|
+
let i = m.split(",");
|
|
112
|
+
i.length === 1 && i[0] === "" && (i = []), r({
|
|
113
113
|
...l,
|
|
114
|
-
value:
|
|
114
|
+
value: i
|
|
115
115
|
}), p.onFieldChange();
|
|
116
116
|
}
|
|
117
117
|
function N(e) {
|
|
118
|
-
const l = t(
|
|
118
|
+
const l = t(a) || {};
|
|
119
119
|
let n = e.split(/,|\n/);
|
|
120
|
-
|
|
120
|
+
r({
|
|
121
121
|
...l,
|
|
122
122
|
value: n
|
|
123
123
|
}), p.onFieldChange();
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const e = t(
|
|
127
|
-
|
|
125
|
+
function y() {
|
|
126
|
+
const e = t(a) || {}, l = e.value?.filter(Boolean);
|
|
127
|
+
r({
|
|
128
128
|
...e,
|
|
129
129
|
value: l
|
|
130
130
|
}), p.onFieldChange();
|
|
131
131
|
}
|
|
132
132
|
function O(e) {
|
|
133
|
-
|
|
133
|
+
y(), o.onBlur?.(e);
|
|
134
134
|
}
|
|
135
|
-
return (e, l) => (
|
|
135
|
+
return (e, l) => (B(), T("div", {
|
|
136
136
|
ref_key: "containerRef",
|
|
137
|
-
ref:
|
|
138
|
-
class: C([t(k)(), t(
|
|
137
|
+
ref: s,
|
|
138
|
+
class: C([t(k)(), t(v)]),
|
|
139
139
|
onFocus: l[0] || (l[0] = //@ts-ignore
|
|
140
|
-
(...n) =>
|
|
140
|
+
(...n) => e.onFocus && e.onFocus(...n)),
|
|
141
141
|
onBlur: l[1] || (l[1] = //@ts-ignore
|
|
142
|
-
(...n) =>
|
|
142
|
+
(...n) => e.onBlur && e.onBlur(...n))
|
|
143
143
|
}, [
|
|
144
|
-
d(t(
|
|
144
|
+
d(t(G).Compact, { block: "" }, {
|
|
145
145
|
default: b(() => [
|
|
146
|
-
|
|
146
|
+
e.options?.length ? (B(), _(t(ee), {
|
|
147
147
|
key: 0,
|
|
148
|
-
style:
|
|
148
|
+
style: M(e.style),
|
|
149
149
|
options: F.value,
|
|
150
150
|
value: R.value,
|
|
151
151
|
"allow-clear": !1,
|
|
152
152
|
"dropdown-match-select-width": !1,
|
|
153
|
-
disabled:
|
|
154
|
-
"get-popup-container": () =>
|
|
153
|
+
disabled: e.disabled,
|
|
154
|
+
"get-popup-container": () => s.value,
|
|
155
155
|
"onUpdate:value": E
|
|
156
|
-
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) :
|
|
157
|
-
d(t(te),
|
|
158
|
-
t(
|
|
156
|
+
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) : K("", !0),
|
|
157
|
+
d(t(te), $(
|
|
158
|
+
t(q)(o, [
|
|
159
159
|
"style",
|
|
160
160
|
"value",
|
|
161
161
|
"onUpdate:value",
|
|
@@ -166,8 +166,8 @@ const f = "GROUP_SEARCH_ALL", Ce = /* @__PURE__ */ z({
|
|
|
166
166
|
]),
|
|
167
167
|
{
|
|
168
168
|
ref_key: "inputRef",
|
|
169
|
-
ref:
|
|
170
|
-
style:
|
|
169
|
+
ref: f,
|
|
170
|
+
style: e.inputStyle,
|
|
171
171
|
value: w.value,
|
|
172
172
|
placeholder: j.value,
|
|
173
173
|
onInput: L,
|
|
@@ -176,15 +176,15 @@ const f = "GROUP_SEARCH_ALL", Ce = /* @__PURE__ */ z({
|
|
|
176
176
|
), {
|
|
177
177
|
suffix: b(() => [
|
|
178
178
|
d(oe, {
|
|
179
|
-
_parent:
|
|
179
|
+
_parent: s.value,
|
|
180
180
|
value: P.value,
|
|
181
|
-
disabled:
|
|
181
|
+
disabled: e.disabled,
|
|
182
182
|
placement: o.popoverPlacement,
|
|
183
|
-
"max-num":
|
|
184
|
-
class: C(t(
|
|
185
|
-
"get-popup-container":
|
|
183
|
+
"max-num": e.maxNum,
|
|
184
|
+
class: C(t(v)),
|
|
185
|
+
"get-popup-container": e.getPopupContainer,
|
|
186
186
|
"onUpdate:value": N,
|
|
187
|
-
onClose:
|
|
187
|
+
onClose: y
|
|
188
188
|
}, null, 8, ["_parent", "value", "disabled", "placement", "max-num", "class", "get-popup-container"])
|
|
189
189
|
]),
|
|
190
190
|
_: 1
|
|
@@ -196,5 +196,5 @@ const f = "GROUP_SEARCH_ALL", Ce = /* @__PURE__ */ z({
|
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
export {
|
|
199
|
-
|
|
199
|
+
be as default
|
|
200
200
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, ref as p, computed as v, createElementBlock as O, openBlock as F, normalizeClass as i, unref as n, createVNode as m, withCtx as d, createElementVNode as L } from "vue";
|
|
2
2
|
import { Popover as z, Textarea as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import { IconApAdLineScreen as S } from "@aplus-frontend/icon";
|
|
4
4
|
import { isNumber as W } from "lodash-unified";
|
|
@@ -7,8 +7,8 @@ import "../../../hooks/index.mjs";
|
|
|
7
7
|
import { splitValue as j } from "../utils.mjs";
|
|
8
8
|
import { useControllableValue as T } from "../../../hooks/useControllableValue.mjs";
|
|
9
9
|
import { useLocale as U } from "../../../config-provider/hooks/use-locale.mjs";
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const ee = /* @__PURE__ */
|
|
10
|
+
import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const ee = /* @__PURE__ */ E({
|
|
12
12
|
name: "BatchInputGroupPopoverInput",
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "index",
|
|
@@ -23,8 +23,8 @@ const ee = /* @__PURE__ */ O({
|
|
|
23
23
|
"onUpdate:value": { type: Function }
|
|
24
24
|
},
|
|
25
25
|
emits: ["update:value"],
|
|
26
|
-
setup(
|
|
27
|
-
const o =
|
|
26
|
+
setup(h, { emit: C }) {
|
|
27
|
+
const o = h, b = C, { value: y, updateValue: x } = T(o, b), u = p(!1), s = p(), c = p(), r = p({
|
|
28
28
|
left: 0,
|
|
29
29
|
right: 0
|
|
30
30
|
}), P = (e) => o._parent || e, { t: V } = U();
|
|
@@ -38,63 +38,63 @@ const ee = /* @__PURE__ */ O({
|
|
|
38
38
|
const l = s.value?.$el || s.value;
|
|
39
39
|
l && (l.value = t);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
x(t);
|
|
42
42
|
}
|
|
43
43
|
const N = () => {
|
|
44
44
|
if (o.getPopupContainer) {
|
|
45
45
|
const e = o._parent, a = o.getPopupContainer(), t = e?.getBoundingClientRect(), l = a?.getBoundingClientRect();
|
|
46
|
-
|
|
46
|
+
c.value = e?.offsetWidth, r.value.left = (t?.left || 0) - (l.left || 0), r.value.right = (t?.right || 0) - (l.right || 0);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
function $(e) {
|
|
50
|
-
N(), o.disabled ?
|
|
50
|
+
N(), o.disabled ? u.value = !1 : u.value = e, !e && o.onClose?.();
|
|
51
51
|
}
|
|
52
|
-
const { b:
|
|
53
|
-
const e = o.placement, a = W(e) ? `${e}px` : e === "left" ? `${
|
|
52
|
+
const { b: f, e: R, em: _, bm: B } = g("batch-input-group-popover-input"), { cssVar: A } = g("batch-input-group-popover"), k = v(() => {
|
|
53
|
+
const e = o.placement, a = W(e) ? `${e}px` : e === "left" ? `${r.value.left}px` : "unset", t = e === "right" ? `${-r.value.right}px` : "unset";
|
|
54
54
|
return {
|
|
55
55
|
left: a,
|
|
56
56
|
right: t
|
|
57
57
|
};
|
|
58
|
-
}),
|
|
59
|
-
...
|
|
60
|
-
width:
|
|
58
|
+
}), w = v(() => A({
|
|
59
|
+
...k.value,
|
|
60
|
+
width: c.value ? `${c.value}px` : "100%"
|
|
61
61
|
}));
|
|
62
|
-
return (e, a) => (F(),
|
|
63
|
-
class:
|
|
62
|
+
return (e, a) => (F(), O("div", {
|
|
63
|
+
class: i(n(f)())
|
|
64
64
|
}, [
|
|
65
|
-
|
|
65
|
+
m(n(z), {
|
|
66
66
|
"overlay-class-name": `${n(R)("popover")} ${e.$attrs.class}`,
|
|
67
|
-
"get-popup-container":
|
|
67
|
+
"get-popup-container": e.getPopupContainer ?? P,
|
|
68
68
|
trigger: "click",
|
|
69
69
|
placement: "bottomLeft",
|
|
70
|
-
open:
|
|
71
|
-
"overlay-style":
|
|
70
|
+
open: u.value,
|
|
71
|
+
"overlay-style": w.value,
|
|
72
72
|
onOpenChange: $
|
|
73
73
|
}, {
|
|
74
|
-
content:
|
|
74
|
+
content: d(() => [
|
|
75
75
|
L("div", {
|
|
76
|
-
class:
|
|
76
|
+
class: i(n(_)("popover", "content"))
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
m(n(G), {
|
|
79
79
|
ref_key: "textAreaRef",
|
|
80
80
|
ref: s,
|
|
81
81
|
placeholder: n(V)("ap.batchInputGroup.popoverInputPlaceholder", {
|
|
82
|
-
maxNum:
|
|
82
|
+
maxNum: e.maxNum + ""
|
|
83
83
|
}),
|
|
84
84
|
bordered: !1,
|
|
85
85
|
rows: 10,
|
|
86
|
-
value: n(
|
|
86
|
+
value: n(y),
|
|
87
87
|
"allow-clear": !1,
|
|
88
88
|
"auto-size": !1,
|
|
89
89
|
onInput: I
|
|
90
90
|
}, null, 8, ["placeholder", "value"])
|
|
91
91
|
], 2)
|
|
92
92
|
]),
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
class:
|
|
96
|
-
n(
|
|
97
|
-
|
|
93
|
+
default: d(() => [
|
|
94
|
+
m(n(S), {
|
|
95
|
+
class: i([
|
|
96
|
+
n(f)("trigger-icon"),
|
|
97
|
+
e.disabled ? n(B)("trigger-icon", "disabled") : null
|
|
98
98
|
])
|
|
99
99
|
}, null, 8, ["class"])
|
|
100
100
|
]),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as A, unref as r, useSlots as K, toRef as O, watch as G, nextTick as H, shallowRef as W, createBlock as U, openBlock as $, mergeProps as p, withCtx as c, createVNode as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
2
|
import { Table as M } from "@aplus-frontend/antdv";
|
|
3
|
-
import { isUndefined as ee, isNumber as
|
|
3
|
+
import { isUndefined as ee, isNumber as d, cloneDeep as te, isArray as ae, omit as h } from "lodash-unified";
|
|
4
4
|
import { getModelValue as oe } from "../ap-form/utils/get.mjs";
|
|
5
5
|
import { useDevWarning as ne } from "../utils/warning.mjs";
|
|
6
|
-
import { ApForm as
|
|
6
|
+
import { ApForm as b } from "../ap-form/index.mjs";
|
|
7
7
|
import { useInjectForm as le } from "../ap-form/context.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
9
|
import "../utils/index.mjs";
|
|
@@ -12,8 +12,8 @@ import se from "./style/index.mjs";
|
|
|
12
12
|
import { scrollToRowIndex as ie } from "./utils.mjs";
|
|
13
13
|
import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
|
|
14
14
|
import { useGlobalConfig as fe } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
-
import { isDef as
|
|
16
|
-
const Te = /* @__PURE__ */
|
|
15
|
+
import { isDef as g } from "../utils/is.mjs";
|
|
16
|
+
const Te = /* @__PURE__ */ z({
|
|
17
17
|
name: "EditableTableFormItem",
|
|
18
18
|
__name: "form-item",
|
|
19
19
|
props: {
|
|
@@ -117,15 +117,15 @@ const Te = /* @__PURE__ */ A({
|
|
|
117
117
|
default: () => ({})
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
setup(
|
|
121
|
-
expose:
|
|
120
|
+
setup(w, {
|
|
121
|
+
expose: y
|
|
122
122
|
}) {
|
|
123
|
-
const o =
|
|
123
|
+
const o = w;
|
|
124
124
|
ne("EditableTableFormItem")(!1, "breaking", "EditableTableFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
125
125
|
const {
|
|
126
126
|
internalInstance: i,
|
|
127
|
-
model:
|
|
128
|
-
} = le(), u =
|
|
127
|
+
model: x
|
|
128
|
+
} = le(), u = A(oe(r(x), o.name) || []), C = K(), R = O(o, "name"), F = b.useWatch(R);
|
|
129
129
|
G(() => F.value, async (e) => {
|
|
130
130
|
await H(), u.value = e, o.onChange?.(e);
|
|
131
131
|
}, {
|
|
@@ -133,10 +133,10 @@ const Te = /* @__PURE__ */ A({
|
|
|
133
133
|
});
|
|
134
134
|
const {
|
|
135
135
|
b: B
|
|
136
|
-
} = ue("editable-table"), v = se("editable-table"),
|
|
136
|
+
} = ue("editable-table"), v = se("editable-table"), m = W(), I = fe("valueTypeMap"), T = re(o, I);
|
|
137
137
|
function D(e, n) {
|
|
138
138
|
const l = r(u)?.length || 0;
|
|
139
|
-
if (
|
|
139
|
+
if (g(o.maxLength) && l >= o.maxLength)
|
|
140
140
|
return;
|
|
141
141
|
const t = {
|
|
142
142
|
...e || {}
|
|
@@ -150,20 +150,20 @@ const Te = /* @__PURE__ */ A({
|
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function E(e, n = "suffix") {
|
|
153
|
-
const l = r(u)?.length || 0, t =
|
|
154
|
-
if (
|
|
153
|
+
const l = r(u)?.length || 0, t = d(e) ? e : e.length;
|
|
154
|
+
if (g(o.maxLength) && l + t > o.maxLength)
|
|
155
155
|
return;
|
|
156
|
-
const a =
|
|
157
|
-
i?.setFieldValue(o.name, a, !0, (s,
|
|
158
|
-
if (!s[
|
|
159
|
-
s[
|
|
156
|
+
const a = d(e) ? new Array(e).fill(0).map(() => ({})) : te(e);
|
|
157
|
+
i?.setFieldValue(o.name, a, !0, (s, f) => {
|
|
158
|
+
if (!s[f]) {
|
|
159
|
+
s[f] = [...a];
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
n === "suffix" ? s[
|
|
162
|
+
n === "suffix" ? s[f].push(...a) : s[f].unshift(...a);
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
function S(e) {
|
|
166
|
-
const n = new Set(
|
|
166
|
+
const n = new Set(d(e) ? [e] : e);
|
|
167
167
|
i?.setFieldValue(o.name, void 0, !0, (l, t) => {
|
|
168
168
|
l[t] = l[t].filter((a, s) => !n.has(s));
|
|
169
169
|
});
|
|
@@ -188,42 +188,42 @@ const Te = /* @__PURE__ */ A({
|
|
|
188
188
|
});
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function _(e) {
|
|
192
192
|
i?.setFieldValue(o.name, e);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function P(e, n) {
|
|
195
195
|
const l = e === "end" ? u.value.length - 1 : e;
|
|
196
|
-
ie(l,
|
|
196
|
+
ie(l, m.value?.$el, n);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function j() {
|
|
199
199
|
i?.setFieldValue?.(o.name, []);
|
|
200
200
|
}
|
|
201
|
-
return
|
|
201
|
+
return y({
|
|
202
202
|
add: D,
|
|
203
203
|
remove: S,
|
|
204
204
|
getRowData: k,
|
|
205
205
|
getRowsData: V,
|
|
206
206
|
setRowData: N,
|
|
207
207
|
addMultiple: E,
|
|
208
|
-
scrollTo:
|
|
209
|
-
setTableData:
|
|
210
|
-
clear:
|
|
208
|
+
scrollTo: P,
|
|
209
|
+
setTableData: _,
|
|
210
|
+
clear: j,
|
|
211
211
|
removeByKey: L
|
|
212
|
-
}), (e, n) => ($(), U(r(
|
|
213
|
-
name:
|
|
214
|
-
label:
|
|
212
|
+
}), (e, n) => ($(), U(r(b).FormItem, p(e.formItem, {
|
|
213
|
+
name: e.name,
|
|
214
|
+
label: e.label
|
|
215
215
|
}), {
|
|
216
|
-
default:
|
|
216
|
+
default: c(() => [q(r(M), p(r(h)(o, ["name", "maxLength", "onChange"]), {
|
|
217
217
|
ref_key: "tableRef",
|
|
218
|
-
ref:
|
|
218
|
+
ref: m,
|
|
219
219
|
class: [r(B)(), r(v)],
|
|
220
220
|
columns: r(T),
|
|
221
221
|
"data-source": u.value
|
|
222
222
|
}), J({
|
|
223
223
|
_: 2
|
|
224
|
-
}, [Q(r(
|
|
224
|
+
}, [Q(r(h)(C, ["headerCell"]), (l, t) => ({
|
|
225
225
|
name: t,
|
|
226
|
-
fn:
|
|
226
|
+
fn: c((a) => [X(e.$slots, t, Y(Z(a || {})))])
|
|
227
227
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
228
228
|
_: 3
|
|
229
229
|
}, 16, ["name", "label"]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as U, useSlots as W, shallowRef as $, ref as q, watch as
|
|
1
|
+
import { defineComponent as U, useSlots as W, shallowRef as $, ref as q, watch as b, unref as s, createBlock as J, openBlock as Q, withCtx as p, createVNode as w, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as M, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
2
|
import { Table as ae } from "@aplus-frontend/antdv";
|
|
3
|
-
import { isEqual as ne, isArray as m, isUndefined as oe, isNumber as c, cloneDeep as le, omit as
|
|
3
|
+
import { isEqual as ne, isArray as m, isUndefined as oe, isNumber as c, cloneDeep as le, omit as v } from "lodash-unified";
|
|
4
4
|
import { useDevWarning as se } from "../utils/warning.mjs";
|
|
5
5
|
import { ApForm as h } from "../ap-form/index.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
@@ -116,24 +116,24 @@ const Se = /* @__PURE__ */ U({
|
|
|
116
116
|
onFieldChange: {}
|
|
117
117
|
},
|
|
118
118
|
emits: ["update:value"],
|
|
119
|
-
setup(
|
|
119
|
+
setup(x, {
|
|
120
120
|
expose: C,
|
|
121
121
|
emit: R
|
|
122
122
|
}) {
|
|
123
|
-
const t =
|
|
123
|
+
const t = x;
|
|
124
124
|
se("EditableTable")(!1, "breaking", "EditableTable has been EOL, Please use EditableAgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
125
125
|
const {
|
|
126
126
|
b: F
|
|
127
|
-
} = de("editable-table"), B = ue("editable-table"), T = W(), E = R,
|
|
127
|
+
} = de("editable-table"), B = ue("editable-table"), T = W(), E = R, g = $(), {
|
|
128
128
|
value: i,
|
|
129
129
|
updateValue: V
|
|
130
130
|
} = fe(t, E), r = q(), S = pe("valueTypeMap"), f = h.useWatch(t.name, r);
|
|
131
|
-
|
|
131
|
+
b(() => f.value, (e) => {
|
|
132
132
|
V(e), t.onChange?.(e);
|
|
133
133
|
}, {
|
|
134
134
|
deep: !0,
|
|
135
135
|
flush: "post"
|
|
136
|
-
}),
|
|
136
|
+
}), b(i, (e) => {
|
|
137
137
|
e !== s(f) && (ne(e, s(f)) || r.value?.setFieldValue(t.name, e));
|
|
138
138
|
}, {
|
|
139
139
|
deep: !0
|
|
@@ -142,13 +142,13 @@ const Se = /* @__PURE__ */ U({
|
|
|
142
142
|
function L() {
|
|
143
143
|
r.value?.resetFields();
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function _(e) {
|
|
146
146
|
return e ? (m(e) ? e : [e]).map((n) => m(n) ? [t.name, ...n] : [t.name, n]) : void 0;
|
|
147
147
|
}
|
|
148
|
-
async function
|
|
149
|
-
return (await r.value?.validateFields(
|
|
148
|
+
async function k(e, l) {
|
|
149
|
+
return (await r.value?.validateFields(_(e), l))?.[t.name];
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function N(e, l) {
|
|
152
152
|
const n = s(i)?.length || 0;
|
|
153
153
|
if (y(t.maxLength) && n >= t.maxLength)
|
|
154
154
|
return;
|
|
@@ -207,15 +207,15 @@ const Se = /* @__PURE__ */ U({
|
|
|
207
207
|
}
|
|
208
208
|
function G(e, l) {
|
|
209
209
|
const n = e === "end" ? i.value.length - 1 : e;
|
|
210
|
-
ie(n,
|
|
210
|
+
ie(n, g.value?.$el, l);
|
|
211
211
|
}
|
|
212
212
|
function H() {
|
|
213
213
|
r.value?.setFieldValue?.(t.name, []);
|
|
214
214
|
}
|
|
215
215
|
return C({
|
|
216
216
|
resetFields: L,
|
|
217
|
-
validateFields:
|
|
218
|
-
add:
|
|
217
|
+
validateFields: k,
|
|
218
|
+
add: N,
|
|
219
219
|
remove: I,
|
|
220
220
|
getRowData: O,
|
|
221
221
|
getRowsData: z,
|
|
@@ -232,19 +232,19 @@ const Se = /* @__PURE__ */ U({
|
|
|
232
232
|
[t.name]: s(i)
|
|
233
233
|
}
|
|
234
234
|
}, {
|
|
235
|
-
default: p(() => [
|
|
236
|
-
name:
|
|
235
|
+
default: p(() => [w(s(h).FormItem, {
|
|
236
|
+
name: e.name,
|
|
237
237
|
"no-style": ""
|
|
238
238
|
}, {
|
|
239
|
-
default: p(() => [
|
|
239
|
+
default: p(() => [w(s(ae), X(s(v)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
|
|
240
240
|
ref_key: "tableRef",
|
|
241
|
-
ref:
|
|
241
|
+
ref: g,
|
|
242
242
|
class: [s(F)(), s(B)],
|
|
243
243
|
columns: s(D),
|
|
244
244
|
"data-source": s(i)
|
|
245
245
|
}), Y({
|
|
246
246
|
_: 2
|
|
247
|
-
}, [Z(s(
|
|
247
|
+
}, [Z(s(v)(T, ["headerCell"]), (n, a) => ({
|
|
248
248
|
name: a,
|
|
249
249
|
fn: p((o) => [M(e.$slots, a, ee(te(o || {})))])
|
|
250
250
|
}))]), 1040, ["class", "columns", "data-source"])]),
|