@aplus-frontend/ui 0.6.3 → 0.6.5
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/ap-form/interface.d.ts +23 -3
- package/es/src/ap-form/item-group/index.vue.mjs +33 -27
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +36 -32
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue.d.ts +4 -2
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +70 -72
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue.d.ts +3 -2
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +16 -24
- package/es/src/ap-form/search-form/hooks/use-sorter.d.ts +7 -0
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +42 -0
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -3
- package/es/src/ap-form/search-form/index.vue.mjs +101 -91
- package/es/src/ap-grid/index.vue.mjs +219 -201
- package/es/src/ap-grid/interface.d.ts +17 -1
- package/es/src/ap-table/ap-table.vue.d.ts +4 -0
- package/es/src/ap-table/ap-table.vue2.mjs +223 -205
- package/es/src/ap-table/constants.d.ts +2 -2
- package/es/src/ap-table/context.d.ts +4 -0
- package/es/src/ap-table/context.mjs +21 -21
- package/es/src/ap-table/interface.d.ts +17 -1
- package/es/src/ap-table/utils.d.ts +2 -2
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -0
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -0
- package/es/src/business/ap-table-modal/index.d.ts +13 -0
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +7 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +107 -109
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +72 -71
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/business/hooks/usePageListApTable.d.ts +4 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-form/interface.d.ts +23 -3
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue.d.ts +4 -2
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue.d.ts +3 -2
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.d.ts +7 -0
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -0
- package/lib/src/ap-form/search-form/index.vue.d.ts +6 -3
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +17 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +2 -2
- package/lib/src/ap-table/context.d.ts +4 -0
- package/lib/src/ap-table/context.js +1 -1
- package/lib/src/ap-table/interface.d.ts +17 -1
- package/lib/src/ap-table/utils.d.ts +2 -2
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -0
- package/lib/src/business/ap-table-modal/index.d.ts +13 -0
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +7 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +4 -0
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +4 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ap-form/ap-form-item.css +4 -0
- package/theme/ap-form/ap-form-item.less +4 -0
- package/theme/ap-form/index.css +4 -0
- package/theme/ap-form/search-form.css +4 -0
- package/theme/ap-grid/index.css +19 -0
- package/theme/ap-grid/index.less +14 -0
- package/theme/ap-table/ap-table.css +4 -0
- package/theme/ap-table-modal/index.css +4 -0
- package/theme/editable-table/index.css +4 -0
- package/theme/index.css +19 -0
|
@@ -176,17 +176,22 @@ export type ApFormSearchFormPopoverFilterProps = {
|
|
|
176
176
|
onSubmit: () => void;
|
|
177
177
|
submitLoading: boolean;
|
|
178
178
|
};
|
|
179
|
+
export type ApFormSearchFormPopoverSorterItem = {
|
|
180
|
+
name: string;
|
|
181
|
+
label: string;
|
|
182
|
+
isHidden?: boolean;
|
|
183
|
+
};
|
|
179
184
|
export type ApFormSearchFormPopoverSorterProps = {
|
|
180
185
|
/**
|
|
181
|
-
*
|
|
186
|
+
* 需要排序的节点对象
|
|
182
187
|
*/
|
|
183
|
-
|
|
188
|
+
items: ApFormSearchFormPopoverSorterItem[];
|
|
184
189
|
/**
|
|
185
190
|
* 点击确定
|
|
186
191
|
* @param sortedChildren
|
|
187
192
|
* @returns
|
|
188
193
|
*/
|
|
189
|
-
onClickConfirm: (sortedChildren:
|
|
194
|
+
onClickConfirm: (sortedChildren: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
190
195
|
/**
|
|
191
196
|
* 当前的children是否已经排序过了
|
|
192
197
|
*/
|
|
@@ -194,6 +199,21 @@ export type ApFormSearchFormPopoverSorterProps = {
|
|
|
194
199
|
};
|
|
195
200
|
export type ApFormSearchFormExpose = {
|
|
196
201
|
apForm: ApFormExpose;
|
|
202
|
+
/**
|
|
203
|
+
* 获取排序结果
|
|
204
|
+
* @returns
|
|
205
|
+
*/
|
|
206
|
+
getSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
207
|
+
/**
|
|
208
|
+
* 设置排序结果
|
|
209
|
+
* @param sortedItems
|
|
210
|
+
* @returns
|
|
211
|
+
*/
|
|
212
|
+
setSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
213
|
+
/**
|
|
214
|
+
* 重设查询表单排序
|
|
215
|
+
*/
|
|
216
|
+
resetSorterItems: () => void;
|
|
197
217
|
};
|
|
198
218
|
export type ApFormSubmitterConfig = {
|
|
199
219
|
submitText?: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col as
|
|
3
|
-
import { pick as
|
|
4
|
-
import { apFormItemColPropKeys as
|
|
5
|
-
import { genRealChildren as
|
|
1
|
+
import { isVNode as _, defineComponent as k, useSlots as w, ref as h, onBeforeUpdate as B, watch as N, unref as a, createVNode as P, mergeProps as d, createBlock as f, openBlock as p, withCtx as R, createElementBlock as S, Fragment as b, renderList as x, resolveDynamicComponent as j } from "vue";
|
|
2
|
+
import { Col as v, Row as F } from "@aplus-frontend/antdv";
|
|
3
|
+
import { pick as D, isBoolean as I, omit as O } from "lodash-unified";
|
|
4
|
+
import { apFormItemColPropKeys as V } from "../constant.mjs";
|
|
5
|
+
import { genRealChildren as $, buildColSpan as A, getStringName as E } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isDef as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
function
|
|
10
|
-
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !
|
|
7
|
+
import { isDef as G } from "../../utils/index.mjs";
|
|
8
|
+
import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
function K(o) {
|
|
10
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !_(o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const W = /* @__PURE__ */ k({
|
|
13
13
|
name: "ApFormItemGroup",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -28,28 +28,34 @@ const M = /* @__PURE__ */ _({
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
setup(o) {
|
|
31
|
-
const
|
|
32
|
-
b:
|
|
33
|
-
} =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
const i = o, m = w(), {
|
|
32
|
+
b: c
|
|
33
|
+
} = H("ap-form-item-group"), s = h([]);
|
|
34
|
+
B(() => {
|
|
35
|
+
s.value = u(m.default());
|
|
36
|
+
}), N(() => m.default(), (r) => {
|
|
37
|
+
s.value = u(r);
|
|
38
|
+
}, {
|
|
39
|
+
immediate: !0
|
|
40
|
+
});
|
|
41
|
+
function u(r) {
|
|
42
|
+
const l = $(r || []);
|
|
43
|
+
return a(l).map((e, g) => {
|
|
44
|
+
const t = e.props, n = D(t, V), y = n != null && n.span ? {} : A(i.countPerRow), C = I(t.hidden) ? !!t.hidden : G(t.hidden);
|
|
39
45
|
return {
|
|
40
|
-
key: `${
|
|
41
|
-
node:
|
|
42
|
-
class:
|
|
43
|
-
}),
|
|
46
|
+
key: `${g}-${E(t.name)}`,
|
|
47
|
+
node: P(v, d(y, n, {
|
|
48
|
+
class: C ? c("col-hidden") : ""
|
|
49
|
+
}), K(e) ? e : {
|
|
44
50
|
default: () => [e]
|
|
45
51
|
})
|
|
46
52
|
};
|
|
47
53
|
});
|
|
48
54
|
}
|
|
49
|
-
return (
|
|
50
|
-
class:
|
|
51
|
-
},
|
|
52
|
-
default:
|
|
55
|
+
return (r, l) => (p(), f(a(F), d({
|
|
56
|
+
class: a(c)()
|
|
57
|
+
}, a(O)(i, ["countPerRow"])), {
|
|
58
|
+
default: R(() => [(p(!0), S(b, null, x(s.value, (e) => (p(), f(j(e.node), {
|
|
53
59
|
key: e.key
|
|
54
60
|
}))), 128))]),
|
|
55
61
|
_: 1
|
|
@@ -57,5 +63,5 @@ const M = /* @__PURE__ */ _({
|
|
|
57
63
|
}
|
|
58
64
|
});
|
|
59
65
|
export {
|
|
60
|
-
|
|
66
|
+
W as default
|
|
61
67
|
};
|
|
@@ -53,8 +53,8 @@ declare function __VLS_template(): {
|
|
|
53
53
|
readonly bordered?: boolean | undefined;
|
|
54
54
|
readonly suffix?: any;
|
|
55
55
|
readonly focused?: boolean | undefined;
|
|
56
|
-
readonly placeholder?: string | number | undefined;
|
|
57
56
|
readonly handleReset?: MouseEventHandler | undefined;
|
|
57
|
+
readonly placeholder?: string | number | undefined;
|
|
58
58
|
readonly defaultValue?: string | number | undefined;
|
|
59
59
|
readonly id?: string | undefined;
|
|
60
60
|
readonly autocomplete?: string | undefined;
|
|
@@ -209,8 +209,8 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
|
|
|
209
209
|
readonly bordered?: boolean | undefined;
|
|
210
210
|
readonly suffix?: any;
|
|
211
211
|
readonly focused?: boolean | undefined;
|
|
212
|
-
readonly placeholder?: string | number | undefined;
|
|
213
212
|
readonly handleReset?: MouseEventHandler | undefined;
|
|
213
|
+
readonly placeholder?: string | number | undefined;
|
|
214
214
|
readonly defaultValue?: string | number | undefined;
|
|
215
215
|
readonly id?: string | undefined;
|
|
216
216
|
readonly autocomplete?: string | undefined;
|
|
@@ -54,8 +54,8 @@ declare function __VLS_template(): {
|
|
|
54
54
|
readonly bordered?: boolean | undefined;
|
|
55
55
|
readonly suffix?: any;
|
|
56
56
|
readonly focused?: boolean | undefined;
|
|
57
|
-
readonly placeholder?: string | number | undefined;
|
|
58
57
|
readonly handleReset?: MouseEventHandler | undefined;
|
|
58
|
+
readonly placeholder?: string | number | undefined;
|
|
59
59
|
readonly defaultValue?: string | number | undefined;
|
|
60
60
|
readonly id?: string | undefined;
|
|
61
61
|
readonly autocomplete?: string | undefined;
|
|
@@ -216,8 +216,8 @@ declare const __VLS_component: DefineComponent<ApFormItemTextPasswordProps, {
|
|
|
216
216
|
readonly bordered?: boolean | undefined;
|
|
217
217
|
readonly suffix?: any;
|
|
218
218
|
readonly focused?: boolean | undefined;
|
|
219
|
-
readonly placeholder?: string | number | undefined;
|
|
220
219
|
readonly handleReset?: MouseEventHandler | undefined;
|
|
220
|
+
readonly placeholder?: string | number | undefined;
|
|
221
221
|
readonly defaultValue?: string | number | undefined;
|
|
222
222
|
readonly id?: string | undefined;
|
|
223
223
|
readonly autocomplete?: string | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { IconApFilterOutlined as
|
|
1
|
+
import { defineComponent as C, ref as d, createBlock as m, openBlock as i, unref as e, withCtx as o, createVNode as t, normalizeClass as s, createElementVNode as g, createElementBlock as F, Fragment as _, renderList as B, resolveDynamicComponent as x, createTextVNode as v, toDisplayString as y } from "vue";
|
|
2
|
+
import { Popover as h, Tooltip as L, Button as u, Row as N, Col as S, Divider as w, Flex as D } from "@aplus-frontend/antdv";
|
|
3
|
+
import { IconApFilterOutlined as P } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../../config-provider/index.mjs";
|
|
5
5
|
import { useNamespace as R } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
6
6
|
import { useLocale as T } from "../../../config-provider/hooks/use-locale.mjs";
|
|
7
|
-
const
|
|
7
|
+
const U = /* @__PURE__ */ C({
|
|
8
8
|
name: "ApFormSearchFormPopoverFilter",
|
|
9
9
|
__name: "popover-filter",
|
|
10
10
|
props: {
|
|
@@ -13,30 +13,34 @@ const O = /* @__PURE__ */ b({
|
|
|
13
13
|
submitLoading: { type: Boolean }
|
|
14
14
|
},
|
|
15
15
|
setup(V) {
|
|
16
|
-
const k = d(), { e:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const k = d(), { e: a, b: f } = R("ap-form-search-form"), { t: c } = T(), l = d(!1);
|
|
17
|
+
function b(r) {
|
|
18
|
+
return (r == null ? void 0 : r.closest(".ant-form")) || document.body;
|
|
19
|
+
}
|
|
20
|
+
return (r, p) => (i(), m(e(h), {
|
|
21
|
+
open: l.value,
|
|
22
|
+
"onUpdate:open": p[1] || (p[1] = (n) => l.value = n),
|
|
23
|
+
"overlay-class-name": e(a)("popover"),
|
|
21
24
|
trigger: "click",
|
|
22
25
|
placement: "bottom",
|
|
23
26
|
mask: "",
|
|
24
27
|
"mask-style": { backgroundColor: "transparent" },
|
|
25
|
-
"
|
|
28
|
+
"get-popup-container": b,
|
|
29
|
+
"force-render": !0
|
|
26
30
|
}, {
|
|
27
31
|
content: o(() => [
|
|
28
32
|
g("div", {
|
|
29
|
-
class:
|
|
33
|
+
class: s([e(a)("popover-content")]),
|
|
30
34
|
style: { paddingBottom: "4px", width: "825px" }
|
|
31
35
|
}, [
|
|
32
|
-
t(e(
|
|
36
|
+
t(e(N), { gutter: 8 }, {
|
|
33
37
|
default: o(() => [
|
|
34
|
-
(
|
|
35
|
-
key:
|
|
38
|
+
(i(!0), F(_, null, B(r.config, (n) => (i(), m(e(S), {
|
|
39
|
+
key: n.key,
|
|
36
40
|
span: 8
|
|
37
41
|
}, {
|
|
38
42
|
default: o(() => [
|
|
39
|
-
(
|
|
43
|
+
(i(), m(x(n.node)))
|
|
40
44
|
]),
|
|
41
45
|
_: 2
|
|
42
46
|
}, 1024))), 128))
|
|
@@ -44,28 +48,28 @@ const O = /* @__PURE__ */ b({
|
|
|
44
48
|
_: 1
|
|
45
49
|
})
|
|
46
50
|
], 2),
|
|
47
|
-
t(e(
|
|
51
|
+
t(e(w), { style: { margin: "0" } }),
|
|
48
52
|
g("div", {
|
|
49
|
-
class:
|
|
53
|
+
class: s(e(a)("popover-footer"))
|
|
50
54
|
}, [
|
|
51
|
-
t(e(
|
|
55
|
+
t(e(D), { justify: "end" }, {
|
|
52
56
|
default: o(() => [
|
|
53
|
-
t(e(
|
|
54
|
-
onClick:
|
|
57
|
+
t(e(u), {
|
|
58
|
+
onClick: p[0] || (p[0] = (n) => l.value = !1)
|
|
55
59
|
}, {
|
|
56
60
|
default: o(() => [
|
|
57
|
-
v(y(e(
|
|
61
|
+
v(y(e(c)("ap.common.cancelText")), 1)
|
|
58
62
|
]),
|
|
59
63
|
_: 1
|
|
60
64
|
}),
|
|
61
|
-
t(e(
|
|
62
|
-
class:
|
|
65
|
+
t(e(u), {
|
|
66
|
+
class: s(e(a)("popover-footer-confirm-btn")),
|
|
63
67
|
type: "primary",
|
|
64
|
-
loading:
|
|
65
|
-
onClick:
|
|
68
|
+
loading: r.submitLoading,
|
|
69
|
+
onClick: r.onSubmit
|
|
66
70
|
}, {
|
|
67
71
|
default: o(() => [
|
|
68
|
-
v(y(e(
|
|
72
|
+
v(y(e(c)("ap.apForm.search.search")), 1)
|
|
69
73
|
]),
|
|
70
74
|
_: 1
|
|
71
75
|
}, 8, ["class", "loading", "onClick"])
|
|
@@ -75,18 +79,18 @@ const O = /* @__PURE__ */ b({
|
|
|
75
79
|
], 2)
|
|
76
80
|
]),
|
|
77
81
|
default: o(() => [
|
|
78
|
-
t(e(
|
|
79
|
-
title: e(
|
|
82
|
+
t(e(L), {
|
|
83
|
+
title: e(c)("ap.apForm.search.moreFilter"),
|
|
80
84
|
placement: "top"
|
|
81
85
|
}, {
|
|
82
86
|
default: o(() => [
|
|
83
|
-
t(e(
|
|
87
|
+
t(e(u), {
|
|
84
88
|
ref_key: "triggerBtnRef",
|
|
85
89
|
ref: k,
|
|
86
|
-
class:
|
|
90
|
+
class: s([e(f)("trigger-btn"), { [e(f)("trigger-btn-active")]: l.value }])
|
|
87
91
|
}, {
|
|
88
92
|
icon: o(() => [
|
|
89
|
-
t(e(
|
|
93
|
+
t(e(P), { size: 14 })
|
|
90
94
|
]),
|
|
91
95
|
_: 1
|
|
92
96
|
}, 8, ["class"])
|
|
@@ -99,5 +103,5 @@ const O = /* @__PURE__ */ b({
|
|
|
99
103
|
}
|
|
100
104
|
});
|
|
101
105
|
export {
|
|
102
|
-
|
|
106
|
+
U as default
|
|
103
107
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ApFormSearchFormPopoverSorterProps } from '../../../interface';
|
|
1
|
+
import { ApFormSearchFormPopoverSorterItem, ApFormSearchFormPopoverSorterProps } from '../../../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<ApFormSearchFormPopoverSorterProps, {
|
|
3
|
+
declare const _default: DefineComponent<ApFormSearchFormPopoverSorterProps, {
|
|
4
|
+
getCachedList: () => ApFormSearchFormPopoverSorterItem[];
|
|
5
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormSearchFormPopoverSorterProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
4
6
|
export default _default;
|
|
@@ -1,49 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { IconApLayoutOutlined as
|
|
1
|
+
import { defineComponent as D, ref as y, watch as k, unref as e, createBlock as L, openBlock as P, withCtx as r, createVNode as t, normalizeClass as o, createElementVNode as n, toDisplayString as m, createTextVNode as b } from "vue";
|
|
2
|
+
import { Popover as S, Tooltip as V, Button as g, Flex as _, Divider as j } from "@aplus-frontend/antdv";
|
|
3
|
+
import { IconApLayoutOutlined as z } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import
|
|
5
|
+
import A from "vuedraggable";
|
|
6
6
|
import "./sortable-item.vue.mjs";
|
|
7
|
-
import { getStringName as L } from "../../../item-group/helper.mjs";
|
|
8
7
|
import { useNamespace as F } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
9
8
|
import { useLocale as R } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
10
9
|
import $ from "./sortable-item.vue2.mjs";
|
|
11
|
-
const
|
|
10
|
+
const M = /* @__PURE__ */ D({
|
|
12
11
|
name: "ApFormSearchFormPopoverSorter",
|
|
13
12
|
__name: "index",
|
|
14
13
|
props: {
|
|
15
|
-
|
|
14
|
+
items: {},
|
|
16
15
|
onClickConfirm: { type: Function },
|
|
17
16
|
sorted: { type: Boolean }
|
|
18
17
|
},
|
|
19
|
-
setup(w) {
|
|
20
|
-
const l =
|
|
21
|
-
let v = [...l.
|
|
18
|
+
setup(x, { expose: w }) {
|
|
19
|
+
const l = x, i = y(l.items);
|
|
20
|
+
let v = [...l.items], h = [...l.items];
|
|
22
21
|
k(
|
|
23
|
-
() => l.
|
|
24
|
-
(
|
|
25
|
-
|
|
22
|
+
() => l.items,
|
|
23
|
+
(a) => {
|
|
24
|
+
i.value = a, v = a, l.sorted || (h = a);
|
|
26
25
|
}
|
|
27
26
|
);
|
|
28
|
-
const { e: f, b:
|
|
29
|
-
function
|
|
30
|
-
return
|
|
27
|
+
const { e: f, b: C } = F("ap-form-search-form"), { b: s } = F("search-form-sorter"), { t: c } = R(), p = y(!1);
|
|
28
|
+
function B(a) {
|
|
29
|
+
return a.closest(".ant-form") || document.body;
|
|
31
30
|
}
|
|
32
|
-
function
|
|
33
|
-
p.value = !1, v = [...e(
|
|
31
|
+
function T() {
|
|
32
|
+
p.value = !1, v = [...e(i)], l.onClickConfirm(e(i));
|
|
34
33
|
}
|
|
35
34
|
function N() {
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
function T(t) {
|
|
39
|
-
return L(t.props.name);
|
|
35
|
+
i.value = [...h];
|
|
40
36
|
}
|
|
41
37
|
return k(
|
|
42
38
|
() => p.value,
|
|
43
|
-
(
|
|
44
|
-
|
|
39
|
+
(a) => {
|
|
40
|
+
a && (i.value = [...v]);
|
|
45
41
|
}
|
|
46
|
-
), (
|
|
42
|
+
), w({
|
|
43
|
+
getCachedList: () => h
|
|
44
|
+
}), (a, u) => (P(), L(e(S), {
|
|
47
45
|
open: p.value,
|
|
48
46
|
"onUpdate:open": u[1] || (u[1] = (d) => p.value = d),
|
|
49
47
|
"overlay-class-name": e(f)("popover"),
|
|
@@ -51,70 +49,70 @@ const W = /* @__PURE__ */ S({
|
|
|
51
49
|
placement: "bottom",
|
|
52
50
|
mask: "",
|
|
53
51
|
"mask-style": { backgroundColor: "transparent" },
|
|
54
|
-
"get-popup-container":
|
|
52
|
+
"get-popup-container": B
|
|
55
53
|
}, {
|
|
56
|
-
content:
|
|
57
|
-
|
|
58
|
-
class:
|
|
54
|
+
content: r(() => [
|
|
55
|
+
n("div", {
|
|
56
|
+
class: o(e(s)("header"))
|
|
59
57
|
}, [
|
|
60
|
-
|
|
61
|
-
class:
|
|
62
|
-
}, m(e(
|
|
63
|
-
|
|
58
|
+
n("span", {
|
|
59
|
+
class: o(e(s)("header-title"))
|
|
60
|
+
}, m(e(c)("ap.apForm.search.sorterTitle")), 3),
|
|
61
|
+
t(e(_), {
|
|
64
62
|
justify: "space-between",
|
|
65
63
|
align: "center"
|
|
66
64
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
69
|
-
class:
|
|
70
|
-
}, m(e(
|
|
71
|
-
|
|
72
|
-
class:
|
|
65
|
+
default: r(() => [
|
|
66
|
+
n("span", {
|
|
67
|
+
class: o(e(s)("header-desc"))
|
|
68
|
+
}, m(e(c)("ap.apForm.search.sorterDesc")), 3),
|
|
69
|
+
n("div", {
|
|
70
|
+
class: o(e(s)("header-action-wrapper")),
|
|
73
71
|
onClick: N
|
|
74
72
|
}, [
|
|
75
|
-
|
|
76
|
-
class:
|
|
77
|
-
}, m(e(
|
|
73
|
+
n("span", {
|
|
74
|
+
class: o(e(s)("header-reset-btn"))
|
|
75
|
+
}, m(e(c)("ap.apForm.search.sorterReset")), 3)
|
|
78
76
|
], 2)
|
|
79
77
|
]),
|
|
80
78
|
_: 1
|
|
81
79
|
})
|
|
82
80
|
], 2),
|
|
83
|
-
|
|
84
|
-
class:
|
|
81
|
+
n("div", {
|
|
82
|
+
class: o([e(f)("popover-content"), e(s)("content")])
|
|
85
83
|
}, [
|
|
86
|
-
|
|
87
|
-
list:
|
|
88
|
-
class:
|
|
89
|
-
"item-key":
|
|
84
|
+
t(e(A), {
|
|
85
|
+
list: i.value,
|
|
86
|
+
class: o(e(s)("sorter-wrapper")),
|
|
87
|
+
"item-key": "name"
|
|
90
88
|
}, {
|
|
91
|
-
item:
|
|
92
|
-
|
|
89
|
+
item: r(({ element: d }) => [
|
|
90
|
+
t($, { item: d }, null, 8, ["item"])
|
|
93
91
|
]),
|
|
94
92
|
_: 1
|
|
95
93
|
}, 8, ["list", "class"])
|
|
96
94
|
], 2),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class:
|
|
95
|
+
t(e(j), { style: { margin: "0" } }),
|
|
96
|
+
n("div", {
|
|
97
|
+
class: o(e(f)("popover-footer"))
|
|
100
98
|
}, [
|
|
101
|
-
|
|
102
|
-
default:
|
|
103
|
-
|
|
99
|
+
t(e(_), { justify: "end" }, {
|
|
100
|
+
default: r(() => [
|
|
101
|
+
t(e(g), {
|
|
104
102
|
onClick: u[0] || (u[0] = (d) => p.value = !1)
|
|
105
103
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
b(m(e(
|
|
104
|
+
default: r(() => [
|
|
105
|
+
b(m(e(c)("ap.common.cancelText")), 1)
|
|
108
106
|
]),
|
|
109
107
|
_: 1
|
|
110
108
|
}),
|
|
111
|
-
|
|
112
|
-
class:
|
|
109
|
+
t(e(g), {
|
|
110
|
+
class: o(e(f)("popover-footer-confirm-btn")),
|
|
113
111
|
type: "primary",
|
|
114
|
-
onClick:
|
|
112
|
+
onClick: T
|
|
115
113
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
b(m(e(
|
|
114
|
+
default: r(() => [
|
|
115
|
+
b(m(e(c)("ap.apForm.search.sorterConfirmBtn")), 1)
|
|
118
116
|
]),
|
|
119
117
|
_: 1
|
|
120
118
|
}, 8, ["class"])
|
|
@@ -123,17 +121,17 @@ const W = /* @__PURE__ */ S({
|
|
|
123
121
|
})
|
|
124
122
|
], 2)
|
|
125
123
|
]),
|
|
126
|
-
default:
|
|
127
|
-
|
|
128
|
-
title: e(
|
|
124
|
+
default: r(() => [
|
|
125
|
+
t(e(V), {
|
|
126
|
+
title: e(c)("ap.apForm.search.sorterTitle"),
|
|
129
127
|
placement: "top"
|
|
130
128
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
|
|
133
|
-
class:
|
|
129
|
+
default: r(() => [
|
|
130
|
+
t(e(g), {
|
|
131
|
+
class: o([e(C)("trigger-btn"), { [e(C)("trigger-btn-active")]: p.value }])
|
|
134
132
|
}, {
|
|
135
|
-
icon:
|
|
136
|
-
|
|
133
|
+
icon: r(() => [
|
|
134
|
+
t(e(z), { size: 14 })
|
|
137
135
|
]),
|
|
138
136
|
_: 1
|
|
139
137
|
}, 8, ["class"])
|
|
@@ -146,5 +144,5 @@ const W = /* @__PURE__ */ S({
|
|
|
146
144
|
}
|
|
147
145
|
});
|
|
148
146
|
export {
|
|
149
|
-
|
|
147
|
+
M as default
|
|
150
148
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApFormSearchFormPopoverSorterItem } from '../../../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
3
|
type __VLS_Props = {
|
|
3
|
-
item:
|
|
4
|
+
item: ApFormSearchFormPopoverSorterItem;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
7
|
export default _default;
|
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { HolderOutlined as
|
|
1
|
+
import { defineComponent as i, createElementBlock as l, openBlock as m, normalizeClass as o, unref as e, createElementVNode as s, createVNode as a, toDisplayString as n } from "vue";
|
|
2
|
+
import { HolderOutlined as c } from "@ant-design/icons-vue";
|
|
3
3
|
import "../../../../config-provider/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { useNamespace as b } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
-
const x = ["title"], C = /* @__PURE__ */ c({
|
|
4
|
+
import { useNamespace as p } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const d = ["title"], N = /* @__PURE__ */ i({
|
|
8
6
|
name: "ApFormSearchFormPopoverSorterItem",
|
|
9
7
|
__name: "sortable-item",
|
|
10
8
|
props: {
|
|
11
9
|
item: {}
|
|
12
10
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}), p = n(() => {
|
|
18
|
-
const e = s.item.props;
|
|
19
|
-
return _(e.hidden) ? !!e.hidden : v(e.hidden);
|
|
20
|
-
}), { b: o } = b("search-form-sorter");
|
|
21
|
-
return (e, B) => (d(), a("div", {
|
|
22
|
-
class: r([t(o)("sorter-item"), { [t(o)("sorter-item--hidden")]: p.value }])
|
|
11
|
+
setup(f) {
|
|
12
|
+
const { b: t } = p("search-form-sorter");
|
|
13
|
+
return (r, u) => (m(), l("div", {
|
|
14
|
+
class: o([e(t)("sorter-item"), { [e(t)("sorter-item--hidden")]: r.item.isHidden }])
|
|
23
15
|
}, [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class:
|
|
16
|
+
s("div", null, [
|
|
17
|
+
a(e(c), {
|
|
18
|
+
class: o(e(t)("sorter-item-holder")),
|
|
27
19
|
style: { "font-size": "16px", color: "#abb7cc" }
|
|
28
20
|
}, null, 8, ["class"]),
|
|
29
|
-
|
|
30
|
-
class:
|
|
31
|
-
title:
|
|
32
|
-
},
|
|
21
|
+
s("span", {
|
|
22
|
+
class: o(e(t)("sorter-item-text")),
|
|
23
|
+
title: r.item.label
|
|
24
|
+
}, n(r.item.label), 11, d)
|
|
33
25
|
])
|
|
34
26
|
], 2));
|
|
35
27
|
}
|
|
36
28
|
});
|
|
37
29
|
export {
|
|
38
|
-
|
|
30
|
+
N as default
|
|
39
31
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShallowRef, VNode, ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ApFormSearchFormPopoverSorterItem } from '../../interface';
|
|
3
|
+
export declare const useSorter: (children: ShallowRef<VNode[]>) => {
|
|
4
|
+
items: ComputedRef<ApFormSearchFormPopoverSorterItem[]>;
|
|
5
|
+
handleClickConfirm: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
6
|
+
sorted: Ref<boolean, boolean>;
|
|
7
|
+
};
|