@aplus-frontend/ui 0.2.19 → 0.2.21
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 +193 -189
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +18 -18
- package/es/src/ap-form/index.d.ts +5 -1
- package/es/src/ap-form/index.mjs +17 -9
- package/es/src/ap-form/interface.d.ts +10 -1
- package/es/src/ap-form/item/index.vue.mjs +48 -51
- package/es/src/ap-form/items/number/index.vue.d.ts +20 -20
- package/es/src/ap-form/items/text/index.vue.d.ts +20 -20
- package/es/src/ap-form/items/text/password.vue.d.ts +20 -20
- package/es/src/ap-form/items/text-area/index.vue.d.ts +18 -18
- package/es/src/ap-form/render/control.vue.d.ts +29 -0
- package/es/src/ap-form/render/control.vue.mjs +23 -0
- package/es/src/ap-form/render/control.vue2.mjs +4 -0
- package/es/src/ap-form/render/item.vue.d.ts +63 -0
- package/es/src/ap-form/render/item.vue.mjs +72 -0
- package/es/src/ap-form/render/item.vue2.mjs +4 -0
- package/es/src/ap-form/render/style/css.d.ts +1 -0
- package/es/src/ap-form/render/style/css.js +1 -0
- package/es/src/ap-form/render/style/style.d.ts +1 -0
- package/es/src/ap-list/index.vue.d.ts +10 -2
- package/es/src/ap-list/index.vue.mjs +135 -85
- package/es/src/ap-list/interface.d.ts +22 -3
- package/es/src/ap-table/constants.d.ts +102 -102
- package/es/src/ap-tag/ap-tag.vue.mjs +16 -13
- package/es/src/business/ap-group-search/index.d.ts +36 -36
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +1 -1
- package/es/src/business/ap-ladder/index.d.ts +7 -7
- package/es/src/config-provider/config-provider.d.ts +5 -0
- package/es/src/config-provider/css-var.d.ts +5 -0
- package/es/src/config-provider/css-var.mjs +20 -10
- package/es/src/config-provider/index.d.ts +30 -0
- package/es/src/index.mjs +154 -150
- package/es/src/path-map.mjs +3 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/ap-form/index.d.ts +5 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +10 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +20 -20
- package/lib/src/ap-form/items/text/index.vue.d.ts +20 -20
- package/lib/src/ap-form/items/text/password.vue.d.ts +20 -20
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +18 -18
- package/lib/src/ap-form/render/control.vue.d.ts +29 -0
- package/lib/src/ap-form/render/control.vue.js +1 -0
- package/lib/src/ap-form/render/control.vue2.js +1 -0
- package/lib/src/ap-form/render/item.vue.d.ts +63 -0
- package/lib/src/ap-form/render/item.vue.js +1 -0
- package/lib/src/ap-form/render/item.vue2.js +1 -0
- package/lib/src/ap-form/render/style/css.d.ts +1 -0
- package/lib/src/ap-form/render/style/css.js +1 -0
- package/lib/src/ap-form/render/style/style.d.ts +1 -0
- package/lib/src/ap-list/index.vue.d.ts +10 -2
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +22 -3
- package/lib/src/ap-table/constants.d.ts +102 -102
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +36 -36
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +7 -7
- package/lib/src/config-provider/config-provider.d.ts +5 -0
- package/lib/src/config-provider/css-var.d.ts +5 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +30 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FormItemStatusContextProps } from '@aplus-frontend/antdv/es/form/FormItemContext';
|
|
2
|
+
import { ApFormControlRenderProps } from '../interface';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
|
+
type SlotsType = {
|
|
5
|
+
default: (props: FormItemStatusContextProps & NonNullable<ApFormControlRenderProps>) => any;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
slots: Readonly<SlotsType> & SlotsType;
|
|
9
|
+
refs: {};
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<ApFormControlRenderProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApFormControlRenderProps>>>, {}, {}>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToOption<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as p, computed as u, renderSlot as c, normalizeProps as s, guardReactiveProps as a } from "vue";
|
|
2
|
+
import { FormItemInputContext as m } from "@aplus-frontend/antdv/es/form/FormItemContext";
|
|
3
|
+
const f = /* @__PURE__ */ p({
|
|
4
|
+
name: "ApFormControlRender",
|
|
5
|
+
__name: "control",
|
|
6
|
+
props: {
|
|
7
|
+
value: {},
|
|
8
|
+
"onUpdate:value": { type: Function },
|
|
9
|
+
bordered: { type: Boolean },
|
|
10
|
+
onFocus: { type: Function },
|
|
11
|
+
onBlur: { type: Function }
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
const o = e, t = m.useInject(), n = u(() => ({
|
|
15
|
+
...t,
|
|
16
|
+
...o
|
|
17
|
+
}));
|
|
18
|
+
return (r, l) => c(r.$slots, "default", s(a(n.value)));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
f as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FormItemStatusContextProps } from '@aplus-frontend/antdv/es/form/FormItemContext';
|
|
2
|
+
import { ApFormControlRenderProps, ApFormItemSlots } from '../interface';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
|
+
import { ApFormItemProps } from '..';
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
slots: Readonly<{
|
|
7
|
+
default: (props: FormItemStatusContextProps & NonNullable<ApFormControlRenderProps>) => any;
|
|
8
|
+
} & Omit<ApFormItemSlots, "default">> & {
|
|
9
|
+
default: (props: FormItemStatusContextProps & NonNullable<ApFormControlRenderProps>) => any;
|
|
10
|
+
} & Omit<ApFormItemSlots, "default">;
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption< ApFormItemProps>, {
|
|
16
|
+
hasFeedback: boolean;
|
|
17
|
+
colon: undefined;
|
|
18
|
+
autoLink: boolean;
|
|
19
|
+
required: undefined;
|
|
20
|
+
validateFirst: undefined;
|
|
21
|
+
bordered: boolean;
|
|
22
|
+
valuePropName: string;
|
|
23
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption< ApFormItemProps>, {
|
|
24
|
+
hasFeedback: boolean;
|
|
25
|
+
colon: undefined;
|
|
26
|
+
autoLink: boolean;
|
|
27
|
+
required: undefined;
|
|
28
|
+
validateFirst: undefined;
|
|
29
|
+
bordered: boolean;
|
|
30
|
+
valuePropName: string;
|
|
31
|
+
}>>>, {
|
|
32
|
+
bordered: boolean;
|
|
33
|
+
colon: boolean;
|
|
34
|
+
required: boolean;
|
|
35
|
+
hasFeedback: boolean;
|
|
36
|
+
autoLink: boolean;
|
|
37
|
+
validateFirst: boolean;
|
|
38
|
+
valuePropName: string;
|
|
39
|
+
}, {}>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithDefaults<P, D> = {
|
|
43
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
44
|
+
default: D[K];
|
|
45
|
+
}> : P[K];
|
|
46
|
+
};
|
|
47
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
|
+
type __VLS_TypePropsToOption<T> = {
|
|
49
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
50
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
51
|
+
} : {
|
|
52
|
+
type: PropType<T[K]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type __VLS_PrettifyLocal<T> = {
|
|
62
|
+
[K in keyof T]: T[K];
|
|
63
|
+
} & {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as m, useSlots as c, openBlock as B, createBlock as v, unref as e, normalizeProps as o, guardReactiveProps as l, createSlots as y, withCtx as t, createVNode as x, renderSlot as s, renderList as _ } from "vue";
|
|
2
|
+
import { omit as g } from "lodash-unified";
|
|
3
|
+
import { ApForm as p } from "../index.mjs";
|
|
4
|
+
const S = /* @__PURE__ */ m({
|
|
5
|
+
name: "ApFormItemRender",
|
|
6
|
+
__name: "item",
|
|
7
|
+
props: {
|
|
8
|
+
htmlFor: {},
|
|
9
|
+
prefixCls: {},
|
|
10
|
+
label: {},
|
|
11
|
+
help: {},
|
|
12
|
+
extra: {},
|
|
13
|
+
labelCol: {},
|
|
14
|
+
wrapperCol: {},
|
|
15
|
+
hasFeedback: { type: Boolean, default: !1 },
|
|
16
|
+
colon: { type: Boolean, default: void 0 },
|
|
17
|
+
labelAlign: {},
|
|
18
|
+
prop: {},
|
|
19
|
+
name: {},
|
|
20
|
+
rules: {},
|
|
21
|
+
autoLink: { type: Boolean, default: !0 },
|
|
22
|
+
required: { type: Boolean, default: void 0 },
|
|
23
|
+
validateFirst: { type: Boolean, default: void 0 },
|
|
24
|
+
validateStatus: {},
|
|
25
|
+
validateTrigger: {},
|
|
26
|
+
messageVariables: {},
|
|
27
|
+
hidden: { type: Boolean },
|
|
28
|
+
noStyle: { type: Boolean },
|
|
29
|
+
tooltip: {},
|
|
30
|
+
span: {},
|
|
31
|
+
order: {},
|
|
32
|
+
offset: {},
|
|
33
|
+
push: {},
|
|
34
|
+
pull: {},
|
|
35
|
+
xs: {},
|
|
36
|
+
sm: {},
|
|
37
|
+
md: {},
|
|
38
|
+
lg: {},
|
|
39
|
+
xl: {},
|
|
40
|
+
xxl: {},
|
|
41
|
+
flex: {},
|
|
42
|
+
bordered: { type: Boolean, default: !1 },
|
|
43
|
+
valuePropName: { default: "value" },
|
|
44
|
+
initialValue: {},
|
|
45
|
+
_signal: {},
|
|
46
|
+
transform: {}
|
|
47
|
+
},
|
|
48
|
+
setup(d) {
|
|
49
|
+
const u = d, i = c();
|
|
50
|
+
return (a, h) => (B(), v(e(p).FormItem, o(l(u)), y({
|
|
51
|
+
default: t(() => [
|
|
52
|
+
x(e(p).ControlRender, null, {
|
|
53
|
+
default: t((r) => [
|
|
54
|
+
s(a.$slots, "default", o(l(r)))
|
|
55
|
+
]),
|
|
56
|
+
_: 3
|
|
57
|
+
})
|
|
58
|
+
]),
|
|
59
|
+
_: 2
|
|
60
|
+
}, [
|
|
61
|
+
_(e(g)(i, "default"), (r, n) => ({
|
|
62
|
+
name: n,
|
|
63
|
+
fn: t((f) => [
|
|
64
|
+
s(a.$slots, n, o(l(f || {})))
|
|
65
|
+
])
|
|
66
|
+
}))
|
|
67
|
+
]), 1040));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
S as default
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -24,13 +24,21 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
|
|
|
24
24
|
empty?(_: {
|
|
25
25
|
loading: boolean;
|
|
26
26
|
}): any;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
renderItem?(_: {
|
|
28
|
+
item: RecordType;
|
|
29
|
+
index: number;
|
|
30
|
+
}): any;
|
|
31
|
+
renderItem?(_: {
|
|
32
|
+
item: RecordType;
|
|
33
|
+
index: number;
|
|
29
34
|
}): any;
|
|
30
35
|
renderItem?(_: {
|
|
31
36
|
item: RecordType;
|
|
32
37
|
index: number;
|
|
33
38
|
}): any;
|
|
39
|
+
renderContent?(_: {
|
|
40
|
+
dataSource: RecordType[];
|
|
41
|
+
}): any;
|
|
34
42
|
};
|
|
35
43
|
emit: {};
|
|
36
44
|
}>) => VNode<RendererNode, RendererElement, {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
1
|
+
import { defineComponent as H, ref as J, unref as t, computed as c, watch as Q, openBlock as i, createBlock as y, normalizeClass as u, withCtx as f, createElementVNode as X, normalizeStyle as v, renderSlot as l, createVNode as h, createElementBlock as p, Fragment as B, renderList as Y, mergeProps as Z, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { Empty as E, Spin as x, Pagination as ee } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-table/index.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import { useOfflineList as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
5
|
+
import { isUndefined as O, isNumber as te, omit as ae } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ne } from "./hooks/use-offline-list.mjs";
|
|
7
|
+
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
+
import { RecycleScroller as re, DynamicScroller as oe, DynamicScrollerItem as ie } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as le } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useTablePaging as se } from "../ap-table/hooks/use-table-paging.mjs";
|
|
11
|
+
const he = /* @__PURE__ */ H({
|
|
10
12
|
__name: "index",
|
|
11
13
|
props: {
|
|
12
14
|
dataSource: {},
|
|
@@ -19,26 +21,29 @@ const fe = /* @__PURE__ */ M({
|
|
|
19
21
|
beforeSearchSubmit: {},
|
|
20
22
|
pagination: { type: [Boolean, Object], default: void 0 },
|
|
21
23
|
manual: { type: Boolean },
|
|
22
|
-
containerStyle: {},
|
|
23
|
-
|
|
24
|
+
containerStyle: { type: [Boolean, null, String, Object, Array] },
|
|
25
|
+
contentStyle: { type: [Boolean, null, String, Object, Array] },
|
|
26
|
+
footerWarpperStyle: { type: [Boolean, null, String, Object, Array] },
|
|
27
|
+
virtual: { default: void 0 },
|
|
28
|
+
rowKey: {}
|
|
24
29
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
formRef:
|
|
28
|
-
submit:
|
|
29
|
-
reset:
|
|
30
|
-
handleTableChange:
|
|
31
|
-
data:
|
|
30
|
+
setup(V, { expose: F }) {
|
|
31
|
+
const L = E.PRESENTED_IMAGE_SIMPLE, n = V, { b: d, e: N } = le("ap-list"), b = J(), {
|
|
32
|
+
formRef: k,
|
|
33
|
+
submit: D,
|
|
34
|
+
reset: z,
|
|
35
|
+
handleTableChange: R,
|
|
36
|
+
data: g,
|
|
32
37
|
refresh: T,
|
|
33
|
-
refreshByDelete:
|
|
38
|
+
refreshByDelete: $,
|
|
34
39
|
tableProps: C
|
|
35
|
-
} =
|
|
36
|
-
async request(
|
|
37
|
-
var
|
|
38
|
-
const
|
|
40
|
+
} = se({
|
|
41
|
+
async request(e) {
|
|
42
|
+
var r;
|
|
43
|
+
const a = await ((r = n.request) == null ? void 0 : r.call(n, e));
|
|
39
44
|
return {
|
|
40
|
-
data: (
|
|
41
|
-
total: (
|
|
45
|
+
data: (a == null ? void 0 : a.data) || [],
|
|
46
|
+
total: (a == null ? void 0 : a.total) || 0
|
|
42
47
|
};
|
|
43
48
|
},
|
|
44
49
|
defaultParams: n.params,
|
|
@@ -47,92 +52,137 @@ const fe = /* @__PURE__ */ M({
|
|
|
47
52
|
defaultCurrent: n.pagination ? n.pagination.defaultCurrent : void 0,
|
|
48
53
|
defaultPageSize: n.pagination ? n.pagination.defaultPageSize : void 0,
|
|
49
54
|
formatParams: n.beforeSearchSubmit
|
|
50
|
-
}),
|
|
51
|
-
pagination:
|
|
52
|
-
dataSource:
|
|
53
|
-
onChange:
|
|
54
|
-
} =
|
|
55
|
-
function
|
|
56
|
-
if (t(
|
|
57
|
-
|
|
55
|
+
}), j = { form: k }, {
|
|
56
|
+
pagination: I,
|
|
57
|
+
dataSource: q,
|
|
58
|
+
onChange: A
|
|
59
|
+
} = ne(n);
|
|
60
|
+
function K(e, a) {
|
|
61
|
+
if (t(m)) {
|
|
62
|
+
A(e, a);
|
|
58
63
|
return;
|
|
59
64
|
}
|
|
60
|
-
|
|
61
|
-
{ current:
|
|
65
|
+
R(
|
|
66
|
+
{ current: e, pageSize: a },
|
|
62
67
|
{},
|
|
63
68
|
{},
|
|
64
69
|
{ currentDataSource: [], action: "paginate" }
|
|
65
70
|
);
|
|
66
71
|
}
|
|
67
|
-
const
|
|
68
|
-
var
|
|
69
|
-
return n.pagination === !1 ? !1 : ((
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
() => t(
|
|
73
|
-
(
|
|
74
|
-
var
|
|
75
|
-
(
|
|
72
|
+
const s = c(() => t(m) ? t(q) : t(g).records), S = c(() => O(n.loading) ? t(g).loading : n.loading), M = c(() => {
|
|
73
|
+
var e, a;
|
|
74
|
+
return n.pagination === !1 || n.virtual ? !1 : ((e = n.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(m) ? (((a = n.dataSource) == null ? void 0 : a.length) || 0) > t(I).pageSize : t(g).total > t(C).pagination.pageSize;
|
|
75
|
+
}), m = c(() => !O(n.dataSource));
|
|
76
|
+
Q(
|
|
77
|
+
() => t(S),
|
|
78
|
+
(e) => {
|
|
79
|
+
var a;
|
|
80
|
+
(a = n.onLoadingChange) == null || a.call(n, e);
|
|
76
81
|
}
|
|
77
82
|
);
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
(
|
|
83
|
+
function W(e) {
|
|
84
|
+
var a, r;
|
|
85
|
+
(r = (a = b.value) == null ? void 0 : a.querySelector(e || ":first-child")) == null || r.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
const
|
|
85
|
-
return (
|
|
87
|
+
function G(e = !1) {
|
|
88
|
+
var o;
|
|
89
|
+
const a = (o = k.value) == null ? void 0 : o.apForm, r = e ? a == null ? void 0 : a.getFieldsValueTransformed : a == null ? void 0 : a.getFieldsValue;
|
|
90
|
+
return (r == null ? void 0 : r()) || {};
|
|
86
91
|
}
|
|
87
|
-
return
|
|
88
|
-
submit: () =>
|
|
89
|
-
reset: () =>
|
|
92
|
+
return F({
|
|
93
|
+
submit: () => D(),
|
|
94
|
+
reset: () => z(),
|
|
90
95
|
refresh: () => T(),
|
|
91
|
-
refreshByDelete: (
|
|
92
|
-
scrollToFirstRow:
|
|
93
|
-
getSearchFormValuesIfSetted:
|
|
94
|
-
}), (
|
|
95
|
-
spinning:
|
|
96
|
-
class: u(t(
|
|
96
|
+
refreshByDelete: (e) => $(e),
|
|
97
|
+
scrollToFirstRow: W,
|
|
98
|
+
getSearchFormValuesIfSetted: G
|
|
99
|
+
}), (e, a) => (i(), y(t(x), {
|
|
100
|
+
spinning: S.value,
|
|
101
|
+
class: u(t(d)("spin"))
|
|
97
102
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
class: u(t(
|
|
101
|
-
style:
|
|
103
|
+
default: f(() => [
|
|
104
|
+
X("div", {
|
|
105
|
+
class: u(t(d)()),
|
|
106
|
+
style: v(e.containerStyle)
|
|
102
107
|
}, [
|
|
103
|
-
|
|
104
|
-
formIns:
|
|
105
|
-
submit: t(
|
|
106
|
-
reset: t(
|
|
108
|
+
l(e.$slots, "header", {
|
|
109
|
+
formIns: j,
|
|
110
|
+
submit: t(D),
|
|
111
|
+
reset: t(z)
|
|
107
112
|
}),
|
|
108
|
-
|
|
113
|
+
s.value.length === 0 ? l(e.$slots, "empty", {
|
|
109
114
|
key: 0,
|
|
110
|
-
loading:
|
|
115
|
+
loading: S.value
|
|
111
116
|
}, () => [
|
|
112
|
-
|
|
113
|
-
]) : (
|
|
117
|
+
h(t(E), { image: t(L) }, null, 8, ["image"])
|
|
118
|
+
]) : (i(), p("div", {
|
|
114
119
|
key: 1,
|
|
115
120
|
ref_key: "contentRef",
|
|
116
|
-
ref:
|
|
117
|
-
|
|
121
|
+
ref: b,
|
|
122
|
+
style: v(e.contentStyle)
|
|
118
123
|
}, [
|
|
119
|
-
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
e.virtual ? (i(), p(B, { key: 0 }, [
|
|
125
|
+
t(te)(e.virtual) ? (i(), y(t(re), {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: u(t(d)("scroll-wrapper")),
|
|
128
|
+
items: s.value,
|
|
129
|
+
itemSize: e.virtual,
|
|
130
|
+
"key-field": n.rowKey || "id"
|
|
131
|
+
}, {
|
|
132
|
+
default: f(({ item: r, index: o }) => [
|
|
133
|
+
l(e.$slots, "renderItem", {
|
|
134
|
+
item: r,
|
|
135
|
+
index: o
|
|
136
|
+
})
|
|
137
|
+
]),
|
|
138
|
+
_: 3
|
|
139
|
+
}, 8, ["class", "items", "itemSize", "key-field"])) : (i(), y(t(oe), {
|
|
140
|
+
key: 1,
|
|
141
|
+
items: s.value,
|
|
142
|
+
minItemSize: e.virtual.minItemSize,
|
|
143
|
+
class: u(t(d)("scroll-wrapper"))
|
|
144
|
+
}, {
|
|
145
|
+
default: f(({ item: r, index: o, active: U }) => {
|
|
146
|
+
var P, w;
|
|
147
|
+
return [
|
|
148
|
+
h(t(ie), {
|
|
149
|
+
item: r,
|
|
150
|
+
active: U,
|
|
151
|
+
dataIndex: o,
|
|
152
|
+
sizeDependencies: (w = (P = e.virtual).sizeDependencies) == null ? void 0 : w.call(P, r)
|
|
153
|
+
}, {
|
|
154
|
+
default: f(() => [
|
|
155
|
+
l(e.$slots, "renderItem", {
|
|
156
|
+
item: r,
|
|
157
|
+
index: o
|
|
158
|
+
})
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1032, ["item", "active", "dataIndex", "sizeDependencies"])
|
|
162
|
+
];
|
|
163
|
+
}),
|
|
164
|
+
_: 3
|
|
165
|
+
}, 8, ["items", "minItemSize", "class"]))
|
|
166
|
+
], 64)) : l(e.$slots, "renderContent", {
|
|
167
|
+
key: 1,
|
|
168
|
+
dataSource: s.value
|
|
169
|
+
}, () => [
|
|
170
|
+
(i(!0), p(B, null, Y(s.value, (r, o) => l(e.$slots, "renderItem", {
|
|
171
|
+
item: r,
|
|
172
|
+
index: o
|
|
123
173
|
})), 256))
|
|
124
174
|
])
|
|
125
|
-
],
|
|
126
|
-
|
|
175
|
+
], 4)),
|
|
176
|
+
M.value ? (i(), p("div", {
|
|
127
177
|
key: 2,
|
|
128
|
-
class: u(t(
|
|
129
|
-
style:
|
|
178
|
+
class: u(t(N)("footer")),
|
|
179
|
+
style: v(e.footerWarpperStyle)
|
|
130
180
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{ onChange:
|
|
181
|
+
h(t(ee), Z(
|
|
182
|
+
m.value ? t(I) : t(ae)(t(C).pagination, ["showTotal"]),
|
|
183
|
+
{ onChange: K }
|
|
134
184
|
), null, 16)
|
|
135
|
-
], 6)) :
|
|
185
|
+
], 6)) : _("", !0)
|
|
136
186
|
], 6)
|
|
137
187
|
]),
|
|
138
188
|
_: 3
|
|
@@ -140,5 +190,5 @@ const fe = /* @__PURE__ */ M({
|
|
|
140
190
|
}
|
|
141
191
|
});
|
|
142
192
|
export {
|
|
143
|
-
|
|
193
|
+
he as default
|
|
144
194
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
@@ -62,11 +62,30 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
62
62
|
/**
|
|
63
63
|
* List容器的自定义样式
|
|
64
64
|
*/
|
|
65
|
-
containerStyle?:
|
|
65
|
+
containerStyle?: StyleValue;
|
|
66
|
+
/**
|
|
67
|
+
* List内容区域自定义样式
|
|
68
|
+
*/
|
|
69
|
+
contentStyle?: StyleValue;
|
|
66
70
|
/**
|
|
67
71
|
* 底部分页器容器的样式
|
|
68
72
|
*/
|
|
69
|
-
footerWarpperStyle?:
|
|
73
|
+
footerWarpperStyle?: StyleValue;
|
|
74
|
+
/**
|
|
75
|
+
* 列表是否开启虚拟滚动
|
|
76
|
+
* @description 设置此属性后,将不会展示分页器,同样`renderContent`插槽将不再可用;
|
|
77
|
+
* 如果值为`number`类型,则表示每个元素的尺寸,在尺寸不固定的情况下,则可以设置`minItemSize`和`sizeDependencies`两个属性
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
virtual?: number | {
|
|
81
|
+
minItemSize: number;
|
|
82
|
+
sizeDependencies?: (item: RecordType) => any[];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 列表数据的key
|
|
86
|
+
* @default "id"
|
|
87
|
+
*/
|
|
88
|
+
rowKey?: string;
|
|
70
89
|
};
|
|
71
90
|
export type ApListExpose = {
|
|
72
91
|
/**
|