@aplus-frontend/ui 0.1.29 → 0.1.31
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 +154 -149
- package/es/src/ap-button/ap-button.vue.d.ts +48 -0
- package/es/src/ap-button/ap-button.vue.mjs +116 -0
- package/es/src/ap-button/ap-button.vue2.mjs +4 -0
- package/es/src/ap-button/index.css +6 -0
- package/es/src/ap-button/index.d.ts +3 -0
- package/es/src/ap-button/index.mjs +2 -0
- package/es/src/ap-button/interface.d.ts +7 -0
- package/es/src/ap-button/interface.mjs +1 -0
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/dependency/index.vue.d.ts +28 -0
- package/es/src/ap-form/dependency/index.vue.mjs +37 -0
- package/es/src/ap-form/dependency/index.vue2.mjs +4 -0
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +10 -6
- package/es/src/ap-form/interface.d.ts +3 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-table/ap-table.vue.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +84 -89
- package/es/src/ap-table/utils.mjs +42 -42
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +52 -50
- package/es/src/business/hooks/useTableRefresh.d.ts +1 -1
- package/es/src/business/hooks/useTableRefresh.mjs +1 -1
- package/es/src/editable-table/form-item.vue.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.mjs +41 -41
- package/es/src/editable-table/index.vue.d.ts +1 -1
- package/es/src/editable-table/index.vue.mjs +29 -29
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +256 -250
- package/es/src/theme/ap-button/ap-button.css +6 -0
- package/es/src/work-order-modal/index.mjs +4 -3
- package/es/src/work-order-modal/interfaces.d.ts +3 -0
- package/es/src/work-order-modal/interfaces.mjs +6 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-button.vue.d.ts +48 -0
- package/lib/src/ap-button/ap-button.vue.js +1 -0
- package/lib/src/ap-button/ap-button.vue2.js +1 -0
- package/lib/src/ap-button/index.css +6 -0
- package/lib/src/ap-button/index.d.ts +3 -0
- package/lib/src/ap-button/index.js +1 -0
- package/lib/src/ap-button/interface.d.ts +7 -0
- package/lib/src/ap-button/interface.js +1 -0
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/dependency/index.vue.d.ts +28 -0
- package/lib/src/ap-form/dependency/index.vue.js +1 -0
- package/lib/src/ap-form/dependency/index.vue2.js +1 -0
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +3 -0
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +1 -1
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-button/ap-button.css +6 -0
- package/lib/src/work-order-modal/index.js +1 -1
- package/lib/src/work-order-modal/interfaces.d.ts +3 -0
- package/lib/src/work-order-modal/interfaces.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ApFormDependencyProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
type ApFormDependencySlots = {
|
|
4
|
+
default(values: Record<string, any>): any;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
slots: Readonly<ApFormDependencySlots> & ApFormDependencySlots;
|
|
8
|
+
refs: {};
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<ApFormDependencyProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApFormDependencyProps>>>, {}, {}>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToOption<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as p, ref as m, watchEffect as y, unref as _, renderSlot as g } from "vue";
|
|
2
|
+
import { useInjectForm as h } from "../context.mjs";
|
|
3
|
+
import { isArray as V, isNumber as d, cloneDeep as b } from "lodash-unified";
|
|
4
|
+
const A = /* @__PURE__ */ p({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
nameList: {}
|
|
8
|
+
},
|
|
9
|
+
setup(u) {
|
|
10
|
+
function a(t, s) {
|
|
11
|
+
return V(s) ? s.reduce((o, e) => o == null ? void 0 : o[e], t) : t == null ? void 0 : t[s];
|
|
12
|
+
}
|
|
13
|
+
const c = u, {
|
|
14
|
+
model: i
|
|
15
|
+
} = h(), f = m({});
|
|
16
|
+
function l(t, s, o) {
|
|
17
|
+
let e = s;
|
|
18
|
+
for (let r = 0; r < t.length; r++) {
|
|
19
|
+
const n = t[r];
|
|
20
|
+
r === t.length - 1 ? e[n] = o : (d(n) ? (Array.isArray(e) || (e[n] = []), e[n] || (e[n] = {})) : (typeof e[n] != "object" || e[n] === null) && (e[n] = {}), e = e[n]);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return y(() => {
|
|
24
|
+
const t = b(f.value);
|
|
25
|
+
for (const s of c.nameList) {
|
|
26
|
+
const o = [s].flat(1), e = a(_(i), o);
|
|
27
|
+
l(o, t, e);
|
|
28
|
+
}
|
|
29
|
+
f.value = t;
|
|
30
|
+
}), (t, s) => g(t.$slots, "default", {
|
|
31
|
+
values: f.value
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
A as default
|
|
37
|
+
};
|
|
@@ -5,6 +5,7 @@ import { default as ApFormList } from './ap-form-list.vue';
|
|
|
5
5
|
import { default as ApFormSearchForm } from './search-form/index.vue';
|
|
6
6
|
import { default as ApFormModalForm } from './modal-form/index.vue';
|
|
7
7
|
import { default as useWatch } from './hooks/use-watch';
|
|
8
|
+
import { default as ApFormDependency } from './dependency/index.vue';
|
|
8
9
|
type ApFormMixedProps = typeof _ApForm & {
|
|
9
10
|
FormItem: typeof ApFormItem;
|
|
10
11
|
FormItemGroup: typeof ApFormItemGroup;
|
|
@@ -12,8 +13,9 @@ type ApFormMixedProps = typeof _ApForm & {
|
|
|
12
13
|
SearchForm: typeof ApFormSearchForm;
|
|
13
14
|
ModalForm: typeof ApFormModalForm;
|
|
14
15
|
useWatch: typeof useWatch;
|
|
16
|
+
Dependency: typeof ApFormDependency;
|
|
15
17
|
};
|
|
16
18
|
declare const ApForm: ApFormMixedProps;
|
|
17
19
|
export * from './items';
|
|
18
20
|
export * from './interface';
|
|
19
|
-
export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm };
|
|
21
|
+
export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm, ApFormDependency };
|
package/es/src/ap-form/index.mjs
CHANGED
|
@@ -5,25 +5,29 @@ import "./ap-form-list.vue2.mjs";
|
|
|
5
5
|
import "./search-form/index.vue2.mjs";
|
|
6
6
|
import "./modal-form/index.vue2.mjs";
|
|
7
7
|
import o from "./hooks/use-watch.mjs";
|
|
8
|
+
import "./dependency/index.vue2.mjs";
|
|
8
9
|
import "./items/index.mjs";
|
|
9
10
|
import "./interface.mjs";
|
|
10
11
|
import r from "./ap-form.vue2.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
12
|
+
import p from "./ap-form-item.vue.mjs";
|
|
13
|
+
import t from "./ap-form-item-group/index.vue.mjs";
|
|
13
14
|
import i from "./ap-form-list.vue.mjs";
|
|
14
15
|
import a from "./search-form/index.vue.mjs";
|
|
15
16
|
import s from "./modal-form/index.vue.mjs";
|
|
17
|
+
import e from "./dependency/index.vue.mjs";
|
|
16
18
|
const m = r;
|
|
17
|
-
m.FormItem =
|
|
18
|
-
m.FormItemGroup =
|
|
19
|
+
m.FormItem = p;
|
|
20
|
+
m.FormItemGroup = t;
|
|
19
21
|
m.FormList = i;
|
|
20
22
|
m.SearchForm = a;
|
|
21
23
|
m.ModalForm = s;
|
|
22
24
|
m.useWatch = o;
|
|
25
|
+
m.Dependency = e;
|
|
23
26
|
export {
|
|
24
27
|
m as ApForm,
|
|
25
|
-
|
|
26
|
-
p as
|
|
28
|
+
e as ApFormDependency,
|
|
29
|
+
p as ApFormItem,
|
|
30
|
+
t as ApFormItemGroup,
|
|
27
31
|
i as ApFormList,
|
|
28
32
|
s as ApFormModalForm,
|
|
29
33
|
a as ApFormSearchForm
|
|
@@ -428,7 +428,7 @@ declare function __VLS_template(): {
|
|
|
428
428
|
};
|
|
429
429
|
}>>, {
|
|
430
430
|
resetFields: () => Promise<void>;
|
|
431
|
-
clearValidate: (name?: NamePath) => void;
|
|
431
|
+
clearValidate: (name?: NamePath | NamePath[]) => void;
|
|
432
432
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
|
|
433
433
|
[key: string]: any;
|
|
434
434
|
}> | undefined;
|
|
@@ -620,7 +620,7 @@ declare function __VLS_template(): {
|
|
|
620
620
|
};
|
|
621
621
|
}>>, "validate" | "setFieldsValue" | "resetFields" | "getFieldsValue" | "clearValidate" | "validateFields" | "scrollToField" | "setFieldValue" | "getInternalInstance" | "registerWatch"> & ShallowUnwrapRef<{
|
|
622
622
|
resetFields: () => Promise<void>;
|
|
623
|
-
clearValidate: (name?: NamePath) => void;
|
|
623
|
+
clearValidate: (name?: NamePath | NamePath[]) => void;
|
|
624
624
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
|
|
625
625
|
[key: string]: any;
|
|
626
626
|
}> | undefined;
|
|
@@ -423,7 +423,7 @@ declare function __VLS_template(): {
|
|
|
423
423
|
};
|
|
424
424
|
}>>, {
|
|
425
425
|
resetFields: () => Promise<void>;
|
|
426
|
-
clearValidate: (name?: NamePath) => void;
|
|
426
|
+
clearValidate: (name?: NamePath | NamePath[]) => void;
|
|
427
427
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
|
|
428
428
|
[key: string]: any;
|
|
429
429
|
}> | undefined;
|
|
@@ -615,7 +615,7 @@ declare function __VLS_template(): {
|
|
|
615
615
|
};
|
|
616
616
|
}>>, "validate" | "setFieldsValue" | "resetFields" | "getFieldsValue" | "clearValidate" | "validateFields" | "scrollToField" | "setFieldValue" | "getInternalInstance" | "registerWatch"> & ShallowUnwrapRef<{
|
|
617
617
|
resetFields: () => Promise<void>;
|
|
618
|
-
clearValidate: (name?: NamePath) => void;
|
|
618
|
+
clearValidate: (name?: NamePath | NamePath[]) => void;
|
|
619
619
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
|
|
620
620
|
[key: string]: any;
|
|
621
621
|
}> | undefined;
|
|
@@ -415,7 +415,7 @@ const Ca = /* @__PURE__ */ Re({
|
|
|
415
415
|
records: W.value.dataSource
|
|
416
416
|
})]),
|
|
417
417
|
_: 2
|
|
418
|
-
}, [Q(l(_)(S, ["title", "searchFormExtra", "headerCell"]), (t, r) => ({
|
|
418
|
+
}, [Q(l(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, r) => ({
|
|
419
419
|
name: r,
|
|
420
420
|
fn: b((d) => [w(e.$slots, r, Be(xe(d || {})))])
|
|
421
421
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Flex as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as A, ref as L, unref as n, computed as O, watch as $, openBlock as c, createElementBlock as y, normalizeClass as d, createVNode as m, withCtx as v, createElementVNode as g, toDisplayString as k, createTextVNode as q, createBlock as b, createCommentVNode as p } from "vue";
|
|
2
|
+
import { Flex as G, Button as H, Divider as J } from "ant-design-vue";
|
|
3
|
+
import N from "vuedraggable";
|
|
4
4
|
import "../sortable/index.vue.mjs";
|
|
5
5
|
import "../../../../config-provider/index.mjs";
|
|
6
6
|
import "../../style/setting/sorter.css";
|
|
7
|
-
import { useProvideSorterMethods as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { useLocale as
|
|
7
|
+
import { useProvideSorterMethods as K } from "./context.mjs";
|
|
8
|
+
import { useNamespace as P } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as Q } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import R from "../sortable/index.vue2.mjs";
|
|
11
|
-
const
|
|
11
|
+
const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, ce = /* @__PURE__ */ A({
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
14
|
value: {},
|
|
@@ -16,11 +16,11 @@ const Y = { key: 0 }, Z = { key: 1 }, ee = { key: 2 }, fe = /* @__PURE__ */ O({
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:value"],
|
|
18
18
|
setup(V, { emit: B }) {
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const i = L([]), s = L([]), r = L([]), { b: u } = P("column-setting-sorter"), { t: h } = Q(), x = V, S = B;
|
|
20
|
+
K({
|
|
21
21
|
fixedToLeft: I,
|
|
22
|
-
fixedToRight:
|
|
23
|
-
unFixed:
|
|
22
|
+
fixedToRight: M,
|
|
23
|
+
unFixed: U
|
|
24
24
|
});
|
|
25
25
|
function F(e, t) {
|
|
26
26
|
const o = t[0].findIndex(
|
|
@@ -35,8 +35,8 @@ const Y = { key: 0 }, Z = { key: 1 }, ee = { key: 2 }, fe = /* @__PURE__ */ O({
|
|
|
35
35
|
t[1].splice(a, 1);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const o = [...n(
|
|
38
|
+
function _(e, t) {
|
|
39
|
+
const o = [...n(i.value)], a = [...n(r.value)], l = [...n(s.value)], w = {
|
|
40
40
|
left: {
|
|
41
41
|
target: o,
|
|
42
42
|
search: [l, a]
|
|
@@ -50,154 +50,149 @@ const Y = { key: 0 }, Z = { key: 1 }, ee = { key: 2 }, fe = /* @__PURE__ */ O({
|
|
|
50
50
|
search: [o, a]
|
|
51
51
|
}
|
|
52
52
|
}[t];
|
|
53
|
-
return t === "right" ?
|
|
53
|
+
return t === "right" ? w.target.unshift(e) : w.target.push(e), F(
|
|
54
54
|
e,
|
|
55
|
-
|
|
55
|
+
w.search
|
|
56
56
|
), [...o, ...l, ...a];
|
|
57
57
|
}
|
|
58
58
|
function I(e) {
|
|
59
|
-
const t =
|
|
60
|
-
|
|
59
|
+
const t = _(e, "left");
|
|
60
|
+
f(t);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const t =
|
|
64
|
-
|
|
62
|
+
function M(e) {
|
|
63
|
+
const t = _(e, "right");
|
|
64
|
+
f(t);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const t =
|
|
68
|
-
|
|
66
|
+
function U(e) {
|
|
67
|
+
const t = _(e, "normal");
|
|
68
|
+
f(t);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function C(e) {
|
|
71
71
|
var t;
|
|
72
72
|
return (t = e.children) != null && t.length ? e.children.some((o) => o.show) : e.show;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function T(e, t) {
|
|
75
75
|
e.value ? e.value.push(t) : e.value = [t];
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const z = O(() => {
|
|
78
78
|
let e = 0;
|
|
79
79
|
function t(o) {
|
|
80
80
|
var a;
|
|
81
81
|
for (const l of o)
|
|
82
82
|
(a = l.children) != null && a.length ? t(l.children) : l.show && (e += 1);
|
|
83
83
|
}
|
|
84
|
-
return t(
|
|
84
|
+
return t(x.value), e;
|
|
85
85
|
});
|
|
86
|
+
function D(e) {
|
|
87
|
+
f([...e, ...n(s), ...n(r)]);
|
|
88
|
+
}
|
|
86
89
|
function E(e) {
|
|
87
|
-
|
|
90
|
+
f([...n(i), ...e, ...n(r)]);
|
|
88
91
|
}
|
|
89
92
|
function j(e) {
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
function A(e) {
|
|
93
|
-
m([...n(u), ...n(r), ...e]);
|
|
93
|
+
f([...n(i), ...n(s), ...e]);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function f(e) {
|
|
96
96
|
S("update:value", e);
|
|
97
97
|
}
|
|
98
|
-
return
|
|
99
|
-
() =>
|
|
98
|
+
return $(
|
|
99
|
+
() => x.value,
|
|
100
100
|
(e) => {
|
|
101
101
|
if (e) {
|
|
102
|
-
|
|
102
|
+
i.value = [], s.value = [], r.value = [];
|
|
103
103
|
for (const t of e)
|
|
104
|
-
t.fixed === "left" ?
|
|
104
|
+
t.fixed === "left" ? T(i, t) : t.fixed === "right" ? T(r, t) : T(s, t);
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
{ immediate: !0 }
|
|
108
|
-
),
|
|
109
|
-
|
|
110
|
-
}), (e, t) => (i(), _("div", {
|
|
111
|
-
class: f(n(d)())
|
|
108
|
+
), (e, t) => (c(), y("div", {
|
|
109
|
+
class: d(n(u)())
|
|
112
110
|
}, [
|
|
113
|
-
|
|
114
|
-
class:
|
|
111
|
+
m(n(G), {
|
|
112
|
+
class: d(n(u)("header")),
|
|
115
113
|
align: "center",
|
|
116
114
|
justify: "space-between"
|
|
117
115
|
}, {
|
|
118
|
-
default:
|
|
116
|
+
default: v(() => [
|
|
119
117
|
g("span", {
|
|
120
|
-
class:
|
|
121
|
-
}, k(n(
|
|
122
|
-
|
|
118
|
+
class: d(n(u)("header-title"))
|
|
119
|
+
}, k(n(h)("ap.apTable.setting.selectCount", { count: z.value })), 3),
|
|
120
|
+
m(n(H), {
|
|
123
121
|
type: "link",
|
|
124
122
|
size: "small",
|
|
125
123
|
style: { padding: "0" },
|
|
126
|
-
onClick:
|
|
124
|
+
onClick: x.onReset
|
|
127
125
|
}, {
|
|
128
|
-
default:
|
|
129
|
-
|
|
126
|
+
default: v(() => [
|
|
127
|
+
q(k(n(h)("ap.apTable.setting.reset")), 1)
|
|
130
128
|
]),
|
|
131
129
|
_: 1
|
|
132
130
|
}, 8, ["onClick"])
|
|
133
131
|
]),
|
|
134
132
|
_: 1
|
|
135
133
|
}, 8, ["class"]),
|
|
136
|
-
|
|
134
|
+
m(n(J), { style: { margin: "0px" } }),
|
|
137
135
|
g("div", {
|
|
138
|
-
class:
|
|
136
|
+
class: d(n(u)("content"))
|
|
139
137
|
}, [
|
|
140
|
-
|
|
138
|
+
i.value.length ? (c(), y("div", W, [
|
|
141
139
|
g("span", {
|
|
142
|
-
class:
|
|
143
|
-
}, k(n(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
"onUpdate:modelValue": E,
|
|
140
|
+
class: d(n(u)("section-title"))
|
|
141
|
+
}, k(n(h)("ap.apTable.setting.fixToLeft")), 3),
|
|
142
|
+
m(n(N), {
|
|
143
|
+
"model-value": i.value,
|
|
144
|
+
"onUpdate:modelValue": D,
|
|
148
145
|
"item-key": "key"
|
|
149
146
|
}, {
|
|
150
|
-
item:
|
|
151
|
-
|
|
147
|
+
item: v(({ element: o }) => [
|
|
148
|
+
C(o) ? (c(), b(R, {
|
|
152
149
|
key: 0,
|
|
153
150
|
value: o
|
|
154
|
-
}, null, 8, ["value"])) :
|
|
151
|
+
}, null, 8, ["value"])) : p("", !0)
|
|
155
152
|
]),
|
|
156
153
|
_: 1
|
|
157
|
-
}, 8, ["model-value"])
|
|
158
|
-
])) :
|
|
159
|
-
|
|
154
|
+
}, 8, ["model-value"])
|
|
155
|
+
])) : p("", !0),
|
|
156
|
+
s.value.length ? (c(), y("div", X, [
|
|
160
157
|
g("span", {
|
|
161
|
-
class:
|
|
162
|
-
}, k(n(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
"onUpdate:modelValue": j,
|
|
158
|
+
class: d(n(u)("section-title"))
|
|
159
|
+
}, k(n(h)("ap.apTable.setting.unFixed")), 3),
|
|
160
|
+
m(n(N), {
|
|
161
|
+
"model-value": s.value,
|
|
162
|
+
"onUpdate:modelValue": E,
|
|
167
163
|
"item-key": "key"
|
|
168
164
|
}, {
|
|
169
|
-
item:
|
|
170
|
-
|
|
165
|
+
item: v(({ element: o }) => [
|
|
166
|
+
C(o) ? (c(), b(R, {
|
|
171
167
|
key: 0,
|
|
172
168
|
value: o
|
|
173
|
-
}, null, 8, ["value"])) :
|
|
169
|
+
}, null, 8, ["value"])) : p("", !0)
|
|
174
170
|
]),
|
|
175
171
|
_: 1
|
|
176
|
-
}, 8, ["model-value"])
|
|
177
|
-
])) :
|
|
178
|
-
|
|
172
|
+
}, 8, ["model-value"])
|
|
173
|
+
])) : p("", !0),
|
|
174
|
+
r.value.length ? (c(), y("div", Y, [
|
|
179
175
|
g("span", {
|
|
180
|
-
class:
|
|
181
|
-
}, k(n(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"
|
|
185
|
-
"onUpdate:modelValue": A,
|
|
176
|
+
class: d(n(u)("section-title"))
|
|
177
|
+
}, k(n(h)("ap.apTable.setting.fixToRight")), 3),
|
|
178
|
+
m(n(N), {
|
|
179
|
+
"model-value": r.value,
|
|
180
|
+
"onUpdate:modelValue": j,
|
|
186
181
|
"item-key": "key"
|
|
187
182
|
}, {
|
|
188
|
-
item:
|
|
189
|
-
|
|
183
|
+
item: v(({ element: o }) => [
|
|
184
|
+
C(o) ? (c(), b(R, {
|
|
190
185
|
key: 0,
|
|
191
186
|
value: o
|
|
192
|
-
}, null, 8, ["value"])) :
|
|
187
|
+
}, null, 8, ["value"])) : p("", !0)
|
|
193
188
|
]),
|
|
194
189
|
_: 1
|
|
195
|
-
}, 8, ["model-value"])
|
|
196
|
-
])) :
|
|
190
|
+
}, 8, ["model-value"])
|
|
191
|
+
])) : p("", !0)
|
|
197
192
|
], 2)
|
|
198
193
|
], 2));
|
|
199
194
|
}
|
|
200
195
|
});
|
|
201
196
|
export {
|
|
202
|
-
|
|
197
|
+
ce as default
|
|
203
198
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as c, isArray as p, isUndefined as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as m, createVNode as u, mergeProps as f, cloneVNode as T, Fragment as b } from "vue";
|
|
2
|
+
import { isObject as c, isArray as p, isUndefined as y, isFunction as g, omit as h, isBoolean as j, isString as a } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as F, apTableFormItemMap as O } from "./constants.mjs";
|
|
4
|
+
import { isType as E } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
6
|
+
import { Tooltip as x } from "ant-design-vue";
|
|
7
|
+
import { QuestionCircleOutlined as N } from "@ant-design/icons-vue";
|
|
8
|
+
import S from "../ap-form/ap-form-item.vue.mjs";
|
|
9
|
+
function I(t) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !m(t);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const v = (t, e, n) => {
|
|
13
13
|
let r = {};
|
|
14
14
|
return c(t) ? Object.keys(t).forEach((o) => {
|
|
15
|
-
c(t[o]) ? r[o] =
|
|
15
|
+
c(t[o]) ? r[o] = v(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
16
16
|
}) : r = n(t, e), r;
|
|
17
|
-
},
|
|
17
|
+
}, H = (t, e) => {
|
|
18
18
|
switch (t) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return e.valueOf();
|
|
@@ -35,15 +35,15 @@ const P = (t, e, n) => {
|
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
38
|
+
function J(t) {
|
|
39
39
|
return p(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function P(t) {
|
|
42
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
43
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
const e = [], n =
|
|
45
|
+
const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t) => {
|
|
46
|
+
const e = [], n = V(t);
|
|
47
47
|
return n.forEach((r, o) => {
|
|
48
48
|
const i = n.get(o) || n.get(`${o}`);
|
|
49
49
|
if (i) {
|
|
@@ -63,7 +63,7 @@ const w = (t) => V(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}), e;
|
|
66
|
-
},
|
|
66
|
+
}, L = (t) => y(t) || t < 0 ? 0 : t, Q = (t, e, n) => {
|
|
67
67
|
if (n)
|
|
68
68
|
return n;
|
|
69
69
|
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
@@ -74,16 +74,16 @@ const w = (t) => V(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
74
74
|
if (o.includes(e))
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return !t || !
|
|
77
|
+
function w(t, e) {
|
|
78
|
+
return !t || !g(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function U(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
82
82
|
return t.valueEnum && (e = "status"), e;
|
|
83
83
|
}
|
|
84
84
|
function z(t, e, n, r) {
|
|
85
85
|
var s;
|
|
86
|
-
const o =
|
|
86
|
+
const o = F[t];
|
|
87
87
|
if (o)
|
|
88
88
|
return u(o, f(e, {
|
|
89
89
|
mode: "read"
|
|
@@ -95,34 +95,34 @@ function G(t, e) {
|
|
|
95
95
|
if (t.customRenderFormItem)
|
|
96
96
|
return () => {
|
|
97
97
|
const o = t.customRenderFormItem(t);
|
|
98
|
-
return
|
|
98
|
+
return T(o, {
|
|
99
99
|
...t.fieldProps,
|
|
100
100
|
span: t.span,
|
|
101
101
|
...o.props || {}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
const n =
|
|
104
|
+
const n = O[t.valueType];
|
|
105
105
|
if (n)
|
|
106
106
|
return n;
|
|
107
107
|
const r = e == null ? void 0 : e[t.valueType];
|
|
108
108
|
return () => {
|
|
109
109
|
var i;
|
|
110
110
|
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
-
return o ? u(
|
|
111
|
+
return o ? u(S, f(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
|
-
}),
|
|
113
|
+
}), I(o) ? o : {
|
|
114
114
|
default: () => [o]
|
|
115
115
|
}) : null;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
function K(t, e) {
|
|
119
|
-
const n =
|
|
119
|
+
const n = w(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", s = o ? {
|
|
120
120
|
checked: e.value
|
|
121
121
|
} : {
|
|
122
122
|
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
124
|
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
-
...
|
|
125
|
+
...h(r, ["request"]),
|
|
126
126
|
...s
|
|
127
127
|
};
|
|
128
128
|
}
|
|
@@ -130,7 +130,7 @@ function X(t) {
|
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return j(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
135
|
function Y(t, e) {
|
|
136
136
|
var r;
|
|
@@ -141,7 +141,7 @@ function Y(t, e) {
|
|
|
141
141
|
}), n;
|
|
142
142
|
}
|
|
143
143
|
function Z(t) {
|
|
144
|
-
if (!
|
|
144
|
+
if (!E("Object")(t))
|
|
145
145
|
return t;
|
|
146
146
|
try {
|
|
147
147
|
return JSON.stringify(t);
|
|
@@ -159,40 +159,40 @@ function k(t, e, n, r) {
|
|
|
159
159
|
const s = a(t.title) ? u("span", {
|
|
160
160
|
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title, l = t.tooltip ? a(t.tooltip) ? u(
|
|
162
|
+
}, [t.title]) : t.title, l = t.tooltip ? a(t.tooltip) ? u(b, null, [t.tooltip]) : t.tooltip(t) : null;
|
|
163
|
+
return l ? u("span", {
|
|
163
164
|
style: {
|
|
164
165
|
display: "inline-flex",
|
|
165
166
|
alignItems: "center"
|
|
166
167
|
}
|
|
167
|
-
}, [s, u(
|
|
168
|
+
}, [s, u(x, {
|
|
168
169
|
title: l,
|
|
169
170
|
placement: "bottom"
|
|
170
171
|
}, {
|
|
171
|
-
default: () => [u(
|
|
172
|
+
default: () => [u(N, {
|
|
172
173
|
style: {
|
|
173
174
|
padding: "4px",
|
|
174
175
|
color: r,
|
|
175
176
|
verticalAlign: "middle"
|
|
176
177
|
}
|
|
177
178
|
}, null)]
|
|
178
|
-
})]);
|
|
179
|
-
return l ? m : s;
|
|
179
|
+
})]) : s;
|
|
180
180
|
}
|
|
181
181
|
export {
|
|
182
182
|
X as apColumnToColumn,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
J as dataIndexToStr,
|
|
184
|
+
v as formatParamsValueType,
|
|
185
|
+
L as getColumnOrder,
|
|
186
|
+
w as getFieldProps,
|
|
187
|
+
Q as getPlaceholder,
|
|
188
188
|
G as getSearchFormItemRenderNode,
|
|
189
189
|
z as getTableCellRenderNode,
|
|
190
190
|
K as getTableRenderProps,
|
|
191
|
-
|
|
191
|
+
U as getTableRenderType,
|
|
192
192
|
k as getTableTitle,
|
|
193
|
-
|
|
193
|
+
V as objectToMap,
|
|
194
194
|
Z as objectToString,
|
|
195
|
-
|
|
195
|
+
H as parseFieldValue,
|
|
196
196
|
Y as updateFormProps,
|
|
197
197
|
d as valueEnumToArray
|
|
198
198
|
};
|