@aplus-frontend/ui 0.1.27 → 0.1.29
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/src/ap-download/ap-download.vue.d.ts +6 -2
- package/es/src/ap-download/ap-download.vue.mjs +48 -28
- package/es/src/ap-download/interface.d.ts +3 -2
- package/es/src/ap-download/style/ap-download.css +3 -0
- package/es/src/ap-field/date-range/index.vue.mjs +154 -109
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.mjs +67 -63
- package/es/src/ap-form/style/ap-form-item.css +2 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +72 -97
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +37 -33
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +91 -87
- package/es/src/ap-table/components/setting/utils.d.ts +7 -1
- package/es/src/ap-table/components/setting/utils.mjs +37 -22
- package/es/src/ap-table/constants.d.ts +12 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
- package/es/src/ap-table/hooks/use-table-column-state.mjs +101 -33
- package/es/src/ap-table/interface.d.ts +8 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +79 -59
- package/es/src/business/ap-attachment/interface.d.ts +1 -1
- package/es/src/business/ap-attachment/style.css +4 -0
- package/es/src/business/ap-input-radio/interface.d.ts +1 -1
- package/es/src/business/index.d.ts +0 -2
- package/es/src/editable-table/form-item.vue.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +63 -59
- package/es/src/editable-table/index.vue.d.ts +1 -0
- package/es/src/editable-table/index.vue.mjs +77 -72
- package/es/src/editable-table/interface.d.ts +6 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +4 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-form/ap-form-item.css +2 -0
- package/lib/src/ap-download/ap-download.vue.d.ts +6 -2
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -2
- package/lib/src/ap-download/style/ap-download.css +3 -0
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/style/ap-form-item.css +2 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +7 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +12 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/interface.d.ts +8 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/interface.d.ts +1 -1
- package/lib/src/business/ap-attachment/style.css +4 -0
- package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
- package/lib/src/business/index.d.ts +0 -2
- package/lib/src/editable-table/form-item.vue.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +1 -0
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +6 -0
- package/lib/src/theme/ap-attachment/ap-attachment.css +4 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-form/ap-form-item.css +2 -0
- package/package.json +1 -1
|
@@ -13,11 +13,15 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
13
13
|
type: string;
|
|
14
14
|
size: string;
|
|
15
15
|
disabled: boolean;
|
|
16
|
-
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
17
|
+
downloadCallback: (...args: any[]) => void;
|
|
18
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps>, {
|
|
17
19
|
type: string;
|
|
18
20
|
size: string;
|
|
19
21
|
disabled: boolean;
|
|
20
|
-
}
|
|
22
|
+
}>>> & {
|
|
23
|
+
onDownloadCallback?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
}, {
|
|
21
25
|
size: "small" | "large" | "middle";
|
|
22
26
|
type: ButtonType;
|
|
23
27
|
disabled: boolean;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { defineComponent as z, ref as N, useSlots as O, computed as t, unref as s, openBlock as l, createBlock as F, mergeProps as x, withCtx as A, createElementVNode as r, normalizeClass as S, createElementBlock as c, createVNode as I, createCommentVNode as d, renderSlot as L, toDisplayString as M } from "vue";
|
|
2
|
+
import { Button as U } from "ant-design-vue";
|
|
3
|
+
import { LoadingOutlined as V } from "@ant-design/icons-vue";
|
|
3
4
|
import "../config-provider/index.mjs";
|
|
4
|
-
import { useOssInit as
|
|
5
|
+
import { useOssInit as j } from "./hooks/index.mjs";
|
|
5
6
|
import "./style/ap-download.css";
|
|
6
|
-
import { getFileInfo as
|
|
7
|
-
import { useStyle as
|
|
8
|
-
import { useLocale as
|
|
9
|
-
import { useGlobalConfig as
|
|
10
|
-
const
|
|
7
|
+
import { getFileInfo as D } from "./utils/getFileInfo.mjs";
|
|
8
|
+
import { useStyle as E } from "./hooks/useStyle.mjs";
|
|
9
|
+
import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as p } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const P = {
|
|
11
12
|
key: 0,
|
|
13
|
+
class: "spin"
|
|
14
|
+
}, R = {
|
|
15
|
+
key: 1,
|
|
12
16
|
class: "icon"
|
|
13
|
-
},
|
|
17
|
+
}, T = { class: "text" }, ee = /* @__PURE__ */ z({
|
|
14
18
|
name: "ApDownload",
|
|
15
19
|
__name: "ap-download",
|
|
16
20
|
props: {
|
|
@@ -36,30 +40,46 @@ const U = {
|
|
|
36
40
|
needName: { type: [Boolean, Object] },
|
|
37
41
|
getOssAccess: {}
|
|
38
42
|
},
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
emits: ["downloadCallback"],
|
|
44
|
+
setup(m, { emit: u }) {
|
|
45
|
+
const f = u, n = N(!1), { lang: g } = G(), y = O(), C = t(() => g.value === "zh-cn" ? "zh_CN" : "en_US"), _ = p("uiMode"), e = m, b = p("apUpload"), a = t(() => e.disabled), h = t(() => e.color ? e.color : _.value === "aplus" ? "#0070FF" : "#1890FF"), k = t(() => e.size), { getInnerWrapperClass: w } = E(h, k, a), B = t(() => {
|
|
41
46
|
var o;
|
|
42
|
-
return e.getOssAccess || ((o =
|
|
43
|
-
}),
|
|
44
|
-
e.disabled
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
return e.getOssAccess || ((o = b.value) == null ? void 0 : o.getOssAccess);
|
|
48
|
+
}), v = async () => {
|
|
49
|
+
if (!e.disabled) {
|
|
50
|
+
n.value = !0;
|
|
51
|
+
try {
|
|
52
|
+
const i = await (await j(
|
|
53
|
+
B.value,
|
|
54
|
+
s(C)
|
|
55
|
+
)).downloadFile(
|
|
56
|
+
D(e.needName, e.fileName)
|
|
57
|
+
);
|
|
58
|
+
f("downloadCallback", i);
|
|
59
|
+
} catch (o) {
|
|
60
|
+
console.error(o);
|
|
61
|
+
} finally {
|
|
62
|
+
n.value = !1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
48
65
|
};
|
|
49
|
-
return (o,
|
|
66
|
+
return (o, i) => (l(), F(s(U), x(e, {
|
|
50
67
|
type: e.type,
|
|
51
68
|
size: e.size,
|
|
52
|
-
disabled:
|
|
53
|
-
onClick:
|
|
69
|
+
disabled: a.value,
|
|
70
|
+
onClick: v
|
|
54
71
|
}), {
|
|
55
|
-
default:
|
|
56
|
-
|
|
57
|
-
class:
|
|
72
|
+
default: A(() => [
|
|
73
|
+
r("div", {
|
|
74
|
+
class: S(s(w))
|
|
58
75
|
}, [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
])) :
|
|
62
|
-
|
|
76
|
+
n.value ? (l(), c("span", P, [
|
|
77
|
+
I(s(V), { spin: !0 })
|
|
78
|
+
])) : d("", !0),
|
|
79
|
+
s(y).icon ? (l(), c("span", R, [
|
|
80
|
+
L(o.$slots, "icon")
|
|
81
|
+
])) : d("", !0),
|
|
82
|
+
r("span", T, M(o.text), 1)
|
|
63
83
|
], 2)
|
|
64
84
|
]),
|
|
65
85
|
_: 3
|
|
@@ -67,5 +87,5 @@ const U = {
|
|
|
67
87
|
}
|
|
68
88
|
});
|
|
69
89
|
export {
|
|
70
|
-
|
|
90
|
+
ee as default
|
|
71
91
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
|
-
import { ButtonProps } from 'ant-design-vue/es/
|
|
1
|
+
import { accessCreate, client } from '@aplus-frontend/oss';
|
|
2
|
+
import { ButtonProps } from 'ant-design-vue/es/button';
|
|
3
3
|
/**
|
|
4
4
|
* 类型转换为单例和数组
|
|
5
5
|
*/
|
|
@@ -37,4 +37,5 @@ export declare enum ApDownLoadNeedNameKeyDefault {
|
|
|
37
37
|
nameKey = "name",
|
|
38
38
|
pathKey = "path"
|
|
39
39
|
}
|
|
40
|
+
export type actionResponse = Awaited<ReturnType<typeof client.downloadFile>>;
|
|
40
41
|
export {};
|
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ApFieldDatePresetFormats as
|
|
1
|
+
import { defineComponent as U, useSlots as H, computed as p, unref as n, isVNode as K, createVNode as M, Fragment as y, openBlock as h, createElementBlock as B, createTextVNode as O, toDisplayString as P, createBlock as D, resolveDynamicComponent as $, mergeProps as L, createSlots as W, renderList as Y, withCtx as Z, renderSlot as q, normalizeProps as G, guardReactiveProps as J } from "vue";
|
|
2
|
+
import { ApFieldDatePresetFormats as Q, PRESET_FORMAT_MAP as X, PRESET_FORMAT_PICK_MAP as ee, PRESET_FORMAT_TIME_MAP as oe } from "../date/constant.mjs";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { isNil as
|
|
5
|
-
import
|
|
6
|
-
import { DatePicker as
|
|
7
|
-
import { formatDayWithTimezone as
|
|
8
|
-
import { SwapRightOutlined as
|
|
9
|
-
import { omitUndefined as
|
|
10
|
-
import { getTimeFormatToZone as
|
|
11
|
-
import { useDefaultPlaceholder as
|
|
12
|
-
import { useControllableValue as
|
|
13
|
-
const
|
|
4
|
+
import { isNil as T, omit as b, isString as m, isFunction as ne } from "lodash-unified";
|
|
5
|
+
import d from "dayjs";
|
|
6
|
+
import { DatePicker as te } from "ant-design-vue";
|
|
7
|
+
import { formatDayWithTimezone as ae, formatValue as R } from "../date/helper.mjs";
|
|
8
|
+
import { SwapRightOutlined as re } from "@ant-design/icons-vue";
|
|
9
|
+
import { omitUndefined as le } from "../../utils/index.mjs";
|
|
10
|
+
import { getTimeFormatToZone as w } from "@aplus-frontend/utils";
|
|
11
|
+
import { useDefaultPlaceholder as ue } from "../hooks/use-default-placeholder.mjs";
|
|
12
|
+
import { useControllableValue as de } from "../../hooks/useControllableValue.mjs";
|
|
13
|
+
const Be = /* @__PURE__ */ U({
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
16
|
-
mode: {
|
|
16
|
+
mode: {
|
|
17
|
+
default: "edit"
|
|
18
|
+
},
|
|
17
19
|
class: {},
|
|
18
20
|
style: {},
|
|
19
21
|
id: {},
|
|
20
22
|
defaultPickerValue: {},
|
|
21
23
|
placeholder: {},
|
|
22
|
-
disabled: {
|
|
24
|
+
disabled: {
|
|
25
|
+
type: [Boolean, Array],
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
23
28
|
disabledTime: {},
|
|
24
29
|
presets: {},
|
|
25
30
|
ranges: {},
|
|
26
|
-
separator: {
|
|
31
|
+
separator: {
|
|
32
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
27
35
|
allowEmpty: {},
|
|
28
36
|
onCalendarChange: {},
|
|
29
37
|
onFocus: {},
|
|
@@ -42,14 +50,35 @@ const ve = /* @__PURE__ */ V({
|
|
|
42
50
|
dropdownAlign: {},
|
|
43
51
|
popupStyle: {},
|
|
44
52
|
transitionName: {},
|
|
45
|
-
allowClear: {
|
|
46
|
-
|
|
53
|
+
allowClear: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
autofocus: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: void 0
|
|
60
|
+
},
|
|
47
61
|
tabindex: {},
|
|
48
|
-
open: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
open: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
66
|
+
defaultOpen: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
inputReadOnly: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: void 0
|
|
73
|
+
},
|
|
74
|
+
suffixIcon: {
|
|
75
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
76
|
+
default: void 0
|
|
77
|
+
},
|
|
78
|
+
clearIcon: {
|
|
79
|
+
type: [Object, String, Number, Boolean, null, Array],
|
|
80
|
+
default: void 0
|
|
81
|
+
},
|
|
53
82
|
getPopupContainer: {},
|
|
54
83
|
inputRender: {},
|
|
55
84
|
onOpenChange: {},
|
|
@@ -63,125 +92,141 @@ const ve = /* @__PURE__ */ V({
|
|
|
63
92
|
monthCellRender: {},
|
|
64
93
|
locale: {},
|
|
65
94
|
size: {},
|
|
66
|
-
bordered: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
bordered: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: void 0
|
|
98
|
+
},
|
|
99
|
+
showTime: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: void 0
|
|
102
|
+
},
|
|
103
|
+
showNow: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: void 0
|
|
106
|
+
},
|
|
107
|
+
order: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: void 0
|
|
110
|
+
},
|
|
70
111
|
defaultOpenValue: {},
|
|
71
|
-
showHour: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
112
|
+
showHour: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: void 0
|
|
115
|
+
},
|
|
116
|
+
showMinute: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: void 0
|
|
119
|
+
},
|
|
120
|
+
showSecond: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: void 0
|
|
123
|
+
},
|
|
124
|
+
use12Hours: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: void 0
|
|
127
|
+
},
|
|
75
128
|
hourStep: {},
|
|
76
129
|
minuteStep: {},
|
|
77
130
|
secondStep: {},
|
|
78
|
-
hideDisabledOptions: {
|
|
131
|
+
hideDisabledOptions: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: void 0
|
|
134
|
+
},
|
|
79
135
|
disabledHours: {},
|
|
80
136
|
disabledMinutes: {},
|
|
81
137
|
disabledSeconds: {},
|
|
82
138
|
valueFormat: {},
|
|
83
|
-
emptyText: {
|
|
139
|
+
emptyText: {
|
|
140
|
+
default: "--"
|
|
141
|
+
},
|
|
84
142
|
value: {},
|
|
85
143
|
defaultValue: {},
|
|
86
144
|
onChange: {},
|
|
87
145
|
onOk: {},
|
|
88
|
-
format: {
|
|
89
|
-
|
|
146
|
+
format: {
|
|
147
|
+
default: "Y-D"
|
|
148
|
+
},
|
|
149
|
+
timezone: {},
|
|
150
|
+
readModeSeparator: {}
|
|
90
151
|
},
|
|
91
152
|
emits: ["update:value"],
|
|
92
|
-
setup(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const e = t(p);
|
|
103
|
-
if (D(e) || !(e != null && e.length))
|
|
153
|
+
setup(_, {
|
|
154
|
+
emit: A
|
|
155
|
+
}) {
|
|
156
|
+
const o = _, F = A, S = H(), u = p(() => Q.indexOf(o.format) > -1), l = p(() => u.value ? X[o.format] : o.format), {
|
|
157
|
+
value: c,
|
|
158
|
+
updateValue: k
|
|
159
|
+
} = de(o, F), N = ue("DateRange", o), s = ae(o.timezone), v = p(() => {
|
|
160
|
+
var r, i;
|
|
161
|
+
const e = n(c);
|
|
162
|
+
if (T(e) || !(e != null && e.length))
|
|
104
163
|
return e;
|
|
105
|
-
const n = o.timezone ?
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
t(p)[1],
|
|
110
|
-
o.timezone
|
|
111
|
-
) : (d = t(p)) == null ? void 0 : d[1];
|
|
112
|
-
return [i(n), i(a)];
|
|
113
|
-
}), F = c(() => t(u) ? o.picker ?? q[o.format] : o.picker), z = c(() => {
|
|
114
|
-
const e = t(u) ? G[o.format] : {};
|
|
164
|
+
const a = o.timezone ? w(n(c)[0], o.timezone) : (r = n(c)) == null ? void 0 : r[0], t = o.timezone ? w(n(c)[1], o.timezone) : (i = n(c)) == null ? void 0 : i[1];
|
|
165
|
+
return [d(a), d(t)];
|
|
166
|
+
}), x = p(() => n(u) ? o.picker ?? ee[o.format] : o.picker), z = p(() => {
|
|
167
|
+
const e = n(u) ? oe[o.format] : {};
|
|
115
168
|
return {
|
|
116
|
-
...
|
|
117
|
-
|
|
118
|
-
"value",
|
|
119
|
-
"onUpdate:value",
|
|
120
|
-
"onChange",
|
|
121
|
-
"onOk",
|
|
122
|
-
"format",
|
|
123
|
-
"mode"
|
|
124
|
-
])
|
|
125
|
-
),
|
|
126
|
-
placeholder: t(A),
|
|
169
|
+
...le(b(o, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode"])),
|
|
170
|
+
placeholder: n(N),
|
|
127
171
|
...e
|
|
128
172
|
};
|
|
129
173
|
});
|
|
130
174
|
function E(e) {
|
|
131
175
|
if (!e) {
|
|
132
|
-
|
|
176
|
+
k(e);
|
|
133
177
|
return;
|
|
134
178
|
}
|
|
135
|
-
let
|
|
136
|
-
|
|
137
|
-
m(n, t(r)),
|
|
138
|
-
m(a, t(r), !1)
|
|
139
|
-
]) : g([b(n), b(a)]);
|
|
179
|
+
let a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1];
|
|
180
|
+
n(u) ? k([s(a, n(l)), s(t, n(l), !1)]) : k([R(a), R(t)]);
|
|
140
181
|
}
|
|
141
|
-
function
|
|
142
|
-
var
|
|
143
|
-
const
|
|
144
|
-
(
|
|
182
|
+
function V(e) {
|
|
183
|
+
var f;
|
|
184
|
+
const a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1], r = e[0] ? n(u) ? s(a, n(l)) : a.valueOf() : null, i = e[1] ? n(u) ? s(t, n(l), !1) : t.valueOf() : null;
|
|
185
|
+
(f = o.onOk) == null || f.call(o, [r, i]);
|
|
145
186
|
}
|
|
146
|
-
function
|
|
147
|
-
var
|
|
148
|
-
if (
|
|
149
|
-
(
|
|
187
|
+
function I(e, a) {
|
|
188
|
+
var g, C;
|
|
189
|
+
if (T(e)) {
|
|
190
|
+
(g = o.onChange) == null || g.call(o, e, a);
|
|
150
191
|
return;
|
|
151
192
|
}
|
|
152
|
-
const
|
|
153
|
-
(C = o.onChange) == null || C.call(o, [
|
|
193
|
+
const t = m(e[0]) ? d(e[0]) : e[0], r = m(e[1]) ? d(e[1]) : e[1], i = e[0] ? n(u) ? s(t, n(l)) : t.valueOf() : null, f = e[1] ? n(u) ? s(r, n(l), !1) : r.valueOf() : null;
|
|
194
|
+
(C = o.onChange) == null || C.call(o, [i, f], a);
|
|
154
195
|
}
|
|
155
|
-
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
196
|
+
const j = p(() => {
|
|
197
|
+
var t;
|
|
198
|
+
const e = o.readModeSeparator;
|
|
199
|
+
if (e)
|
|
200
|
+
return K(e) || ne(e) ? o.readModeSeparator : M(y, null, [o.readModeSeparator]);
|
|
201
|
+
const a = (t = S.readModeSeparator) == null ? void 0 : t.call(S);
|
|
202
|
+
return a ? M(y, null, [a]) : re;
|
|
203
|
+
});
|
|
204
|
+
return (e, a) => {
|
|
205
|
+
var t, r;
|
|
206
|
+
return e.mode === "read" ? (h(), B(y, {
|
|
207
|
+
key: 0
|
|
208
|
+
}, [v.value ? (h(), B(y, {
|
|
209
|
+
key: 0
|
|
210
|
+
}, [O(P((t = v.value[0]) == null ? void 0 : t.format(l.value)) + " ", 1), (h(), D($(j.value))), O(" " + P((r = v.value[1]) == null ? void 0 : r.format(l.value)), 1)], 64)) : (h(), B(y, {
|
|
211
|
+
key: 1
|
|
212
|
+
}, [O(P(e.emptyText), 1)], 64))], 64)) : (h(), D(n(te).RangePicker, L({
|
|
213
|
+
key: 1
|
|
214
|
+
}, z.value, {
|
|
168
215
|
value: v.value,
|
|
169
216
|
"onUpdate:value": E,
|
|
170
|
-
onChange:
|
|
171
|
-
picker:
|
|
172
|
-
format:
|
|
173
|
-
onOk:
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}))
|
|
181
|
-
]), 1040, ["value", "picker", "format"]));
|
|
217
|
+
onChange: I,
|
|
218
|
+
picker: x.value,
|
|
219
|
+
format: l.value,
|
|
220
|
+
onOk: V
|
|
221
|
+
}), W({
|
|
222
|
+
_: 2
|
|
223
|
+
}, [Y(n(b)(e.$slots, "readModeSeparator"), (i, f) => ({
|
|
224
|
+
name: f,
|
|
225
|
+
fn: Z((g) => [q(e.$slots, f, G(J(g || {})))])
|
|
226
|
+
}))]), 1040, ["value", "picker", "format"]));
|
|
182
227
|
};
|
|
183
228
|
}
|
|
184
229
|
});
|
|
185
230
|
export {
|
|
186
|
-
|
|
231
|
+
Be as default
|
|
187
232
|
};
|
|
@@ -94,6 +94,10 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
|
|
|
94
94
|
* 指定时区,指定后value会变为特定时区下的timestamp
|
|
95
95
|
*/
|
|
96
96
|
timezone?: ZoneAlias;
|
|
97
|
+
/**
|
|
98
|
+
* 只读模式下的分隔符(比插槽优先级更高)
|
|
99
|
+
*/
|
|
100
|
+
readModeSeparator?: any;
|
|
97
101
|
};
|
|
98
102
|
export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'value' | 'onUpdate:value' | 'onSearch'>> & {
|
|
99
103
|
emptyText?: string;
|