@aplus-frontend/ui 0.4.4 → 0.4.6
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 +51 -49
- package/es/src/ap-field/date/index.vue.d.ts +1 -0
- package/es/src/ap-field/date/index.vue.mjs +22 -15
- package/es/src/ap-field/interface.d.ts +5 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +55 -55
- package/es/src/ap-table/constants.d.ts +3 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
- package/es/src/ap-table/hooks/use-table-column-state.mjs +92 -92
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +52 -56
- package/es/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -35
- package/es/src/business/ap-summary/index.d.ts +0 -3
- package/es/src/business/batch-input-group/form-item.vue.d.ts +10 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +50 -49
- package/es/src/business/batch-input-group/interface.d.ts +5 -0
- package/es/src/index.mjs +48 -46
- package/es/src/locale/lang/en.mjs +3 -0
- package/es/src/locale/lang/zh-cn.mjs +3 -0
- package/es/src/scroll-bar/index.d.ts +1 -0
- package/es/src/scroll-bar/index.mjs +4 -0
- package/es/src/scroll-bar/index.vue.d.ts +6 -5
- package/es/src/scroll-bar/index.vue.mjs +51 -38
- package/es/src/scroll-bar/interface.d.ts +1 -1
- package/es/src/scroll-bar/internal.vue.d.ts +1 -1
- package/es/src/scroll-bar/utils/index.d.ts +7 -0
- package/es/src/scroll-bar/utils/index.mjs +16 -11
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1 -0
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +5 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +3 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/ap-summary/index.d.ts +0 -3
- package/lib/src/business/batch-input-group/form-item.vue.d.ts +10 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/interface.d.ts +5 -0
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/scroll-bar/index.d.ts +1 -0
- package/lib/src/scroll-bar/index.js +1 -1
- package/lib/src/scroll-bar/index.vue.d.ts +6 -5
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/interface.d.ts +1 -1
- package/lib/src/scroll-bar/internal.vue.d.ts +1 -1
- package/lib/src/scroll-bar/utils/index.d.ts +7 -0
- package/lib/src/scroll-bar/utils/index.js +1 -1
- package/package.json +1 -1
- package/theme/ap-table/ap-table.css +4 -4
- package/theme/ap-table/ap-table.less +4 -4
- package/theme/ap-table-modal/index.css +4 -4
- package/theme/index.css +4 -4
package/es/index.mjs
CHANGED
|
@@ -4,15 +4,15 @@ import "./src/hooks/index.mjs";
|
|
|
4
4
|
import { configProviderProps as d } from "./src/config-provider/config-provider-props.mjs";
|
|
5
5
|
import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as n } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
|
-
import { buildLocaleContext as b, buildTranslator as C, localeContextKey as D, translate as
|
|
7
|
+
import { buildLocaleContext as b, buildTranslator as C, localeContextKey as D, translate as g, useLocale as S } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { defaultNamespace as G, namespaceContextKey as M, useGetDerivedNamespace as P, useNamespace as E } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
-
import { ConfigProvider as N, globalConfigCached as
|
|
9
|
+
import { ConfigProvider as N, globalConfigCached as R } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as w } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { ApFormItemText as v } from "./src/ap-form/items/text/index.mjs";
|
|
12
12
|
import { default as K } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
13
13
|
import { default as O } from "./src/ap-form/items/number/index.vue.mjs";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
14
|
+
import { default as W } from "./src/ap-form/items/date/index.vue.mjs";
|
|
15
|
+
import { default as z } from "./src/ap-form/items/date-range/index.vue.mjs";
|
|
16
16
|
import { default as $ } from "./src/ap-form/items/radio/index.vue.mjs";
|
|
17
17
|
import { default as q } from "./src/ap-form/items/select/index.vue.mjs";
|
|
18
18
|
import { default as Q } from "./src/ap-form/items/switch/index.vue.mjs";
|
|
@@ -29,17 +29,17 @@ import { default as ce } from "./src/ap-form/set/index.vue.mjs";
|
|
|
29
29
|
import { default as Ie } from "./src/ap-form/drawer-form/index.vue.mjs";
|
|
30
30
|
import { default as be } from "./src/ap-form/render/control.vue.mjs";
|
|
31
31
|
import { default as De } from "./src/ap-form/render/item.vue.mjs";
|
|
32
|
-
import { default as
|
|
32
|
+
import { default as Se } from "./src/ap-form/provider/index.vue.mjs";
|
|
33
33
|
import { ApField as Ge } from "./src/ap-field/index.mjs";
|
|
34
34
|
import { ApFieldText as Pe } from "./src/ap-field/text/index.mjs";
|
|
35
35
|
import { default as Le } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
36
|
-
import { default as
|
|
36
|
+
import { default as Re } from "./src/ap-field/date/index.vue.mjs";
|
|
37
37
|
import { default as we } from "./src/ap-field/number/index.vue.mjs";
|
|
38
38
|
import { default as ve } from "./src/ap-field/radio/index.vue.mjs";
|
|
39
39
|
import { default as Ke } from "./src/ap-field/switch/index.vue.mjs";
|
|
40
40
|
import { default as Oe } from "./src/ap-field/text-area/index.vue.mjs";
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
41
|
+
import { default as We } from "./src/ap-field/date-range/index.vue.mjs";
|
|
42
|
+
import { default as ze } from "./src/ap-field/select/index.vue.mjs";
|
|
43
43
|
import { default as $e } from "./src/ap-field/text/password.vue.mjs";
|
|
44
44
|
import { default as qe } from "./src/ap-field/slider/index.vue.mjs";
|
|
45
45
|
import { default as Qe } from "./src/ap-field/segmented/index.vue.mjs";
|
|
@@ -54,18 +54,18 @@ import { DictCode as no, langMap as io } from "./src/work-order-modal/interfaces
|
|
|
54
54
|
import { createWorkOrderModal as Fo } from "./src/work-order-modal/createWorkOrder.mjs";
|
|
55
55
|
import { default as To } from "./src/work-order-modal/work-order-modal.vue.mjs";
|
|
56
56
|
import { default as Co } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
57
|
-
import { default as
|
|
57
|
+
import { default as go } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
58
58
|
import { default as ho } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
|
|
59
59
|
import { NeedNameKeyDefault as Mo } from "./src/ap-upload/apUploadTypes.mjs";
|
|
60
60
|
import { default as Eo } from "./src/ap-upload/apUpload.vue.mjs";
|
|
61
61
|
import { ApDownLoadNeedNameKeyDefault as No } from "./src/ap-download/interface.mjs";
|
|
62
|
-
import { default as
|
|
62
|
+
import { default as yo } from "./src/ap-download/ap-download.vue.mjs";
|
|
63
63
|
import { CheckCard as ko } from "./src/check-card/index.mjs";
|
|
64
64
|
import { default as Bo } from "./src/check-card/group.vue.mjs";
|
|
65
65
|
import { ApModal as Uo } from "./src/ap-modal/index.mjs";
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
66
|
+
import { default as Vo } from "./src/ap-list/index.vue.mjs";
|
|
67
|
+
import { default as _o } from "./src/ap-button/ap-button.vue.mjs";
|
|
68
|
+
import { default as Ho } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
69
69
|
import { ApDrawer as jo } from "./src/ap-drawer/index.mjs";
|
|
70
70
|
import { ApTransformDataHelper as Jo } from "./src/utils/ap-trans-data/index.mjs";
|
|
71
71
|
import { default as Xo } from "./src/business/ap-table-modal/index.mjs";
|
|
@@ -81,17 +81,17 @@ import { ApExportGroupActionType as ir } from "./src/business/ap-export-group/in
|
|
|
81
81
|
import { ApExportGroup as Fr } from "./src/business/ap-export-group/index.mjs";
|
|
82
82
|
import { handleExportDownload as Tr } from "./src/business/ap-export-group/handleExportDownload.mjs";
|
|
83
83
|
import { convertExportField as Cr } from "./src/business/ap-export-group/convertExportField.mjs";
|
|
84
|
-
import { ApImage as
|
|
84
|
+
import { ApImage as gr } from "./src/business/ap-image/index.mjs";
|
|
85
85
|
import { ApInputRadio as hr } from "./src/business/ap-input-radio/index.mjs";
|
|
86
86
|
import { ApLabel as Mr, ApLabelGroup as Pr } from "./src/business/ap-label/index.mjs";
|
|
87
87
|
import { locales as Lr } from "./src/business/ap-ladder/interface.mjs";
|
|
88
|
-
import { ApLadder as
|
|
88
|
+
import { ApLadder as Rr } from "./src/business/ap-ladder/index.mjs";
|
|
89
89
|
import { ApSelectLayout as wr } from "./src/business/ap-select-layout/index.mjs";
|
|
90
90
|
import { ApStatus as vr, ApStatusGroup as Br } from "./src/business/ap-status/index.mjs";
|
|
91
91
|
import { ApTitle as Ur } from "./src/business/ap-title/index.mjs";
|
|
92
|
-
import { usePageListApTable as
|
|
93
|
-
import { useTableRefresh as
|
|
94
|
-
import { computedRecords as
|
|
92
|
+
import { usePageListApTable as Vr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
93
|
+
import { useTableRefresh as _r } from "./src/business/hooks/useTableRefresh.mjs";
|
|
94
|
+
import { computedRecords as Hr, flattenColumns as $r, formatDataIndex as jr, formatNumber as qr } from "./src/business/ap-summary/utils.mjs";
|
|
95
95
|
import { ApSummary as Qr } from "./src/business/ap-summary/index.mjs";
|
|
96
96
|
import { ApNeedNameKeyDefault as Yr } from "./src/business/ap-appendix/interface.mjs";
|
|
97
97
|
import { ApAppendix as et } from "./src/business/ap-appendix/index.mjs";
|
|
@@ -105,12 +105,13 @@ import { ApTable as ct } from "./src/ap-table/index.mjs";
|
|
|
105
105
|
import { default as It } from "./src/editable-table/index.vue.mjs";
|
|
106
106
|
import { default as bt } from "./src/editable-table/form-item.vue.mjs";
|
|
107
107
|
import { default as Dt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
108
|
-
import {
|
|
109
|
-
import { default as Gt } from "./src/scroll-bar/
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
108
|
+
import { ensureRangeValue as St } from "./src/scroll-bar/utils/index.mjs";
|
|
109
|
+
import { default as Gt } from "./src/scroll-bar/index.vue.mjs";
|
|
110
|
+
import { default as Pt } from "./src/scroll-bar/internal.vue.mjs";
|
|
111
|
+
import { useMessage as Lt } from "./src/hooks/useMessage.mjs";
|
|
112
|
+
import { useControllableValue as Rt } from "./src/hooks/useControllableValue.mjs";
|
|
113
|
+
import { useManualRef as wt } from "./src/hooks/useManualRef.mjs";
|
|
114
|
+
import { useThrottleRef as vt } from "./src/hooks/useThrottleRef.mjs";
|
|
114
115
|
const a = {
|
|
115
116
|
install: (r) => {
|
|
116
117
|
for (const t in o) {
|
|
@@ -121,7 +122,7 @@ const a = {
|
|
|
121
122
|
};
|
|
122
123
|
export {
|
|
123
124
|
w as APConfigProvider,
|
|
124
|
-
|
|
125
|
+
Ho as ApActionButton,
|
|
125
126
|
so as ApActionGroup,
|
|
126
127
|
to as ApActionItem,
|
|
127
128
|
xo as ApActionItemDropdown,
|
|
@@ -131,12 +132,12 @@ export {
|
|
|
131
132
|
tr as ApAttachment,
|
|
132
133
|
ar as ApBatchAction,
|
|
133
134
|
mr as ApBatchActionGroup,
|
|
134
|
-
|
|
135
|
+
_o as ApButton,
|
|
135
136
|
xr as ApButtonGroup,
|
|
136
137
|
ur as ApCard,
|
|
137
138
|
Dt as ApDescriptions,
|
|
138
139
|
No as ApDownLoadNeedNameKeyDefault,
|
|
139
|
-
|
|
140
|
+
yo as ApDownload,
|
|
140
141
|
jo as ApDrawer,
|
|
141
142
|
Ar as ApExpandAlert,
|
|
142
143
|
Fr as ApExportGroup,
|
|
@@ -144,14 +145,14 @@ export {
|
|
|
144
145
|
rt as ApExtensionSelect,
|
|
145
146
|
Ge as ApField,
|
|
146
147
|
Le as ApFieldCheckbox,
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
Re as ApFieldDate,
|
|
149
|
+
We as ApFieldDateRange,
|
|
149
150
|
we as ApFieldNumber,
|
|
150
151
|
$e as ApFieldPassword,
|
|
151
152
|
ve as ApFieldRadio,
|
|
152
153
|
Ye as ApFieldRate,
|
|
153
154
|
Qe as ApFieldSegmented,
|
|
154
|
-
|
|
155
|
+
ze as ApFieldSelect,
|
|
155
156
|
qe as ApFieldSlider,
|
|
156
157
|
Ke as ApFieldSwitch,
|
|
157
158
|
Pe as ApFieldText,
|
|
@@ -163,8 +164,8 @@ export {
|
|
|
163
164
|
pe as ApFormItem,
|
|
164
165
|
dt as ApFormItemBatchInput,
|
|
165
166
|
Y as ApFormItemCheckbox,
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
W as ApFormItemDate,
|
|
168
|
+
z as ApFormItemDateRange,
|
|
168
169
|
fe as ApFormItemGroup,
|
|
169
170
|
O as ApFormItemNumber,
|
|
170
171
|
$ as ApFormItemRadio,
|
|
@@ -176,17 +177,17 @@ export {
|
|
|
176
177
|
ee as ApFormItemTextPassword,
|
|
177
178
|
le as ApFormList,
|
|
178
179
|
se as ApFormModalForm,
|
|
179
|
-
|
|
180
|
+
Se as ApFormProvider,
|
|
180
181
|
de as ApFormSearchForm,
|
|
181
182
|
ce as ApFormSet,
|
|
182
183
|
tt as ApGroupSearch,
|
|
183
|
-
|
|
184
|
+
gr as ApImage,
|
|
184
185
|
ho as ApInfoLayout,
|
|
185
186
|
hr as ApInputRadio,
|
|
186
187
|
Mr as ApLabel,
|
|
187
188
|
Pr as ApLabelGroup,
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
Rr as ApLadder,
|
|
190
|
+
Vo as ApList,
|
|
190
191
|
Uo as ApModal,
|
|
191
192
|
Yr as ApNeedNameKeyDefault,
|
|
192
193
|
pt as ApPopoverSelect,
|
|
@@ -198,7 +199,7 @@ export {
|
|
|
198
199
|
ct as ApTable,
|
|
199
200
|
Xo as ApTableModal,
|
|
200
201
|
Co as ApTag,
|
|
201
|
-
|
|
202
|
+
go as ApTagGroup,
|
|
202
203
|
Ur as ApTitle,
|
|
203
204
|
Jo as ApTransformDataHelper,
|
|
204
205
|
Eo as ApUpload,
|
|
@@ -212,25 +213,26 @@ export {
|
|
|
212
213
|
no as DictCode,
|
|
213
214
|
It as EditableTable,
|
|
214
215
|
bt as EditableTableFormItem,
|
|
215
|
-
|
|
216
|
+
Pt as InternalScrollBar,
|
|
216
217
|
Mo as NeedNameKeyDefault,
|
|
217
|
-
|
|
218
|
+
Gt as ScrollBar,
|
|
218
219
|
To as WorkOrderModal,
|
|
219
220
|
eo as adminToken,
|
|
220
221
|
oo as aplusToken,
|
|
221
222
|
b as buildLocaleContext,
|
|
222
223
|
C as buildTranslator,
|
|
223
|
-
|
|
224
|
+
Hr as computedRecords,
|
|
224
225
|
n as configProviderContextKey,
|
|
225
226
|
d as configProviderProps,
|
|
226
227
|
Cr as convertExportField,
|
|
227
228
|
Fo as createWorkOrderModal,
|
|
228
229
|
a as default,
|
|
229
230
|
G as defaultNamespace,
|
|
231
|
+
St as ensureRangeValue,
|
|
230
232
|
$r as flattenColumns,
|
|
231
233
|
jr as formatDataIndex,
|
|
232
234
|
qr as formatNumber,
|
|
233
|
-
|
|
235
|
+
R as globalConfigCached,
|
|
234
236
|
Tr as handleExportDownload,
|
|
235
237
|
c as keysOf,
|
|
236
238
|
io as langMap,
|
|
@@ -239,18 +241,18 @@ export {
|
|
|
239
241
|
M as namespaceContextKey,
|
|
240
242
|
l as pathMap,
|
|
241
243
|
F as provideGlobalConfig,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
+
g as translate,
|
|
245
|
+
Rt as useControllableValue,
|
|
244
246
|
P as useGetDerivedNamespace,
|
|
245
247
|
I as useGlobalConfig,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
S as useLocale,
|
|
249
|
+
wt as useManualRef,
|
|
250
|
+
Lt as useMessage,
|
|
249
251
|
E as useNamespace,
|
|
250
|
-
|
|
252
|
+
Vr as usePageListApTable,
|
|
251
253
|
Zo as useTableModal,
|
|
252
254
|
nt as useTablePaging,
|
|
253
|
-
|
|
255
|
+
_r as useTableRefresh,
|
|
254
256
|
or as useTableSelectModal,
|
|
255
|
-
|
|
257
|
+
vt as useThrottleRef
|
|
256
258
|
};
|
|
@@ -56,6 +56,7 @@ declare const __VLS_component: DefineComponent<ApFieldDateProps, {}, {}, {}, {},
|
|
|
56
56
|
showToday: boolean;
|
|
57
57
|
showTime: boolean | SharedTimeProps<dayjs.Dayjs>;
|
|
58
58
|
emptyText: string;
|
|
59
|
+
formatBegins: boolean;
|
|
59
60
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
60
61
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
61
62
|
export default _default;
|
|
@@ -83,23 +83,24 @@ const le = /* @__PURE__ */ b({
|
|
|
83
83
|
onChange: {},
|
|
84
84
|
onOk: {},
|
|
85
85
|
format: { default: "Y-D" },
|
|
86
|
+
formatBegins: { type: Boolean, default: !0 },
|
|
86
87
|
timezone: {}
|
|
87
88
|
},
|
|
88
89
|
emits: ["update:value"],
|
|
89
90
|
setup(h, { emit: B }) {
|
|
90
|
-
const e = h,
|
|
91
|
+
const e = h, g = B, { value: m, updateValue: c } = Z(
|
|
91
92
|
e,
|
|
92
|
-
|
|
93
|
-
),
|
|
93
|
+
g
|
|
94
|
+
), k = Y("Date", e), n = i(
|
|
94
95
|
() => I.indexOf(e.format) > -1
|
|
95
96
|
), d = i(
|
|
96
97
|
() => n.value ? H[e.format] : e.format
|
|
97
|
-
),
|
|
98
|
-
if (y(t(
|
|
98
|
+
), p = i(() => {
|
|
99
|
+
if (y(t(m)))
|
|
99
100
|
return;
|
|
100
|
-
let o = r(t(
|
|
101
|
-
return e.timezone && (o = r(W(t(
|
|
102
|
-
}),
|
|
101
|
+
let o = r(t(m));
|
|
102
|
+
return e.timezone && (o = r(W(t(m), e.timezone))), o;
|
|
103
|
+
}), P = i(() => t(n) ? e.picker ?? U[e.format] : e.picker), C = i(() => {
|
|
103
104
|
const o = t(n) ? K[e.format] : {};
|
|
104
105
|
return {
|
|
105
106
|
...$(e, [
|
|
@@ -111,7 +112,7 @@ const le = /* @__PURE__ */ b({
|
|
|
111
112
|
"onUpdate:value",
|
|
112
113
|
"mode"
|
|
113
114
|
]),
|
|
114
|
-
placeholder: t(
|
|
115
|
+
placeholder: t(k),
|
|
115
116
|
...o
|
|
116
117
|
};
|
|
117
118
|
}), f = L(e.timezone);
|
|
@@ -122,14 +123,19 @@ const le = /* @__PURE__ */ b({
|
|
|
122
123
|
}
|
|
123
124
|
const l = r(o);
|
|
124
125
|
c(
|
|
125
|
-
f(
|
|
126
|
+
f(
|
|
127
|
+
l,
|
|
128
|
+
t(n) ? t(d) : void 0,
|
|
129
|
+
e.formatBegins
|
|
130
|
+
)
|
|
126
131
|
);
|
|
127
132
|
}
|
|
128
133
|
function T(o, l) {
|
|
129
134
|
var s;
|
|
130
135
|
const u = r(o), a = o ? f(
|
|
131
136
|
u,
|
|
132
|
-
t(n) ? t(d) : void 0
|
|
137
|
+
t(n) ? t(d) : void 0,
|
|
138
|
+
e.formatBegins
|
|
133
139
|
) : null;
|
|
134
140
|
(s = e.onChange) == null || s.call(e, a, l);
|
|
135
141
|
}
|
|
@@ -137,16 +143,17 @@ const le = /* @__PURE__ */ b({
|
|
|
137
143
|
var a;
|
|
138
144
|
const l = r(o), u = o ? f(
|
|
139
145
|
l,
|
|
140
|
-
t(n) ? t(d) : void 0
|
|
146
|
+
t(n) ? t(d) : void 0,
|
|
147
|
+
e.formatBegins
|
|
141
148
|
) : null;
|
|
142
149
|
(a = e.onOk) == null || a.call(e, u);
|
|
143
150
|
}
|
|
144
151
|
return (o, l) => o.mode === "read" ? (v(), _(w, { key: 0 }, [
|
|
145
|
-
M(R(
|
|
152
|
+
M(R(p.value ? t(r)(p.value).format(d.value) : o.emptyText), 1)
|
|
146
153
|
], 64)) : (v(), F(t(j), A({ key: 1 }, C.value, {
|
|
147
|
-
value:
|
|
154
|
+
value: p.value,
|
|
148
155
|
format: d.value,
|
|
149
|
-
picker:
|
|
156
|
+
picker: P.value,
|
|
150
157
|
"onUpdate:value": O,
|
|
151
158
|
onChange: T,
|
|
152
159
|
onOk: S
|
|
@@ -41,6 +41,11 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
|
|
|
41
41
|
onChange?: (ts: number | null, dayStr: string) => void;
|
|
42
42
|
onOk?: (ts: number | null) => void;
|
|
43
43
|
format?: LiteralUnion<ApFormatPresetType, string>;
|
|
44
|
+
/**
|
|
45
|
+
* 格式化时间时是否以`format`的开始
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
formatBegins?: boolean;
|
|
44
49
|
/**
|
|
45
50
|
* 指定时区,指定后value会变为特定时区下的timestamp
|
|
46
51
|
*/
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as G, ref as
|
|
2
|
-
import { Button as B, Modal as
|
|
3
|
-
import { getSingleVNode as
|
|
4
|
-
import { useInjectApTable as
|
|
1
|
+
import { defineComponent as G, ref as y, unref as e, computed as H, useSlots as L, createVNode as l, cloneVNode as M, openBlock as x, createElementBlock as P, Fragment as q, createBlock as J, resolveDynamicComponent as Q, createCommentVNode as W, withCtx as i, createElementVNode as s, normalizeClass as r, toDisplayString as c, createTextVNode as C, isRef as X } from "vue";
|
|
2
|
+
import { Button as B, Modal as Y, RadioGroup as Z, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
|
|
3
|
+
import { getSingleVNode as ee } from "../../../../utils/slot.mjs";
|
|
4
|
+
import { useInjectApTable as te } from "../../../context.mjs";
|
|
5
5
|
import "../tree-select/index.vue.mjs";
|
|
6
|
-
import { useTableColumnState as
|
|
6
|
+
import { useTableColumnState as le } from "../../../hooks/use-table-column-state.mjs";
|
|
7
7
|
import "../../../../config-provider/index.mjs";
|
|
8
8
|
import "../sorter/index.vue.mjs";
|
|
9
|
-
import
|
|
10
|
-
import { SettingOutlined as
|
|
11
|
-
import { useLocale as
|
|
9
|
+
import oe, { customCloneColumnStates as N } from "../utils.mjs";
|
|
10
|
+
import { SettingOutlined as ne } from "@ant-design/icons-vue";
|
|
11
|
+
import { useLocale as ae } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
13
|
+
import se from "../tree-select/index.vue2.mjs";
|
|
14
|
+
import ie from "../sorter/index.vue2.mjs";
|
|
15
|
+
const re = {
|
|
16
16
|
style: {
|
|
17
17
|
lineHeight: "22px",
|
|
18
18
|
color: "#8896B0"
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, Be = /* @__PURE__ */ G({
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
23
23
|
config: {
|
|
@@ -25,46 +25,46 @@ const ie = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
setup(A) {
|
|
28
|
-
const
|
|
28
|
+
const m = A, {
|
|
29
29
|
columnsBackup: V,
|
|
30
30
|
size: z,
|
|
31
|
-
updateSize:
|
|
32
|
-
updateColumns:
|
|
33
|
-
} =
|
|
31
|
+
updateSize: d,
|
|
32
|
+
updateColumns: f
|
|
33
|
+
} = te(), g = y(e(z)), R = H(() => m.config.persistenceKey), {
|
|
34
34
|
columnState: n,
|
|
35
|
-
setColumnState:
|
|
36
|
-
isAllSelected:
|
|
37
|
-
toggleSelectAll:
|
|
38
|
-
columnStateBackup:
|
|
39
|
-
setColumnStateBackup:
|
|
40
|
-
cacheColumnStateIfNeeded:
|
|
41
|
-
} =
|
|
35
|
+
setColumnState: w,
|
|
36
|
+
isAllSelected: D,
|
|
37
|
+
toggleSelectAll: O,
|
|
38
|
+
columnStateBackup: U,
|
|
39
|
+
setColumnStateBackup: E,
|
|
40
|
+
cacheColumnStateIfNeeded: I
|
|
41
|
+
} = le(m.config, R, []), {
|
|
42
42
|
t: a
|
|
43
|
-
} =
|
|
44
|
-
b:
|
|
43
|
+
} = ae(), {
|
|
44
|
+
b: v,
|
|
45
45
|
be: S
|
|
46
46
|
} = T("ap-column-setting"), {
|
|
47
|
-
b:
|
|
48
|
-
} = T("ap-table"), u =
|
|
49
|
-
icon: l(
|
|
50
|
-
class:
|
|
51
|
-
}, null), k = b ?
|
|
47
|
+
b: K
|
|
48
|
+
} = T("ap-table"), u = y(!1), $ = L(), b = ee($.trigger) || l(B, {
|
|
49
|
+
icon: l(ne, null, null),
|
|
50
|
+
class: K("setting-trigger-button")
|
|
51
|
+
}, null), k = b ? M(b, {
|
|
52
52
|
onClick: () => {
|
|
53
53
|
u.value = !0;
|
|
54
54
|
}
|
|
55
55
|
}) : null;
|
|
56
56
|
function j() {
|
|
57
|
-
|
|
57
|
+
w(N(e(U)));
|
|
58
58
|
}
|
|
59
59
|
function F() {
|
|
60
60
|
var t, o;
|
|
61
|
-
|
|
61
|
+
f == null || f(oe(e(V), e(n))), d == null || d(e(g)), u.value = !1;
|
|
62
62
|
const p = N(n.value);
|
|
63
|
-
|
|
63
|
+
E(p), I(p), (o = (t = m.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
|
|
64
64
|
}
|
|
65
|
-
return (p, t) => (
|
|
65
|
+
return (p, t) => (x(), P(q, null, [e(k) ? (x(), J(Q(e(k)), {
|
|
66
66
|
key: 0
|
|
67
|
-
})) :
|
|
67
|
+
})) : W("", !0), l(e(Y), {
|
|
68
68
|
open: u.value,
|
|
69
69
|
"onUpdate:open": t[2] || (t[2] = (o) => u.value = o),
|
|
70
70
|
title: e(a)("ap.apTable.setting.title"),
|
|
@@ -76,32 +76,32 @@ const ie = {
|
|
|
76
76
|
},
|
|
77
77
|
onOk: F
|
|
78
78
|
}, {
|
|
79
|
-
default:
|
|
80
|
-
class: r(e(
|
|
81
|
-
}, [
|
|
82
|
-
class: r(e(
|
|
83
|
-
}, [
|
|
79
|
+
default: i(() => [s("div", {
|
|
80
|
+
class: r(e(v)("wrapper"))
|
|
81
|
+
}, [s("div", {
|
|
82
|
+
class: r(e(v)("left"))
|
|
83
|
+
}, [s("div", {
|
|
84
84
|
class: r(e(S)("left", "header"))
|
|
85
|
-
}, [
|
|
85
|
+
}, [s("div", null, [s("span", re, c(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
|
|
86
86
|
type: "link",
|
|
87
87
|
size: "small",
|
|
88
|
-
onClick: e(
|
|
88
|
+
onClick: e(O)
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
90
|
+
default: i(() => [C(c(e(D) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
|
|
91
91
|
_: 1
|
|
92
|
-
}, 8, ["onClick"])]), l(e(
|
|
93
|
-
value:
|
|
94
|
-
"onUpdate:value": t[0] || (t[0] = (o) =>
|
|
92
|
+
}, 8, ["onClick"])]), l(e(Z), {
|
|
93
|
+
value: g.value,
|
|
94
|
+
"onUpdate:value": t[0] || (t[0] = (o) => g.value = o)
|
|
95
95
|
}, {
|
|
96
|
-
default:
|
|
96
|
+
default: i(() => [l(e(_), {
|
|
97
97
|
value: "small"
|
|
98
98
|
}, {
|
|
99
|
-
default:
|
|
99
|
+
default: i(() => [C(c(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
|
|
100
100
|
_: 1
|
|
101
101
|
}), l(e(_), {
|
|
102
102
|
value: "middle"
|
|
103
103
|
}, {
|
|
104
|
-
default:
|
|
104
|
+
default: i(() => [C(c(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
|
|
105
105
|
_: 1
|
|
106
106
|
})]),
|
|
107
107
|
_: 1
|
|
@@ -110,7 +110,7 @@ const ie = {
|
|
|
110
110
|
style: {
|
|
111
111
|
margin: "0px"
|
|
112
112
|
}
|
|
113
|
-
}), l(
|
|
113
|
+
}), l(se, {
|
|
114
114
|
class: r(e(S)("left", "content")),
|
|
115
115
|
value: e(n)
|
|
116
116
|
}, null, 8, ["class", "value"])], 2), l(e(h), {
|
|
@@ -119,11 +119,11 @@ const ie = {
|
|
|
119
119
|
height: "100%",
|
|
120
120
|
margin: "0px"
|
|
121
121
|
}
|
|
122
|
-
}),
|
|
123
|
-
class: r(e(
|
|
124
|
-
}, [l(
|
|
122
|
+
}), s("div", {
|
|
123
|
+
class: r(e(v)("right"))
|
|
124
|
+
}, [l(ie, {
|
|
125
125
|
value: e(n),
|
|
126
|
-
"onUpdate:value": t[1] || (t[1] = (o) =>
|
|
126
|
+
"onUpdate:value": t[1] || (t[1] = (o) => X(n) ? n.value = o : null),
|
|
127
127
|
onReset: j
|
|
128
128
|
}, null, 8, ["value"])], 2)], 2)]),
|
|
129
129
|
_: 1
|
|
@@ -131,5 +131,5 @@ const ie = {
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
export {
|
|
134
|
-
|
|
134
|
+
Be as default
|
|
135
135
|
};
|
|
@@ -1838,6 +1838,7 @@ export declare const apTableRenderItemMap: {
|
|
|
1838
1838
|
showToday: boolean;
|
|
1839
1839
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
1840
1840
|
emptyText: string;
|
|
1841
|
+
formatBegins: boolean;
|
|
1841
1842
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
1842
1843
|
P: {};
|
|
1843
1844
|
B: {};
|
|
@@ -1874,6 +1875,7 @@ export declare const apTableRenderItemMap: {
|
|
|
1874
1875
|
showToday: boolean;
|
|
1875
1876
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
1876
1877
|
emptyText: string;
|
|
1878
|
+
formatBegins: boolean;
|
|
1877
1879
|
}>;
|
|
1878
1880
|
__isFragment?: never;
|
|
1879
1881
|
__isTeleport?: never;
|
|
@@ -1909,6 +1911,7 @@ export declare const apTableRenderItemMap: {
|
|
|
1909
1911
|
showToday: boolean;
|
|
1910
1912
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
1911
1913
|
emptyText: string;
|
|
1914
|
+
formatBegins: boolean;
|
|
1912
1915
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1913
1916
|
$slots: Readonly<{
|
|
1914
1917
|
dateRender: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApColumnState, ApTableSettingType } from '../interface';
|
|
2
1
|
import { Ref, ComputedRef, ShallowRef } from 'vue';
|
|
3
|
-
|
|
2
|
+
import { ApColumnState, ApTableSettingType } from '../interface';
|
|
3
|
+
export declare const useTableColumnState: (columnSetting: ApTableSettingType, persistenceKey: Ref<string | undefined>, initialColumnState: ApColumnState[]) => {
|
|
4
4
|
columnState: Ref<{
|
|
5
5
|
key: string | number;
|
|
6
6
|
show?: boolean | undefined;
|