@aplus-frontend/ui 7.7.10 → 7.8.0
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 +224 -222
- package/es/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
- package/es/src/ap-field/hooks/use-default-placeholder.mjs +8 -7
- package/es/src/ap-field/index.d.ts +10 -2
- package/es/src/ap-field/index.mjs +65 -58
- package/es/src/ap-field/interface.d.ts +11 -0
- package/es/src/ap-field/second/helper.d.ts +7 -0
- package/es/src/ap-field/second/helper.mjs +9 -0
- package/es/src/ap-field/second/index.vue.d.ts +44 -0
- package/es/src/ap-field/second/index.vue.mjs +90 -0
- package/es/src/ap-field/second/index.vue2.mjs +4 -0
- package/es/src/ap-field/second/read.vue.d.ts +6 -0
- package/es/src/ap-field/second/read.vue.mjs +4 -0
- package/es/src/ap-field/second/read.vue2.mjs +58 -0
- package/es/src/ap-field/style/textarea.mjs +15 -5
- package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
- package/es/src/ap-field/text-area/index.vue.mjs +44 -28
- package/es/src/ap-field/text-area/read.vue.d.ts +3 -0
- package/es/src/ap-field/text-area/read.vue2.mjs +26 -8
- package/es/src/ap-field/text-area/utils.d.ts +1 -0
- package/es/src/ap-field/text-area/utils.mjs +13 -0
- package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -0
- package/es/src/ap-table/constants.d.ts +9 -0
- package/es/src/business/ag-grid-modal/interface.d.ts +2 -2
- package/es/src/business/ag-grid-modal/utils.d.ts +2 -2
- package/es/src/business/ag-grid-modal/utils.mjs +2 -2
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +19 -19
- package/es/src/business/ap-batch-action-group/interface.d.ts +4 -1
- package/es/src/index.mjs +194 -192
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
- package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
- package/lib/src/ap-field/index.d.ts +10 -2
- package/lib/src/ap-field/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +11 -0
- package/lib/src/ap-field/second/helper.d.ts +7 -0
- package/lib/src/ap-field/second/helper.js +1 -0
- package/lib/src/ap-field/second/index.vue.d.ts +44 -0
- package/lib/src/ap-field/second/index.vue.js +1 -0
- package/lib/src/ap-field/second/index.vue2.js +1 -0
- package/lib/src/ap-field/second/read.vue.d.ts +6 -0
- package/lib/src/ap-field/second/read.vue.js +1 -0
- package/lib/src/ap-field/second/read.vue2.js +1 -0
- package/lib/src/ap-field/style/textarea.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue.d.ts +3 -0
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/utils.d.ts +1 -0
- package/lib/src/ap-field/text-area/utils.js +1 -0
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -0
- package/lib/src/ap-table/constants.d.ts +9 -0
- package/lib/src/business/ag-grid-modal/interface.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/utils.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/utils.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/interface.d.ts +4 -1
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1896,6 +1896,9 @@ export declare const apTableFormItemMap: {
|
|
|
1896
1896
|
"update:value": (...args: any[]) => void;
|
|
1897
1897
|
}, PublicProps, {
|
|
1898
1898
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
|
|
1899
|
+
code: boolean | {
|
|
1900
|
+
language?: "text" | "json";
|
|
1901
|
+
};
|
|
1899
1902
|
mode: FieldMode;
|
|
1900
1903
|
disabled: boolean;
|
|
1901
1904
|
bordered: boolean;
|
|
@@ -2186,6 +2189,9 @@ export declare const apTableFormItemMap: {
|
|
|
2186
2189
|
resizableTextArea: any;
|
|
2187
2190
|
}, {}, {}, {}, {
|
|
2188
2191
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
|
|
2192
|
+
code: boolean | {
|
|
2193
|
+
language?: "text" | "json";
|
|
2194
|
+
};
|
|
2189
2195
|
mode: FieldMode;
|
|
2190
2196
|
disabled: boolean;
|
|
2191
2197
|
bordered: boolean;
|
|
@@ -3427,6 +3433,9 @@ export declare const apTableRenderItemMap: {
|
|
|
3427
3433
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
3428
3434
|
textArea: DefineComponent<ApFieldTextAreaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextAreaProps> & Readonly<{}>, {
|
|
3429
3435
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
|
|
3436
|
+
code: boolean | {
|
|
3437
|
+
language?: "text" | "json";
|
|
3438
|
+
};
|
|
3430
3439
|
mode: FieldMode;
|
|
3431
3440
|
disabled: boolean;
|
|
3432
3441
|
bordered: boolean;
|
|
@@ -97,8 +97,8 @@ export interface SelectModalReturnType<T = any> {
|
|
|
97
97
|
updateProps: UpdateSelectPropsFn<T>;
|
|
98
98
|
}
|
|
99
99
|
export interface RequestReturn<T = any> {
|
|
100
|
-
records
|
|
101
|
-
total
|
|
100
|
+
records?: T[];
|
|
101
|
+
total?: number;
|
|
102
102
|
}
|
|
103
103
|
/** open打开方法返回的值的类型 */
|
|
104
104
|
export interface OpenReturnType<RowType> {
|
|
@@ -3,8 +3,8 @@ import { GetRowKey, ModalLayoutConfig, RequestReturn } from './interface';
|
|
|
3
3
|
import { VNodeChild, StyleValue } from 'vue';
|
|
4
4
|
export declare function genRequest(api: ((params: any) => Promise<RequestReturn<any>>) | undefined, gerRowKey: GetRowKey<any>, callback?: (length: number) => void): {
|
|
5
5
|
request: (params: any) => Promise<{
|
|
6
|
-
data: any[];
|
|
7
|
-
total: number;
|
|
6
|
+
data: any[] | undefined;
|
|
7
|
+
total: number | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
setExtraParams: (params?: Recordable) => void;
|
|
10
10
|
};
|
|
@@ -11,8 +11,8 @@ function m(e, t, r) {
|
|
|
11
11
|
};
|
|
12
12
|
n && (s = Object.assign(s, n));
|
|
13
13
|
const { records: l, total: u } = await i(Object.assign({}, s));
|
|
14
|
-
return r?.(l
|
|
15
|
-
data: l
|
|
14
|
+
return r?.(l?.length || 0), {
|
|
15
|
+
data: l?.map((c) => h(c, t)),
|
|
16
16
|
total: u
|
|
17
17
|
};
|
|
18
18
|
}, setExtraParams: (s) => {
|
|
@@ -16,7 +16,7 @@ const Y = ["onClick"], de = /* @__PURE__ */ O({
|
|
|
16
16
|
__name: "ap-appendix",
|
|
17
17
|
props: {
|
|
18
18
|
fileList: {},
|
|
19
|
-
needName: { type: [Boolean, Object], default:
|
|
19
|
+
needName: { type: [Boolean, Object], default: void 0 },
|
|
20
20
|
getOssAccess: {},
|
|
21
21
|
title: {},
|
|
22
22
|
tooltip: {},
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { LoadingOutlined as
|
|
3
|
-
import { Menu as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as p, ref as m, createBlock as r, openBlock as o, unref as a, withCtx as d, createElementBlock as _, Fragment as u, renderList as v, mergeProps as w, createElementVNode as y, withDirectives as h, createVNode as k, vShow as b, resolveDynamicComponent as g, h as C } from "vue";
|
|
2
|
+
import { LoadingOutlined as R } from "@ant-design/icons-vue";
|
|
3
|
+
import { Menu as L, MenuItem as M } from "@aplus-frontend/antdv";
|
|
4
|
+
const B = { style: { display: "flex", "align-items": "center" } }, I = /* @__PURE__ */ p({
|
|
5
5
|
__name: "MenuItemGroup",
|
|
6
6
|
props: {
|
|
7
7
|
selectedRows: {},
|
|
8
8
|
buttonProps: {},
|
|
9
9
|
menuList: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
async function
|
|
14
|
-
const e =
|
|
11
|
+
setup(i) {
|
|
12
|
+
const l = i, t = m({});
|
|
13
|
+
async function f(s, c) {
|
|
14
|
+
const e = s?.id || c;
|
|
15
15
|
t.value[e] = !0;
|
|
16
16
|
try {
|
|
17
|
-
await
|
|
17
|
+
await s?.onClick?.({ selectedRows: l?.selectedRows });
|
|
18
18
|
} finally {
|
|
19
19
|
t.value[e] = void 0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
return (
|
|
23
|
-
default:
|
|
24
|
-
(o(!0), _(
|
|
22
|
+
return (s, c) => (o(), r(a(L), null, {
|
|
23
|
+
default: d(() => [
|
|
24
|
+
(o(!0), _(u, null, v(l.menuList, (e, n) => (o(), r(a(M), w({
|
|
25
25
|
key: e?.id || n
|
|
26
26
|
}, { ref_for: !0 }, {
|
|
27
27
|
...e,
|
|
28
|
-
onClick: () =>
|
|
29
|
-
disabled: t.value[e?.id || n] ?? e?.disabled ?? !1
|
|
28
|
+
onClick: () => f(e, n),
|
|
29
|
+
disabled: t.value[e?.id || n] ?? (typeof e?.disabled == "function" ? e?.disabled({ selectedRows: l?.selectedRows }) : e?.disabled) ?? !1
|
|
30
30
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
y("div",
|
|
33
|
-
k(
|
|
34
|
-
[
|
|
31
|
+
default: d(() => [
|
|
32
|
+
y("div", B, [
|
|
33
|
+
h(k(a(R), { style: { "margin-right": "10px" } }, null, 512), [
|
|
34
|
+
[b, t.value[e?.id || n]]
|
|
35
35
|
]),
|
|
36
|
-
(o(),
|
|
36
|
+
(o(), r(g(C(u, [e?.content]))))
|
|
37
37
|
])
|
|
38
38
|
]),
|
|
39
39
|
_: 2
|
|
@@ -18,7 +18,7 @@ export type ApBatchActionGroupPropsKeys = keyof ApBatchActionGroupTypeProps;
|
|
|
18
18
|
export type ApBatchActionGroupButtonProps<T extends ApBatchActionGroupPropsKeys = ApBatchActionGroupPropsKeys> = T extends ApBatchActionGroupPropsKeys ? {
|
|
19
19
|
dropdownType?: T;
|
|
20
20
|
} & ApBatchActionGroupTypeProps[T] : never;
|
|
21
|
-
export type ApBatchActionGroupMenuProps<RecordType = any> = Omit<MenuItemProps, 'title' | 'icon' | 'role' | 'originItemValue' | 'onClick'> & {
|
|
21
|
+
export type ApBatchActionGroupMenuProps<RecordType = any> = Omit<MenuItemProps, 'title' | 'icon' | 'role' | 'originItemValue' | 'onClick' | 'disabled'> & {
|
|
22
22
|
content?: VNodeChild;
|
|
23
23
|
onClick?: (item?: {
|
|
24
24
|
selectedRows?: RecordType[];
|
|
@@ -27,6 +27,9 @@ export type ApBatchActionGroupMenuProps<RecordType = any> = Omit<MenuItemProps,
|
|
|
27
27
|
ifShow?: (item?: {
|
|
28
28
|
selectedRows?: RecordType[];
|
|
29
29
|
}) => boolean;
|
|
30
|
+
disabled?: boolean | ((item?: {
|
|
31
|
+
selectedRows?: RecordType[];
|
|
32
|
+
}) => boolean);
|
|
30
33
|
};
|
|
31
34
|
export type ApBatchActionGroupProps<RecordType = any> = {
|
|
32
35
|
/**
|