@aplus-frontend/ui 6.22.2 → 6.24.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 +235 -234
- package/es/src/ag-grid/components/body-cell/index.vue2.mjs +2 -1
- package/es/src/ag-grid/hooks/use-columns-def.d.ts +13 -0
- package/es/src/ag-grid/hooks/use-columns-def.mjs +140 -0
- package/es/src/ag-grid/hooks/use-columns.d.ts +9 -0
- package/es/src/ag-grid/hooks/use-columns.mjs +26 -0
- package/es/src/ag-grid/index.vue.mjs +258 -315
- package/es/src/ag-grid/interface.d.ts +13 -1
- package/es/src/ag-grid/renderer/checkbox.d.ts +2 -0
- package/es/src/ag-grid/renderer/checkbox.mjs +8 -0
- package/es/src/ag-grid/renderer/date-range.d.ts +2 -0
- package/es/src/ag-grid/renderer/date-range.mjs +15 -0
- package/es/src/ag-grid/renderer/date.d.ts +2 -0
- package/es/src/ag-grid/renderer/date.mjs +19 -0
- package/es/src/ag-grid/renderer/index.d.ts +26 -0
- package/es/src/ag-grid/renderer/index.mjs +40 -0
- package/es/src/ag-grid/renderer/number.d.ts +2 -0
- package/es/src/ag-grid/renderer/number.mjs +13 -0
- package/es/src/ag-grid/renderer/password.d.ts +2 -0
- package/es/src/ag-grid/renderer/password.mjs +6 -0
- package/es/src/ag-grid/renderer/radio.d.ts +2 -0
- package/es/src/ag-grid/renderer/radio.mjs +18 -0
- package/es/src/ag-grid/renderer/rate.d.ts +2 -0
- package/es/src/ag-grid/renderer/segmented.d.ts +2 -0
- package/es/src/ag-grid/renderer/select.d.ts +2 -0
- package/es/src/ag-grid/renderer/select.mjs +20 -0
- package/es/src/ag-grid/renderer/slider.d.ts +2 -0
- package/es/src/ag-grid/renderer/switch.d.ts +2 -0
- package/es/src/ag-grid/renderer/switch.mjs +7 -0
- package/es/src/ag-grid/renderer/text-area.d.ts +2 -0
- package/es/src/ag-grid/renderer/text-area.mjs +7 -0
- package/es/src/ag-grid/renderer/text.d.ts +2 -0
- package/es/src/ag-grid/renderer/text.mjs +8 -0
- package/es/src/ag-grid/renderer/tree-select.d.ts +2 -0
- package/es/src/ag-grid/renderer/tree-select.mjs +20 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +49 -47
- package/es/src/ap-field/checkbox/read.vue.d.ts +11 -0
- package/es/src/ap-field/checkbox/read.vue.mjs +4 -0
- package/es/src/ap-field/checkbox/read.vue2.mjs +37 -0
- package/es/src/ap-field/date/read.vue.d.ts +9 -0
- package/es/src/ap-field/date/read.vue.mjs +4 -0
- package/es/src/ap-field/date/read.vue2.mjs +102 -0
- package/es/src/ap-field/date-range/read.vue.d.ts +9 -0
- package/es/src/ap-field/date-range/read.vue.mjs +4 -0
- package/es/src/ap-field/date-range/read.vue2.mjs +121 -0
- package/es/src/ap-field/index.d.ts +99 -0
- package/es/src/ap-field/index.mjs +75 -40
- package/es/src/ap-field/number/read.vue.d.ts +23 -0
- package/es/src/ap-field/number/read.vue.mjs +4 -0
- package/es/src/ap-field/number/read.vue2.mjs +80 -0
- package/es/src/ap-field/radio/read.vue.d.ts +10 -0
- package/es/src/ap-field/radio/read.vue.mjs +4 -0
- package/es/src/ap-field/radio/read.vue2.mjs +42 -0
- package/es/src/ap-field/select/read.vue.d.ts +6 -0
- package/es/src/ap-field/select/read.vue.mjs +4 -0
- package/es/src/ap-field/select/read.vue2.mjs +118 -0
- package/es/src/ap-field/switch/read.vue.d.ts +11 -0
- package/es/src/ap-field/switch/read.vue.mjs +4 -0
- package/es/src/ap-field/switch/read.vue2.mjs +58 -0
- package/es/src/ap-field/text/read-password.vue.d.ts +16 -0
- package/es/src/ap-field/text/read-password.vue.mjs +4 -0
- package/es/src/ap-field/text/read-password.vue2.mjs +82 -0
- package/es/src/ap-field/text/read.vue.d.ts +13 -0
- package/es/src/ap-field/text/read.vue.mjs +4 -0
- package/es/src/ap-field/text/read.vue2.mjs +63 -0
- package/es/src/ap-field/text-area/read.vue.d.ts +13 -0
- package/es/src/ap-field/text-area/read.vue.mjs +4 -0
- package/es/src/ap-field/text-area/read.vue2.mjs +69 -0
- package/es/src/ap-field/tree-select/read.vue.d.ts +8 -0
- package/es/src/ap-field/tree-select/read.vue.mjs +4 -0
- package/es/src/ap-field/tree-select/read.vue2.mjs +182 -0
- package/es/src/ap-grid/utils/col.d.ts +2 -1
- package/es/src/ap-grid/utils/col.mjs +69 -69
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +11 -1
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +159 -117
- package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +11 -1
- package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +59 -42
- package/es/src/ap-pro-card/interface.d.ts +30 -0
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +36 -54
- package/es/src/ap-table/constants.d.ts +29 -2415
- package/es/src/ap-table/constants.mjs +41 -52
- package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +11 -10
- package/es/src/index.mjs +285 -284
- package/es/src/utils/copy.d.ts +3 -0
- package/es/src/utils/copy.mjs +21 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.d.ts +13 -0
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -0
- package/lib/src/ag-grid/hooks/use-columns.d.ts +9 -0
- package/lib/src/ag-grid/hooks/use-columns.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +13 -1
- package/lib/src/ag-grid/renderer/checkbox.d.ts +2 -0
- package/lib/src/ag-grid/renderer/checkbox.js +1 -0
- package/lib/src/ag-grid/renderer/date-range.d.ts +2 -0
- package/lib/src/ag-grid/renderer/date-range.js +1 -0
- package/lib/src/ag-grid/renderer/date.d.ts +2 -0
- package/lib/src/ag-grid/renderer/date.js +1 -0
- package/lib/src/ag-grid/renderer/index.d.ts +26 -0
- package/lib/src/ag-grid/renderer/index.js +1 -0
- package/lib/src/ag-grid/renderer/number.d.ts +2 -0
- package/lib/src/ag-grid/renderer/number.js +1 -0
- package/lib/src/ag-grid/renderer/password.d.ts +2 -0
- package/lib/src/ag-grid/renderer/password.js +1 -0
- package/lib/src/ag-grid/renderer/radio.d.ts +2 -0
- package/lib/src/ag-grid/renderer/radio.js +1 -0
- package/lib/src/ag-grid/renderer/rate.d.ts +2 -0
- package/lib/src/ag-grid/renderer/segmented.d.ts +2 -0
- package/lib/src/ag-grid/renderer/select.d.ts +2 -0
- package/lib/src/ag-grid/renderer/select.js +1 -0
- package/lib/src/ag-grid/renderer/slider.d.ts +2 -0
- package/lib/src/ag-grid/renderer/switch.d.ts +2 -0
- package/lib/src/ag-grid/renderer/switch.js +1 -0
- package/lib/src/ag-grid/renderer/text-area.d.ts +2 -0
- package/lib/src/ag-grid/renderer/text-area.js +1 -0
- package/lib/src/ag-grid/renderer/text.d.ts +2 -0
- package/lib/src/ag-grid/renderer/text.js +1 -0
- package/lib/src/ag-grid/renderer/tree-select.d.ts +2 -0
- package/lib/src/ag-grid/renderer/tree-select.js +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue.d.ts +11 -0
- package/lib/src/ap-field/checkbox/read.vue.js +1 -0
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -0
- package/lib/src/ap-field/date/read.vue.d.ts +9 -0
- package/lib/src/ap-field/date/read.vue.js +1 -0
- package/lib/src/ap-field/date/read.vue2.js +1 -0
- package/lib/src/ap-field/date-range/read.vue.d.ts +9 -0
- package/lib/src/ap-field/date-range/read.vue.js +1 -0
- package/lib/src/ap-field/date-range/read.vue2.js +1 -0
- package/lib/src/ap-field/index.d.ts +99 -0
- package/lib/src/ap-field/index.js +1 -1
- package/lib/src/ap-field/number/read.vue.d.ts +23 -0
- package/lib/src/ap-field/number/read.vue.js +1 -0
- package/lib/src/ap-field/number/read.vue2.js +1 -0
- package/lib/src/ap-field/radio/read.vue.d.ts +10 -0
- package/lib/src/ap-field/radio/read.vue.js +1 -0
- package/lib/src/ap-field/radio/read.vue2.js +1 -0
- package/lib/src/ap-field/select/read.vue.d.ts +6 -0
- package/lib/src/ap-field/select/read.vue.js +1 -0
- package/lib/src/ap-field/select/read.vue2.js +1 -0
- package/lib/src/ap-field/switch/read.vue.d.ts +11 -0
- package/lib/src/ap-field/switch/read.vue.js +1 -0
- package/lib/src/ap-field/switch/read.vue2.js +1 -0
- package/lib/src/ap-field/text/read-password.vue.d.ts +16 -0
- package/lib/src/ap-field/text/read-password.vue.js +1 -0
- package/lib/src/ap-field/text/read-password.vue2.js +1 -0
- package/lib/src/ap-field/text/read.vue.d.ts +13 -0
- package/lib/src/ap-field/text/read.vue.js +1 -0
- package/lib/src/ap-field/text/read.vue2.js +1 -0
- package/lib/src/ap-field/text-area/read.vue.d.ts +13 -0
- package/lib/src/ap-field/text-area/read.vue.js +1 -0
- package/lib/src/ap-field/text-area/read.vue2.js +1 -0
- package/lib/src/ap-field/tree-select/read.vue.d.ts +8 -0
- package/lib/src/ap-field/tree-select/read.vue.js +1 -0
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -0
- package/lib/src/ap-grid/utils/col.d.ts +2 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +11 -1
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +11 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/interface.d.ts +30 -0
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +29 -2415
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/utils/copy.d.ts +3 -0
- package/lib/src/utils/copy.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ag-grid/index.css +6 -0
- package/theme/ag-grid/index.less +6 -0
- package/theme/ap-pro-card/index.css +32 -4
- package/theme/ap-pro-card/index.less +32 -4
- package/theme/ap-tag/ap-tag.css +5 -2
- package/theme/ap-tag/ap-tag.less +5 -2
- package/theme/index.css +43 -6
|
@@ -13,6 +13,10 @@ export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
|
|
|
13
13
|
*/
|
|
14
14
|
span?: number;
|
|
15
15
|
tooltip?: string | ((column: AgGridColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>) => VNode);
|
|
16
|
+
/**
|
|
17
|
+
* 内容区自定义单元格tooltip
|
|
18
|
+
*/
|
|
19
|
+
bodyCellTooltip?: string | ((value: any, record: RecordType) => string);
|
|
16
20
|
/**
|
|
17
21
|
* 是否可以复制
|
|
18
22
|
*/
|
|
@@ -21,7 +25,7 @@ export type AgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueTyp
|
|
|
21
25
|
* 配置溢出隐藏的方式
|
|
22
26
|
* @description 如果传递数字,则表示需要满足溢出隐藏的行数,此时默认会显示tooltip
|
|
23
27
|
*/
|
|
24
|
-
ellipsis?: number | boolean | 'ellipsis' | '
|
|
28
|
+
ellipsis?: number | boolean | 'ellipsis' | 'tooltip';
|
|
25
29
|
/**
|
|
26
30
|
* 是否搜索表单中隐藏
|
|
27
31
|
*/
|
|
@@ -204,6 +208,14 @@ export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
204
208
|
* 指定每一行占据的高度(大量数据展示时的性能优化)
|
|
205
209
|
*/
|
|
206
210
|
rowHeight?: number;
|
|
211
|
+
/**
|
|
212
|
+
* 是否使用另外一种渲染器来渲染单元格
|
|
213
|
+
*/
|
|
214
|
+
advanceRenderer?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* 单元格tooltip使用原生实现 默认为 `false`
|
|
217
|
+
*/
|
|
218
|
+
browserTooltips?: boolean;
|
|
207
219
|
};
|
|
208
220
|
export type AgGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
209
221
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getOptionValue as o, getOptionLabel as l } from "../../ap-field/checkbox/helper.mjs";
|
|
2
|
+
function u(e) {
|
|
3
|
+
var n, i;
|
|
4
|
+
return !((n = e.value) != null && n.length) || !((i = e.options) != null && i.length) ? e.emptyText || "--" : e.options.filter((t) => e.value.indexOf(o(t)) > -1).map((t) => l(t)).join("、");
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
u as checkboxRenderer
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getTimeFormatToZone as m } from "@aplus-frontend/utils";
|
|
2
|
+
import n from "dayjs";
|
|
3
|
+
import { isArray as c, isString as s } from "lodash-unified";
|
|
4
|
+
import { ApFieldDatePresetFormats as F, PRESET_FORMAT_MAP as T } from "../../ap-field/date/constant.mjs";
|
|
5
|
+
function A(t) {
|
|
6
|
+
var a;
|
|
7
|
+
const e = t.value;
|
|
8
|
+
if (!(e != null && e.length))
|
|
9
|
+
return t.emptyText || "--";
|
|
10
|
+
const r = c(t.timezone) ? (a = t.timezone[0]) == null ? void 0 : a.value : t.timezone, i = r ? m(e[0], r) : e[0], f = r ? m(e[1], r) : e[1], o = F.indexOf(t.format) > -1 ? T[t.format] : t.format, d = s(t.readModeSeparator) ? t.readModeSeparator : "~";
|
|
11
|
+
return `${n(i).format(o)}${d}${n(f).format(o)}`;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
A as dateRangeRenderer
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getTimeFormatToZone as o } from "@aplus-frontend/utils";
|
|
2
|
+
import r from "dayjs";
|
|
3
|
+
import { isNil as n, isArray as f } from "lodash-unified";
|
|
4
|
+
import { ApFieldDatePresetFormats as l, PRESET_FORMAT_MAP as u } from "../../ap-field/date/constant.mjs";
|
|
5
|
+
function P(e) {
|
|
6
|
+
var m;
|
|
7
|
+
if (n(e.value))
|
|
8
|
+
return e.emptyText || "--";
|
|
9
|
+
let t = r(e.value);
|
|
10
|
+
if (e.timezone) {
|
|
11
|
+
const a = f(e.timezone) ? (m = e.timezone[0]) == null ? void 0 : m.value : e.timezone;
|
|
12
|
+
t = r(o(e.value, a));
|
|
13
|
+
}
|
|
14
|
+
const i = l.indexOf(e.format) > -1 ? u[e.format] : e.format;
|
|
15
|
+
return t.format(i);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
P as dateRenderer
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { dateRenderer } from './date';
|
|
2
|
+
import { dateRangeRenderer } from './date-range';
|
|
3
|
+
import { numberRenderer } from './number';
|
|
4
|
+
import { radioRenderer } from './radio';
|
|
5
|
+
import { selectRenderer } from './select';
|
|
6
|
+
import { switchRenderer } from './switch';
|
|
7
|
+
import { textRenderer } from './text';
|
|
8
|
+
import { textAreaRenderer } from './text-area';
|
|
9
|
+
import { checkboxRenderer } from './checkbox';
|
|
10
|
+
import { passwordRenderer } from './password';
|
|
11
|
+
import { treeSelectRenderer } from './tree-select';
|
|
12
|
+
export declare const rendererMap: {
|
|
13
|
+
readonly date: typeof dateRenderer;
|
|
14
|
+
readonly dateRange: typeof dateRangeRenderer;
|
|
15
|
+
readonly number: typeof numberRenderer;
|
|
16
|
+
readonly radio: typeof radioRenderer;
|
|
17
|
+
readonly select: typeof selectRenderer;
|
|
18
|
+
readonly switch: typeof switchRenderer;
|
|
19
|
+
readonly text: typeof textRenderer;
|
|
20
|
+
readonly textArea: typeof textAreaRenderer;
|
|
21
|
+
readonly checkbox: typeof checkboxRenderer;
|
|
22
|
+
readonly password: typeof passwordRenderer;
|
|
23
|
+
readonly treeSelect: typeof treeSelectRenderer;
|
|
24
|
+
};
|
|
25
|
+
export type SupportedValueType = keyof typeof rendererMap;
|
|
26
|
+
export declare const supportedValueTypeList: SupportedValueType[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { dateRenderer as e } from "./date.mjs";
|
|
2
|
+
import { dateRangeRenderer as r } from "./date-range.mjs";
|
|
3
|
+
import { numberRenderer as t } from "./number.mjs";
|
|
4
|
+
import { radioRenderer as o } from "./radio.mjs";
|
|
5
|
+
import { selectRenderer as d } from "./select.mjs";
|
|
6
|
+
import { switchRenderer as m } from "./switch.mjs";
|
|
7
|
+
import { textRenderer as a } from "./text.mjs";
|
|
8
|
+
import { textAreaRenderer as n } from "./text-area.mjs";
|
|
9
|
+
import { checkboxRenderer as p } from "./checkbox.mjs";
|
|
10
|
+
import { passwordRenderer as i } from "./password.mjs";
|
|
11
|
+
import { treeSelectRenderer as c } from "./tree-select.mjs";
|
|
12
|
+
const A = {
|
|
13
|
+
date: e,
|
|
14
|
+
dateRange: r,
|
|
15
|
+
number: t,
|
|
16
|
+
radio: o,
|
|
17
|
+
select: d,
|
|
18
|
+
switch: m,
|
|
19
|
+
text: a,
|
|
20
|
+
textArea: n,
|
|
21
|
+
checkbox: p,
|
|
22
|
+
password: i,
|
|
23
|
+
treeSelect: c
|
|
24
|
+
}, S = [
|
|
25
|
+
"date",
|
|
26
|
+
"dateRange",
|
|
27
|
+
"number",
|
|
28
|
+
"radio",
|
|
29
|
+
"select",
|
|
30
|
+
"switch",
|
|
31
|
+
"text",
|
|
32
|
+
"textArea",
|
|
33
|
+
"checkbox",
|
|
34
|
+
"password",
|
|
35
|
+
"treeSelect"
|
|
36
|
+
];
|
|
37
|
+
export {
|
|
38
|
+
A as rendererMap,
|
|
39
|
+
S as supportedValueTypeList
|
|
40
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { roundWith as c, toDecimalMark as f } from "@fruits-chain/utils";
|
|
2
|
+
import { isNil as l, isString as n } from "lodash-unified";
|
|
3
|
+
import { addZeroToDecimalPlaces as m } from "../../ap-field/number/helper.mjs";
|
|
4
|
+
function v(e) {
|
|
5
|
+
if (l(e.value))
|
|
6
|
+
return e.emptyText || "--";
|
|
7
|
+
const r = n(e.prefix) ? `${e.prefix} ` : "", a = n(e.addonAfter) ? ` ${e.addonAfter}` : "", t = e.precision ? c(e.value, e.precision) : e.value;
|
|
8
|
+
let i = e.thousands ? f(t) : String(t);
|
|
9
|
+
return e.precision && e.limitDecimalsRetain && (i = m(i, e.precision)), `${r}${i}${a}`;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
v as numberRenderer
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNil as a, isString as l } from "lodash-unified";
|
|
2
|
+
import { getOptionValue as u, getOptionLabel as f } from "../../ap-field/radio/helper.mjs";
|
|
3
|
+
function g(t) {
|
|
4
|
+
var r;
|
|
5
|
+
const e = t.emptyText || "--";
|
|
6
|
+
if (a(t.value))
|
|
7
|
+
return e;
|
|
8
|
+
const i = (r = t.options) == null ? void 0 : r.find(
|
|
9
|
+
(o) => t.value === u(o)
|
|
10
|
+
);
|
|
11
|
+
if (!i)
|
|
12
|
+
return e;
|
|
13
|
+
const n = f(i);
|
|
14
|
+
return l(n) ? n : "";
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
g as radioRenderer
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isNil as c, isArray as s } from "lodash-unified";
|
|
2
|
+
function v(e) {
|
|
3
|
+
var f, m;
|
|
4
|
+
const l = e.value, n = e.emptyText || "--";
|
|
5
|
+
if (c(l))
|
|
6
|
+
return n;
|
|
7
|
+
const a = ((f = e.fieldNames) == null ? void 0 : f.label) || "label", o = ((m = e.fieldNames) == null ? void 0 : m.value) || "value";
|
|
8
|
+
if (s(l))
|
|
9
|
+
return l.map(
|
|
10
|
+
(i) => {
|
|
11
|
+
var r;
|
|
12
|
+
return (r = e.options.find((u) => u[o] === i)) == null ? void 0 : r[a];
|
|
13
|
+
}
|
|
14
|
+
).filter(Boolean).join("、") || n;
|
|
15
|
+
const t = e.options.find((i) => i[o] === l);
|
|
16
|
+
return (t == null ? void 0 : t[a]) || n;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
v as selectRenderer
|
|
20
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isNil as d, isString as c } from "lodash-unified";
|
|
2
|
+
function n(e) {
|
|
3
|
+
return d(e.checked) ? e.emptyText || "--" : e.checked === e.checkedValue ? c(e.checkedChildren) ? e.checkedChildren : String(e.checkedValue) : c(e.unCheckedChildren) ? e.unCheckedChildren : e.unCheckedValue;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
n as switchRenderer
|
|
7
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isArray as h, isString as m } from "lodash-unified";
|
|
2
|
+
function b(e) {
|
|
3
|
+
var f, c;
|
|
4
|
+
const r = e.value, i = e.emptyText || "--", l = h(r) ? r : [r].filter(Boolean);
|
|
5
|
+
if (!l.length)
|
|
6
|
+
return i;
|
|
7
|
+
const t = [], u = ((f = e.fieldNames) == null ? void 0 : f.label) || "label", d = ((c = e.fieldNames) == null ? void 0 : c.value) || "value";
|
|
8
|
+
function o(a) {
|
|
9
|
+
var s;
|
|
10
|
+
for (const n of a) {
|
|
11
|
+
if (l.find((g) => g === n[d]) && t.push(n[u]), t.length === l.length)
|
|
12
|
+
return;
|
|
13
|
+
(s = n.children) != null && s.length && o(n.children);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return o(e.treeData), t.length ? t.filter((a) => m(a)).join("、") : i;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
b as treeSelectRenderer
|
|
20
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as B, createElementBlock as
|
|
1
|
+
import { defineComponent as B, createElementBlock as a, openBlock as l, normalizeStyle as E, normalizeClass as d, unref as r, createVNode as _, mergeProps as w, withCtx as b, Fragment as i, renderList as A, createCommentVNode as M, createBlock as c, h as u, renderSlot as j, resolveDynamicComponent as z } from "vue";
|
|
2
2
|
import { Descriptions as F, DescriptionsItem as m } from "@aplus-frontend/antdv";
|
|
3
3
|
import { mixinsAttachmentExtraProps as G, transformValue as L, isEmptyWithType as R } from "./helper.mjs";
|
|
4
4
|
import { get as S } from "lodash-unified";
|
|
5
5
|
import "./help-message/index.vue.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useGlobalConfig as
|
|
7
|
+
import { useGlobalConfig as y } from "../config-provider/hooks/use-global-config.mjs";
|
|
8
8
|
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import I from "./help-message/index.vue2.mjs";
|
|
10
10
|
const O = { key: 0 }, Z = /* @__PURE__ */ B({
|
|
@@ -18,21 +18,21 @@ const O = { key: 0 }, Z = /* @__PURE__ */ B({
|
|
|
18
18
|
className: {}
|
|
19
19
|
},
|
|
20
20
|
setup(g) {
|
|
21
|
-
const n = g, v =
|
|
21
|
+
const n = g, v = y("uiMode", "admin"), C = y("apDescriptions"), k = y("downloadCenterTriggerConfig"), { m: P, b: D, be: N } = $("ap-descriptions"), T = (e = {}) => {
|
|
22
22
|
var s;
|
|
23
23
|
let o = "";
|
|
24
24
|
return ((s = n.descriptionsProps) == null ? void 0 : s.layout) === "vertical" && (o = "start"), {
|
|
25
25
|
justifyContent: o,
|
|
26
26
|
...e
|
|
27
27
|
};
|
|
28
|
-
},
|
|
29
|
-
var t,
|
|
28
|
+
}, f = (e) => {
|
|
29
|
+
var t, p;
|
|
30
30
|
const o = S(n.dataSource, e.field);
|
|
31
31
|
if (e.customRender)
|
|
32
32
|
return e.customRender(n.dataSource);
|
|
33
33
|
e.valueType === "attachment" && (e.extraProps = G(e.extraProps, {
|
|
34
34
|
fromConfig: (t = C.value) == null ? void 0 : t.downloadFile,
|
|
35
|
-
fromGlobal: (
|
|
35
|
+
fromGlobal: (p = k.value) == null ? void 0 : p.trigger
|
|
36
36
|
}));
|
|
37
37
|
const s = e.format ? e.format(o, n.dataSource || {}) : o;
|
|
38
38
|
return L({ value: s, record: n.dataSource }, e);
|
|
@@ -53,53 +53,55 @@ const O = { key: 0 }, Z = /* @__PURE__ */ B({
|
|
|
53
53
|
};
|
|
54
54
|
return (e, o) => {
|
|
55
55
|
var s;
|
|
56
|
-
return
|
|
57
|
-
class: d([e.className,
|
|
56
|
+
return l(), a("div", {
|
|
57
|
+
class: d([e.className, r(D)(), r(P)(r(v))]),
|
|
58
58
|
style: E(e.style)
|
|
59
59
|
}, [
|
|
60
|
-
_(
|
|
60
|
+
_(r(F), w(e.descriptionsProps, {
|
|
61
61
|
"label-style": T({ ...((s = e.descriptionsProps) == null ? void 0 : s.labelStyle) || {} })
|
|
62
62
|
}), {
|
|
63
63
|
default: b(() => [
|
|
64
|
-
(
|
|
65
|
-
key: t.field || "empty" +
|
|
64
|
+
(l(!0), a(i, null, A(e.schemas, (t, p) => (l(), a(i, {
|
|
65
|
+
key: t.field || "empty" + p
|
|
66
66
|
}, [
|
|
67
|
-
t
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
u(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
t.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
67
|
+
x(t) ? (l(), a(i, { key: 0 }, [
|
|
68
|
+
t.valueType === "empty" ? (l(), c(r(m), {
|
|
69
|
+
key: 0,
|
|
70
|
+
"content-style": t.contentStyle,
|
|
71
|
+
"label-style": t.labelStyle,
|
|
72
|
+
span: t.span
|
|
73
|
+
}, null, 8, ["content-style", "label-style", "span"])) : (l(), c(r(m), {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: d(V(t) ? r(N)("item", "ellipsis") : ""),
|
|
76
|
+
label: t.label ? u(i, [
|
|
77
|
+
u(I, {
|
|
78
|
+
helpMessage: t.helpMessage,
|
|
79
|
+
label: t.label
|
|
80
|
+
})
|
|
81
|
+
]) : null,
|
|
82
|
+
span: t.span,
|
|
83
|
+
"content-style": t.contentStyle,
|
|
84
|
+
"label-style": t.labelStyle
|
|
85
|
+
}, {
|
|
86
|
+
default: b(() => [
|
|
87
|
+
r(R)(r(S)(e.dataSource, t.field), t) ? (l(), a("span", O, "--")) : (l(), a(i, { key: 1 }, [
|
|
88
|
+
t.contentSlotName ? j(e.$slots, t.contentSlotName, {
|
|
89
|
+
key: 0,
|
|
90
|
+
index: p,
|
|
91
|
+
item: f(t),
|
|
92
|
+
record: e.dataSource
|
|
93
|
+
}) : (l(), c(z(
|
|
94
|
+
u(i, [
|
|
95
|
+
t.prefix,
|
|
96
|
+
f(t),
|
|
97
|
+
t.suffix
|
|
98
|
+
])
|
|
99
|
+
), { key: 1 }))
|
|
100
|
+
], 64))
|
|
101
|
+
]),
|
|
102
|
+
_: 2
|
|
103
|
+
}, 1032, ["class", "label", "span", "content-style", "label-style"]))
|
|
104
|
+
], 64)) : M("", !0)
|
|
103
105
|
], 64))), 128))
|
|
104
106
|
]),
|
|
105
107
|
_: 3
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApFieldCheckboxProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { FieldMode } from '..';
|
|
4
|
+
import { CheckboxOptionType } from '@aplus-frontend/antdv';
|
|
5
|
+
declare const _default: DefineComponent<ApFieldCheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldCheckboxProps> & Readonly<{}>, {
|
|
6
|
+
mode: FieldMode;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
options: (string | number | CheckboxOptionType)[];
|
|
9
|
+
emptyText: string;
|
|
10
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as d, createElementBlock as l, unref as a, openBlock as n, Fragment as p, createTextVNode as i, toDisplayString as r } from "vue";
|
|
2
|
+
import { isNil as m } from "lodash-unified";
|
|
3
|
+
import { getOptionValue as u, getOptionLabel as s } from "./helper.mjs";
|
|
4
|
+
const k = /* @__PURE__ */ d({
|
|
5
|
+
name: "ApFieldCheckboxRead",
|
|
6
|
+
__name: "read",
|
|
7
|
+
props: {
|
|
8
|
+
mode: { default: "edit" },
|
|
9
|
+
class: {},
|
|
10
|
+
style: {},
|
|
11
|
+
defaultValue: {},
|
|
12
|
+
value: {},
|
|
13
|
+
onChange: {},
|
|
14
|
+
"onUpdate:value": {},
|
|
15
|
+
name: {},
|
|
16
|
+
prefixCls: {},
|
|
17
|
+
options: { default: () => [] },
|
|
18
|
+
disabled: { type: Boolean, default: void 0 },
|
|
19
|
+
id: {},
|
|
20
|
+
emptyText: { default: "--" },
|
|
21
|
+
request: {},
|
|
22
|
+
vertical: { type: Boolean }
|
|
23
|
+
},
|
|
24
|
+
setup(f) {
|
|
25
|
+
return (e, y) => {
|
|
26
|
+
var o;
|
|
27
|
+
return a(m)(e.value) ? (n(), l(p, { key: 0 }, [
|
|
28
|
+
i(r(e.emptyText), 1)
|
|
29
|
+
], 64)) : (n(), l(p, { key: 1 }, [
|
|
30
|
+
i(r(((o = e.options) == null ? void 0 : o.filter((t) => e.value.indexOf(a(u)(t)) > -1).map((t) => a(s)(t)).join("、")) || e.emptyText), 1)
|
|
31
|
+
], 64));
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
k as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApFieldDateProps } from '../interface';
|
|
2
|
+
import { ApFormatPresetType } from './interface';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { LiteralUnion } from '../../type';
|
|
5
|
+
declare const _default: DefineComponent<ApFieldDateProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldDateProps> & Readonly<{}>, {
|
|
6
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
7
|
+
emptyText: string;
|
|
8
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent as u, computed as t, toDisplayString as i, unref as d } from "vue";
|
|
2
|
+
import n from "dayjs";
|
|
3
|
+
import { isNil as m } from "lodash-unified";
|
|
4
|
+
import { getTimeFormatToZone as c } from "@aplus-frontend/utils";
|
|
5
|
+
import { useDateTimezone as f } from "../hooks/use-date-timezone.mjs";
|
|
6
|
+
import { ApFieldDatePresetFormats as y, PRESET_FORMAT_MAP as B } from "./constant.mjs";
|
|
7
|
+
const T = /* @__PURE__ */ u({
|
|
8
|
+
name: "ApFieldDateRead",
|
|
9
|
+
__name: "read",
|
|
10
|
+
props: {
|
|
11
|
+
mode: {},
|
|
12
|
+
class: {},
|
|
13
|
+
style: {},
|
|
14
|
+
dropdownClassName: {},
|
|
15
|
+
dropdownAlign: {},
|
|
16
|
+
popupStyle: {},
|
|
17
|
+
transitionName: {},
|
|
18
|
+
placeholder: {},
|
|
19
|
+
allowClear: { type: Boolean },
|
|
20
|
+
autofocus: { type: Boolean },
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
tabindex: {},
|
|
23
|
+
open: { type: Boolean },
|
|
24
|
+
defaultOpen: { type: Boolean },
|
|
25
|
+
inputReadOnly: { type: Boolean },
|
|
26
|
+
id: {},
|
|
27
|
+
presets: {},
|
|
28
|
+
suffixIcon: { type: [Object, String, Number, Boolean, null, Array] },
|
|
29
|
+
clearIcon: { type: [Object, String, Number, Boolean, null, Array] },
|
|
30
|
+
getPopupContainer: {},
|
|
31
|
+
panelRender: {},
|
|
32
|
+
inputRender: {},
|
|
33
|
+
onOpenChange: {},
|
|
34
|
+
onPanelChange: {},
|
|
35
|
+
onFocus: {},
|
|
36
|
+
onBlur: {},
|
|
37
|
+
onMousedown: {},
|
|
38
|
+
onMouseup: {},
|
|
39
|
+
onMouseenter: {},
|
|
40
|
+
onMouseleave: {},
|
|
41
|
+
onClick: {},
|
|
42
|
+
onContextmenu: {},
|
|
43
|
+
onKeydown: {},
|
|
44
|
+
role: {},
|
|
45
|
+
name: {},
|
|
46
|
+
autocomplete: {},
|
|
47
|
+
direction: {},
|
|
48
|
+
showToday: { type: Boolean },
|
|
49
|
+
showTime: { type: Boolean },
|
|
50
|
+
picker: {},
|
|
51
|
+
prefixCls: {},
|
|
52
|
+
defaultPickerValue: {},
|
|
53
|
+
disabledDate: {},
|
|
54
|
+
dateRender: {},
|
|
55
|
+
monthCellRender: {},
|
|
56
|
+
renderExtraFooter: {},
|
|
57
|
+
onSelect: {},
|
|
58
|
+
locale: {},
|
|
59
|
+
size: {},
|
|
60
|
+
bordered: { type: Boolean },
|
|
61
|
+
showNow: { type: Boolean },
|
|
62
|
+
disabledTime: {},
|
|
63
|
+
defaultOpenValue: {},
|
|
64
|
+
showHour: { type: Boolean },
|
|
65
|
+
showMinute: { type: Boolean },
|
|
66
|
+
showSecond: { type: Boolean },
|
|
67
|
+
use12Hours: { type: Boolean },
|
|
68
|
+
hourStep: {},
|
|
69
|
+
minuteStep: {},
|
|
70
|
+
secondStep: {},
|
|
71
|
+
hideDisabledOptions: { type: Boolean },
|
|
72
|
+
disabledHours: {},
|
|
73
|
+
disabledMinutes: {},
|
|
74
|
+
disabledSeconds: {},
|
|
75
|
+
valueFormat: {},
|
|
76
|
+
emptyText: { default: "--" },
|
|
77
|
+
value: {},
|
|
78
|
+
defaultValue: {},
|
|
79
|
+
onChange: {},
|
|
80
|
+
onOk: {},
|
|
81
|
+
format: { default: "Y-D" },
|
|
82
|
+
shownFormat: {},
|
|
83
|
+
formatBegins: { type: Boolean },
|
|
84
|
+
timezone: {}
|
|
85
|
+
},
|
|
86
|
+
setup(l) {
|
|
87
|
+
const e = l, { currentTimezone: r } = f(e), p = t(
|
|
88
|
+
() => y.indexOf(e.format) > -1
|
|
89
|
+
), s = t(
|
|
90
|
+
() => p.value ? B[e.format] : e.format
|
|
91
|
+
), a = t(() => {
|
|
92
|
+
if (m(e.value))
|
|
93
|
+
return;
|
|
94
|
+
let o = n(e.value);
|
|
95
|
+
return e.timezone && (o = n(c(e.value, r.value))), o;
|
|
96
|
+
});
|
|
97
|
+
return (o, h) => i(a.value ? d(n)(a.value).format(s.value) : o.emptyText);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
T as default
|
|
102
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApFieldDateRangeProps } from '../interface';
|
|
2
|
+
import { ApFormatPresetType } from '../date/interface';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { LiteralUnion } from '../../type';
|
|
5
|
+
declare const _default: DefineComponent<ApFieldDateRangeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldDateRangeProps> & Readonly<{}>, {
|
|
6
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
7
|
+
emptyText: string;
|
|
8
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|