@aplus-frontend/ui 6.22.1 → 6.23.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/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/index.vue.mjs +1 -1
- 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/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/index.vue.js +1 -1
- 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/ap-tag/ap-tag.css +1 -0
- package/theme/ap-tag/ap-tag.less +1 -0
- package/theme/index.css +1 -0
|
@@ -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;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as h, computed as l, createElementBlock as c, openBlock as p, Fragment as y, createTextVNode as u, createBlock as g, toDisplayString as s, resolveDynamicComponent as w } from "vue";
|
|
2
|
+
import { isNil as C } from "lodash-unified";
|
|
3
|
+
import { useDateTimezone as S } from "../hooks/use-date-timezone.mjs";
|
|
4
|
+
import { getTimeFormatToZone as f } from "@aplus-frontend/utils";
|
|
5
|
+
import B from "dayjs";
|
|
6
|
+
import { ApFieldDatePresetFormats as O, PRESET_FORMAT_MAP as T } from "../date/constant.mjs";
|
|
7
|
+
const R = /* @__PURE__ */ h({
|
|
8
|
+
name: "ApFieldDateRangeRead",
|
|
9
|
+
__name: "read",
|
|
10
|
+
props: {
|
|
11
|
+
mode: {},
|
|
12
|
+
class: {},
|
|
13
|
+
style: {},
|
|
14
|
+
id: {},
|
|
15
|
+
defaultPickerValue: {},
|
|
16
|
+
placeholder: {},
|
|
17
|
+
disabled: { type: [Boolean, Array] },
|
|
18
|
+
disabledTime: {},
|
|
19
|
+
ranges: {},
|
|
20
|
+
separator: { type: [Object, String, Number, Boolean, null, Array] },
|
|
21
|
+
allowEmpty: {},
|
|
22
|
+
onCalendarChange: {},
|
|
23
|
+
onFocus: {},
|
|
24
|
+
onBlur: {},
|
|
25
|
+
onMousedown: {},
|
|
26
|
+
onMouseup: {},
|
|
27
|
+
onMouseenter: {},
|
|
28
|
+
onMouseleave: {},
|
|
29
|
+
onClick: {},
|
|
30
|
+
direction: {},
|
|
31
|
+
autocomplete: {},
|
|
32
|
+
activePickerIndex: {},
|
|
33
|
+
dateRender: {},
|
|
34
|
+
panelRender: {},
|
|
35
|
+
dropdownClassName: {},
|
|
36
|
+
dropdownAlign: {},
|
|
37
|
+
popupStyle: {},
|
|
38
|
+
transitionName: {},
|
|
39
|
+
allowClear: { type: Boolean },
|
|
40
|
+
autofocus: { type: Boolean },
|
|
41
|
+
tabindex: {},
|
|
42
|
+
open: { type: Boolean },
|
|
43
|
+
defaultOpen: { type: Boolean },
|
|
44
|
+
inputReadOnly: { type: Boolean },
|
|
45
|
+
suffixIcon: { type: [Object, String, Number, Boolean, null, Array] },
|
|
46
|
+
clearIcon: { type: [Object, String, Number, Boolean, null, Array] },
|
|
47
|
+
getPopupContainer: {},
|
|
48
|
+
inputRender: {},
|
|
49
|
+
onOpenChange: {},
|
|
50
|
+
onContextmenu: {},
|
|
51
|
+
onKeydown: {},
|
|
52
|
+
role: {},
|
|
53
|
+
name: {},
|
|
54
|
+
picker: {},
|
|
55
|
+
prefixCls: {},
|
|
56
|
+
disabledDate: {},
|
|
57
|
+
monthCellRender: {},
|
|
58
|
+
locale: {},
|
|
59
|
+
size: {},
|
|
60
|
+
bordered: { type: Boolean },
|
|
61
|
+
showTime: { type: Boolean },
|
|
62
|
+
showNow: { type: Boolean },
|
|
63
|
+
order: { type: Boolean },
|
|
64
|
+
defaultOpenValue: {},
|
|
65
|
+
showHour: { type: Boolean },
|
|
66
|
+
showMinute: { type: Boolean },
|
|
67
|
+
showSecond: { type: Boolean },
|
|
68
|
+
use12Hours: { type: Boolean },
|
|
69
|
+
hourStep: {},
|
|
70
|
+
minuteStep: {},
|
|
71
|
+
secondStep: {},
|
|
72
|
+
hideDisabledOptions: { type: Boolean },
|
|
73
|
+
disabledHours: {},
|
|
74
|
+
disabledMinutes: {},
|
|
75
|
+
disabledSeconds: {},
|
|
76
|
+
valueFormat: {},
|
|
77
|
+
emptyText: { default: "--" },
|
|
78
|
+
value: {},
|
|
79
|
+
defaultValue: {},
|
|
80
|
+
onChange: {},
|
|
81
|
+
onOk: {},
|
|
82
|
+
format: { default: "Y-D" },
|
|
83
|
+
shownFormat: {},
|
|
84
|
+
timezone: {},
|
|
85
|
+
readModeSeparator: {},
|
|
86
|
+
presets: { type: [Array, Boolean] }
|
|
87
|
+
},
|
|
88
|
+
setup(v) {
|
|
89
|
+
const e = v, { currentTimezone: n } = S(e), r = l(() => {
|
|
90
|
+
var a, m;
|
|
91
|
+
const o = e.value;
|
|
92
|
+
if (C(o) || !(o != null && o.length))
|
|
93
|
+
return o;
|
|
94
|
+
const i = n.value ? f(
|
|
95
|
+
e.value[0],
|
|
96
|
+
n.value
|
|
97
|
+
) : (a = e.value) == null ? void 0 : a[0], t = e.timezone ? f(
|
|
98
|
+
e.value[1],
|
|
99
|
+
n.value
|
|
100
|
+
) : (m = e.value) == null ? void 0 : m[1];
|
|
101
|
+
return [B(i), B(t)];
|
|
102
|
+
}), b = l(
|
|
103
|
+
() => O.indexOf(e.format) > -1
|
|
104
|
+
), d = l(
|
|
105
|
+
() => b.value ? T[e.format] : e.format
|
|
106
|
+
);
|
|
107
|
+
return (o, i) => {
|
|
108
|
+
var t, a;
|
|
109
|
+
return r.value ? (p(), c(y, { key: 0 }, [
|
|
110
|
+
u(s((t = r.value[0]) == null ? void 0 : t.format(d.value)) + " ", 1),
|
|
111
|
+
(p(), g(w(o.readModeSeparator))),
|
|
112
|
+
u(" " + s((a = r.value[1]) == null ? void 0 : a.format(d.value)), 1)
|
|
113
|
+
], 64)) : (p(), c(y, { key: 1 }, [
|
|
114
|
+
u(s(o.emptyText), 1)
|
|
115
|
+
], 64));
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
R as default
|
|
121
|
+
};
|
|
@@ -11,6 +11,11 @@ import { default as ApFieldSlider } from './slider/index.vue';
|
|
|
11
11
|
import { default as ApFieldSegmented } from './segmented/index.vue';
|
|
12
12
|
import { default as ApFieldRate } from './rate/index.vue';
|
|
13
13
|
import { default as ApFieldTreeSelect } from './tree-select/index.vue';
|
|
14
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
15
|
+
import { ApFieldTextProps, FieldMode, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldCheckboxProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTreeSelectProps, ApFieldTextPasswordProps } from './interface';
|
|
16
|
+
import { LiteralUnion } from '../type';
|
|
17
|
+
import { ApFormatPresetType } from './date/interface';
|
|
18
|
+
import { CheckboxOptionType } from '@aplus-frontend/antdv';
|
|
14
19
|
export type FieldType = {
|
|
15
20
|
Text: typeof ApFieldText;
|
|
16
21
|
TextArea: typeof ApFieldTextArea;
|
|
@@ -26,6 +31,100 @@ export type FieldType = {
|
|
|
26
31
|
Rate: typeof ApFieldRate;
|
|
27
32
|
TreeSelect: typeof ApFieldTreeSelect;
|
|
28
33
|
};
|
|
34
|
+
export declare const ApFieldRead: {
|
|
35
|
+
readonly Text: DefineComponent<ApFieldTextProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextProps> & Readonly<{}>, {
|
|
36
|
+
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
|
|
37
|
+
mode: FieldMode;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
bordered: boolean;
|
|
40
|
+
lazy: boolean;
|
|
41
|
+
allowClear: boolean;
|
|
42
|
+
emptyText: string;
|
|
43
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
44
|
+
readonly TextArea: DefineComponent<ApFieldTextAreaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextAreaProps> & Readonly<{}>, {
|
|
45
|
+
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
|
|
46
|
+
mode: FieldMode;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
bordered: boolean;
|
|
49
|
+
lazy: boolean;
|
|
50
|
+
allowClear: boolean;
|
|
51
|
+
emptyText: string;
|
|
52
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
53
|
+
readonly Number: {
|
|
54
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApFieldNumberProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
55
|
+
emptyText: string;
|
|
56
|
+
thousands: boolean;
|
|
57
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLSpanElement, ComponentProvideOptions, {
|
|
58
|
+
P: {};
|
|
59
|
+
B: {};
|
|
60
|
+
D: {};
|
|
61
|
+
C: {};
|
|
62
|
+
M: {};
|
|
63
|
+
Defaults: {};
|
|
64
|
+
}, Readonly< ApFieldNumberProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
65
|
+
emptyText: string;
|
|
66
|
+
thousands: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
__isFragment?: never;
|
|
69
|
+
__isTeleport?: never;
|
|
70
|
+
__isSuspense?: never;
|
|
71
|
+
} & ComponentOptionsBase<Readonly< ApFieldNumberProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
72
|
+
emptyText: string;
|
|
73
|
+
thousands: boolean;
|
|
74
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
75
|
+
$slots: {
|
|
76
|
+
prefix?(_: {}): any;
|
|
77
|
+
addonAfter?(_: {}): any;
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
readonly Date: DefineComponent<ApFieldDateProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldDateProps> & Readonly<{}>, {
|
|
81
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
82
|
+
emptyText: string;
|
|
83
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
84
|
+
readonly DateRange: DefineComponent<ApFieldDateRangeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldDateRangeProps> & Readonly<{}>, {
|
|
85
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
86
|
+
emptyText: string;
|
|
87
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
88
|
+
readonly Radio: DefineComponent<ApFieldRadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldRadioProps> & Readonly<{}>, {
|
|
89
|
+
mode: FieldMode;
|
|
90
|
+
vertical: boolean;
|
|
91
|
+
disabled: boolean;
|
|
92
|
+
emptyText: string;
|
|
93
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
94
|
+
readonly Checkbox: DefineComponent<ApFieldCheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldCheckboxProps> & Readonly<{}>, {
|
|
95
|
+
mode: FieldMode;
|
|
96
|
+
disabled: boolean;
|
|
97
|
+
options: (string | number | CheckboxOptionType)[];
|
|
98
|
+
emptyText: string;
|
|
99
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
100
|
+
readonly Select: DefineComponent<ApFieldSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldSelectProps> & Readonly<{}>, {
|
|
101
|
+
emptyText: string;
|
|
102
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
103
|
+
readonly Switch: DefineComponent<ApFieldSwitchProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldSwitchProps> & Readonly<{}>, {
|
|
104
|
+
size: "small" | "default";
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
loading: boolean;
|
|
107
|
+
checkedValue: string | number | boolean;
|
|
108
|
+
unCheckedValue: string | number | boolean;
|
|
109
|
+
emptyText: string;
|
|
110
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
111
|
+
readonly TreeSelect: DefineComponent<ApFieldTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTreeSelectProps> & Readonly<{}>, {
|
|
112
|
+
mode: FieldMode;
|
|
113
|
+
emptyText: string;
|
|
114
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
115
|
+
readonly Password: DefineComponent<ApFieldTextPasswordProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextPasswordProps> & Readonly<{}>, {
|
|
116
|
+
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
|
|
117
|
+
mode: FieldMode;
|
|
118
|
+
visible: boolean;
|
|
119
|
+
disabled: boolean;
|
|
120
|
+
bordered: boolean;
|
|
121
|
+
lazy: boolean;
|
|
122
|
+
allowClear: boolean;
|
|
123
|
+
emptyText: string;
|
|
124
|
+
action: string;
|
|
125
|
+
visibilityToggle: boolean;
|
|
126
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
127
|
+
};
|
|
29
128
|
export declare const ApField: FieldType;
|
|
30
129
|
export * from './interface';
|
|
31
130
|
export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect, ApFieldPassword, ApFieldSlider, ApFieldSegmented, ApFieldRate, ApFieldTreeSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApFieldText as
|
|
1
|
+
import { ApFieldText as m } from "./text/index.mjs";
|
|
2
2
|
import "./checkbox/index.vue2.mjs";
|
|
3
3
|
import "./date/index.vue2.mjs";
|
|
4
4
|
import "./number/index.vue2.mjs";
|
|
@@ -11,47 +11,82 @@ import "./slider/index.vue2.mjs";
|
|
|
11
11
|
import "./segmented/index.vue2.mjs";
|
|
12
12
|
import "./rate/index.vue2.mjs";
|
|
13
13
|
import "./tree-select/index.vue2.mjs";
|
|
14
|
+
import "./text/read.vue.mjs";
|
|
15
|
+
import "./text/read-password.vue.mjs";
|
|
16
|
+
import "./text-area/read.vue.mjs";
|
|
17
|
+
import "./number/read.vue.mjs";
|
|
18
|
+
import "./date/read.vue.mjs";
|
|
19
|
+
import "./date-range/read.vue.mjs";
|
|
20
|
+
import "./radio/read.vue.mjs";
|
|
21
|
+
import "./checkbox/read.vue.mjs";
|
|
22
|
+
import "./select/read.vue.mjs";
|
|
23
|
+
import "./switch/read.vue.mjs";
|
|
24
|
+
import "./tree-select/read.vue.mjs";
|
|
14
25
|
import "./interface.mjs";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import t from "./
|
|
19
|
-
import
|
|
20
|
-
import p from "./
|
|
21
|
-
import a from "./
|
|
22
|
-
import f from "./
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import c from "./
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
import i from "./text/read-password.vue2.mjs";
|
|
27
|
+
import r from "./tree-select/read.vue2.mjs";
|
|
28
|
+
import o from "./switch/read.vue2.mjs";
|
|
29
|
+
import t from "./select/read.vue2.mjs";
|
|
30
|
+
import e from "./checkbox/read.vue2.mjs";
|
|
31
|
+
import p from "./radio/read.vue2.mjs";
|
|
32
|
+
import a from "./date-range/read.vue2.mjs";
|
|
33
|
+
import f from "./date/read.vue2.mjs";
|
|
34
|
+
import _ from "./number/read.vue2.mjs";
|
|
35
|
+
import s from "./text-area/read.vue2.mjs";
|
|
36
|
+
import c from "./text/read.vue2.mjs";
|
|
37
|
+
import n from "./tree-select/index.vue.mjs";
|
|
38
|
+
import d from "./rate/index.vue.mjs";
|
|
39
|
+
import l from "./segmented/index.vue.mjs";
|
|
40
|
+
import $ from "./slider/index.vue.mjs";
|
|
41
|
+
import A from "./switch/index.vue.mjs";
|
|
42
|
+
import F from "./select/index.vue.mjs";
|
|
43
|
+
import S from "./checkbox/index.vue.mjs";
|
|
44
|
+
import x from "./radio/index.vue.mjs";
|
|
45
|
+
import R from "./date-range/index.vue.mjs";
|
|
46
|
+
import T from "./date/index.vue.mjs";
|
|
47
|
+
import b from "./number/index.vue.mjs";
|
|
48
|
+
import h from "./text-area/index.vue.mjs";
|
|
49
|
+
const Sm = {
|
|
50
|
+
Text: c,
|
|
51
|
+
TextArea: s,
|
|
52
|
+
Number: _,
|
|
53
|
+
Date: f,
|
|
54
|
+
DateRange: a,
|
|
55
|
+
Radio: p,
|
|
56
|
+
Checkbox: e,
|
|
57
|
+
Select: t,
|
|
36
58
|
Switch: o,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
TreeSelect: r,
|
|
60
|
+
Password: i
|
|
61
|
+
}, xm = {
|
|
62
|
+
Text: m,
|
|
63
|
+
TextArea: h,
|
|
64
|
+
Number: b,
|
|
65
|
+
Date: T,
|
|
66
|
+
DateRange: R,
|
|
67
|
+
Radio: x,
|
|
68
|
+
Checkbox: S,
|
|
69
|
+
Select: F,
|
|
70
|
+
Switch: A,
|
|
71
|
+
Slider: $,
|
|
72
|
+
Segmented: l,
|
|
73
|
+
Rate: d,
|
|
74
|
+
TreeSelect: n
|
|
41
75
|
};
|
|
42
76
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
77
|
+
xm as ApField,
|
|
78
|
+
S as ApFieldCheckbox,
|
|
79
|
+
T as ApFieldDate,
|
|
80
|
+
R as ApFieldDateRange,
|
|
81
|
+
b as ApFieldNumber,
|
|
82
|
+
x as ApFieldRadio,
|
|
83
|
+
d as ApFieldRate,
|
|
84
|
+
Sm as ApFieldRead,
|
|
85
|
+
l as ApFieldSegmented,
|
|
86
|
+
F as ApFieldSelect,
|
|
87
|
+
$ as ApFieldSlider,
|
|
88
|
+
A as ApFieldSwitch,
|
|
89
|
+
m as ApFieldText,
|
|
90
|
+
h as ApFieldTextArea,
|
|
91
|
+
n as ApFieldTreeSelect
|
|
57
92
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApFieldNumberProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
prefix?(_: {}): any;
|
|
7
|
+
addonAfter?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLSpanElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: DefineComponent<ApFieldNumberProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldNumberProps> & Readonly<{}>, {
|
|
14
|
+
emptyText: string;
|
|
15
|
+
thousands: boolean;
|
|
16
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineComponent as p, computed as d, createElementBlock as a, openBlock as n, createCommentVNode as r, createElementVNode as m, renderSlot as l, toDisplayString as u } from "vue";
|
|
2
|
+
import { isNil as f } from "lodash-unified";
|
|
3
|
+
import { roundWith as c, toDecimalMark as y } from "@fruits-chain/utils";
|
|
4
|
+
import { addZeroToDecimalPlaces as B } from "./helper.mjs";
|
|
5
|
+
const h = {
|
|
6
|
+
key: 0,
|
|
7
|
+
style: { "padding-right": "4px" }
|
|
8
|
+
}, x = {
|
|
9
|
+
key: 1,
|
|
10
|
+
style: { "padding-left": "4px" }
|
|
11
|
+
}, _ = /* @__PURE__ */ p({
|
|
12
|
+
name: "ApFieldNumberRead",
|
|
13
|
+
__name: "read",
|
|
14
|
+
props: {
|
|
15
|
+
mode: {},
|
|
16
|
+
class: {},
|
|
17
|
+
style: {},
|
|
18
|
+
size: {},
|
|
19
|
+
bordered: { type: Boolean },
|
|
20
|
+
placeholder: {},
|
|
21
|
+
name: {},
|
|
22
|
+
id: {},
|
|
23
|
+
type: {},
|
|
24
|
+
addonBefore: {},
|
|
25
|
+
addonAfter: {},
|
|
26
|
+
prefix: {},
|
|
27
|
+
suffix: {},
|
|
28
|
+
"onUpdate:value": {},
|
|
29
|
+
valueModifiers: {},
|
|
30
|
+
status: {},
|
|
31
|
+
stringMode: { type: Boolean },
|
|
32
|
+
defaultValue: {},
|
|
33
|
+
value: {},
|
|
34
|
+
prefixCls: {},
|
|
35
|
+
min: {},
|
|
36
|
+
max: {},
|
|
37
|
+
step: {},
|
|
38
|
+
tabindex: {},
|
|
39
|
+
controls: { type: Boolean },
|
|
40
|
+
readonly: { type: Boolean },
|
|
41
|
+
disabled: { type: Boolean },
|
|
42
|
+
autofocus: { type: Boolean },
|
|
43
|
+
keyboard: { type: Boolean },
|
|
44
|
+
parser: {},
|
|
45
|
+
formatter: {},
|
|
46
|
+
precision: {},
|
|
47
|
+
decimalSeparator: {},
|
|
48
|
+
onInput: {},
|
|
49
|
+
onChange: {},
|
|
50
|
+
onPressEnter: {},
|
|
51
|
+
onStep: {},
|
|
52
|
+
onBlur: {},
|
|
53
|
+
onFocus: {},
|
|
54
|
+
emptyText: { default: "--" },
|
|
55
|
+
thousands: { type: Boolean, default: !1 },
|
|
56
|
+
limitDecimalsRetain: { type: Boolean }
|
|
57
|
+
},
|
|
58
|
+
setup(s) {
|
|
59
|
+
const o = s, i = d(() => {
|
|
60
|
+
let e = o.value;
|
|
61
|
+
if (f(e))
|
|
62
|
+
return o.emptyText;
|
|
63
|
+
o.precision && (e = c(e, o.precision));
|
|
64
|
+
let t = o.thousands ? y(e) : String(e);
|
|
65
|
+
return o.precision && o.limitDecimalsRetain && (t = B(t, o.precision)), t;
|
|
66
|
+
});
|
|
67
|
+
return (e, t) => (n(), a("span", null, [
|
|
68
|
+
e.$slots.prefix ? (n(), a("span", h, [
|
|
69
|
+
l(e.$slots, "prefix")
|
|
70
|
+
])) : r("", !0),
|
|
71
|
+
m("span", null, u(i.value), 1),
|
|
72
|
+
e.$slots.addonAfter ? (n(), a("span", x, [
|
|
73
|
+
l(e.$slots, "addonAfter")
|
|
74
|
+
])) : r("", !0)
|
|
75
|
+
]));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
_ as default
|
|
80
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApFieldRadioProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { FieldMode } from '..';
|
|
4
|
+
declare const _default: DefineComponent<ApFieldRadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldRadioProps> & Readonly<{}>, {
|
|
5
|
+
mode: FieldMode;
|
|
6
|
+
vertical: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
emptyText: string;
|
|
9
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as l, computed as r, toDisplayString as s } from "vue";
|
|
2
|
+
import { isNil as d } from "lodash-unified";
|
|
3
|
+
import { getOptionValue as u, getOptionLabel as m } from "./helper.mjs";
|
|
4
|
+
const v = /* @__PURE__ */ l({
|
|
5
|
+
name: "ApFieldRadioRead",
|
|
6
|
+
__name: "read",
|
|
7
|
+
props: {
|
|
8
|
+
mode: { default: "edit" },
|
|
9
|
+
class: {},
|
|
10
|
+
style: {},
|
|
11
|
+
prefixCls: {},
|
|
12
|
+
value: {},
|
|
13
|
+
size: {},
|
|
14
|
+
options: {},
|
|
15
|
+
disabled: { type: Boolean, default: void 0 },
|
|
16
|
+
name: {},
|
|
17
|
+
buttonStyle: {},
|
|
18
|
+
id: {},
|
|
19
|
+
optionType: {},
|
|
20
|
+
onChange: {},
|
|
21
|
+
"onUpdate:value": {},
|
|
22
|
+
emptyText: { default: "--" },
|
|
23
|
+
request: {},
|
|
24
|
+
vertical: { type: Boolean, default: !1 }
|
|
25
|
+
},
|
|
26
|
+
setup(n) {
|
|
27
|
+
const e = n, p = r(() => {
|
|
28
|
+
var a;
|
|
29
|
+
const t = e.value;
|
|
30
|
+
if (d(t))
|
|
31
|
+
return e.emptyText;
|
|
32
|
+
const o = (a = e.options) == null ? void 0 : a.find(
|
|
33
|
+
(i) => t === u(i)
|
|
34
|
+
);
|
|
35
|
+
return m(o) || e.emptyText;
|
|
36
|
+
});
|
|
37
|
+
return (t, o) => s(p.value);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
v as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApFieldSelectProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<ApFieldSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldSelectProps> & Readonly<{}>, {
|
|
4
|
+
emptyText: string;
|
|
5
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|