@aplus-frontend/ui 0.5.8 → 0.5.10

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.
Files changed (40) hide show
  1. package/es/index.mjs +109 -107
  2. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +70 -54
  3. package/es/src/ap-descriptions/formatter/index.d.ts +2 -1
  4. package/es/src/ap-descriptions/formatter/index.mjs +92 -76
  5. package/es/src/ap-descriptions/helper.d.ts +3 -4
  6. package/es/src/ap-descriptions/helper.mjs +15 -13
  7. package/es/src/ap-descriptions/interface.d.ts +6 -0
  8. package/es/src/ap-grid/editable/form-item.vue.mjs +7 -7
  9. package/es/src/ap-grid/editable/index.vue.mjs +16 -16
  10. package/es/src/ap-grid/utils/col.mjs +35 -34
  11. package/es/src/ap-table/ap-table.vue2.mjs +49 -45
  12. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -0
  13. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +33 -33
  14. package/es/src/business/hooks/index.d.ts +1 -0
  15. package/es/src/business/hooks/index.mjs +4 -2
  16. package/es/src/business/hooks/usePageListApGrid.d.ts +34 -0
  17. package/es/src/business/hooks/usePageListApGrid.mjs +90 -0
  18. package/es/src/index.mjs +61 -59
  19. package/lib/index.js +1 -1
  20. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  21. package/lib/src/ap-descriptions/formatter/index.d.ts +2 -1
  22. package/lib/src/ap-descriptions/formatter/index.js +1 -1
  23. package/lib/src/ap-descriptions/helper.d.ts +3 -4
  24. package/lib/src/ap-descriptions/helper.js +1 -1
  25. package/lib/src/ap-descriptions/interface.d.ts +6 -0
  26. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  27. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  28. package/lib/src/ap-grid/utils/col.js +1 -1
  29. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  30. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -0
  31. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
  32. package/lib/src/business/hooks/index.d.ts +1 -0
  33. package/lib/src/business/hooks/index.js +1 -1
  34. package/lib/src/business/hooks/usePageListApGrid.d.ts +34 -0
  35. package/lib/src/business/hooks/usePageListApGrid.js +1 -0
  36. package/lib/src/index.js +1 -1
  37. package/package.json +5 -5
  38. package/theme/ap-descriptions/ap-descriptions.css +10 -0
  39. package/theme/ap-descriptions/ap-descriptions.less +13 -0
  40. package/theme/index.css +10 -0
package/es/index.mjs CHANGED
@@ -2,11 +2,11 @@ import * as o from "./src/index.mjs";
2
2
  import { default as l } from "./src/path-map.mjs";
3
3
  import "./src/hooks/index.mjs";
4
4
  import { configProviderProps as d } from "./src/config-provider/config-provider-props.mjs";
5
- import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as n } from "./src/config-provider/constants.mjs";
5
+ import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as i } 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 T, buildTranslator as S, localeContextKey as C, translate as D, useLocale as g } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as G, namespaceContextKey as E, useGetDerivedNamespace as P, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as L, globalConfigCached as N } from "./src/config-provider/config-provider.mjs";
7
+ import { buildLocaleContext as T, buildTranslator as S, localeContextKey as C, translate as g, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
8
+ import { defaultNamespace as h, namespaceContextKey as P, useGetDerivedNamespace as E, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
9
+ import { ConfigProvider as M, globalConfigCached as N } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as w } from "./src/config-provider/index.mjs";
11
11
  import { ApFormItemText as B } from "./src/ap-form/items/text/index.mjs";
12
12
  import { default as K } from "./src/ap-form/items/text-area/index.vue.mjs";
@@ -24,15 +24,15 @@ import { default as fe } from "./src/ap-form/item-group/index.vue.mjs";
24
24
  import { default as le } from "./src/ap-form/list/index.vue.mjs";
25
25
  import { default as de } from "./src/ap-form/search-form/index.vue.mjs";
26
26
  import { default as se } from "./src/ap-form/modal-form/index.vue.mjs";
27
- import { default as ne } from "./src/ap-form/dependency/index.vue.mjs";
27
+ import { default as ie } from "./src/ap-form/dependency/index.vue.mjs";
28
28
  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 Te } from "./src/ap-form/render/control.vue.mjs";
31
31
  import { default as Ce } from "./src/ap-form/render/item.vue.mjs";
32
- import { default as ge } from "./src/ap-form/provider/index.vue.mjs";
33
- import { ApField as Ge } from "./src/ap-field/index.mjs";
34
- import { ApFieldText as Pe } from "./src/ap-field/text/index.mjs";
35
- import { default as Me } from "./src/ap-field/checkbox/index.vue.mjs";
32
+ import { default as De } from "./src/ap-form/provider/index.vue.mjs";
33
+ import { ApField as he } from "./src/ap-field/index.mjs";
34
+ import { ApFieldText as Ee } from "./src/ap-field/text/index.mjs";
35
+ import { default as Le } from "./src/ap-field/checkbox/index.vue.mjs";
36
36
  import { default as Ne } 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 Be } from "./src/ap-field/radio/index.vue.mjs";
@@ -50,15 +50,15 @@ import { default as ao } from "./src/ap-action/item-modal/index.vue.mjs";
50
50
  import { default as mo } from "./src/ap-action/item-popconfirm/index.vue.mjs";
51
51
  import { default as xo } from "./src/ap-action/item-dropdown/index.vue.mjs";
52
52
  import { default as so } from "./src/ap-action/group/index.vue.mjs";
53
- import { DictCode as no, langMap as io } from "./src/work-order-modal/interfaces.mjs";
53
+ import { DictCode as io, langMap as no } from "./src/work-order-modal/interfaces.mjs";
54
54
  import { createWorkOrderModal as Fo } from "./src/work-order-modal/createWorkOrder.mjs";
55
55
  import { default as bo } from "./src/work-order-modal/work-order-modal.vue.mjs";
56
56
  import { default as So } from "./src/ap-tag/ap-tag.vue.mjs";
57
- import { default as Do } from "./src/ap-tag/ap-tag-group.vue.mjs";
58
- import { default as ho } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
59
- import { NeedNameKeyDefault as Eo } from "./src/ap-upload/apUploadTypes.mjs";
57
+ import { default as go } from "./src/ap-tag/ap-tag-group.vue.mjs";
58
+ import { default as Go } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
59
+ import { NeedNameKeyDefault as Po } from "./src/ap-upload/apUploadTypes.mjs";
60
60
  import { default as Ro } from "./src/ap-upload/apUpload.vue.mjs";
61
- import { ApDownLoadNeedNameKeyDefault as Lo } from "./src/ap-download/interface.mjs";
61
+ import { ApDownLoadNeedNameKeyDefault as Mo } from "./src/ap-download/interface.mjs";
62
62
  import { default as yo } from "./src/ap-download/ap-download.vue.mjs";
63
63
  import { CheckCard as vo } from "./src/check-card/index.mjs";
64
64
  import { default as ko } from "./src/check-card/group.vue.mjs";
@@ -77,14 +77,14 @@ import { ApBatchAction as mr } from "./src/business/ap-batch-action/index.mjs";
77
77
  import { ApBatchActionGroup as xr } from "./src/business/ap-batch-action-group/index.mjs";
78
78
  import { ApButtonGroup as ur } from "./src/business/ap-button-group/index.mjs";
79
79
  import { ApCard as Ar } from "./src/business/ap-card/index.mjs";
80
- import { ApExpandAlert as ir } from "./src/business/ap-expand-alert/index.mjs";
80
+ import { ApExpandAlert as nr } from "./src/business/ap-expand-alert/index.mjs";
81
81
  import { ApExportGroupActionType as Fr } from "./src/business/ap-export-group/interface.mjs";
82
82
  import { ApExportGroup as br } from "./src/business/ap-export-group/index.mjs";
83
83
  import { handleExportDownload as Sr } from "./src/business/ap-export-group/handleExportDownload.mjs";
84
- import { convertExportField as Dr } from "./src/business/ap-export-group/convertExportField.mjs";
85
- import { ApImage as hr } from "./src/business/ap-image/index.mjs";
86
- import { ApInputRadio as Er } from "./src/business/ap-input-radio/index.mjs";
87
- import { ApLabel as Rr, ApLabelGroup as Mr } from "./src/business/ap-label/index.mjs";
84
+ import { convertExportField as gr } from "./src/business/ap-export-group/convertExportField.mjs";
85
+ import { ApImage as Gr } from "./src/business/ap-image/index.mjs";
86
+ import { ApInputRadio as Pr } from "./src/business/ap-input-radio/index.mjs";
87
+ import { ApLabel as Rr, ApLabelGroup as Lr } from "./src/business/ap-label/index.mjs";
88
88
  import { locales as Nr } from "./src/business/ap-ladder/interface.mjs";
89
89
  import { ApLadder as wr } from "./src/business/ap-ladder/index.mjs";
90
90
  import { ApSelectLayout as Br } from "./src/business/ap-select-layout/index.mjs";
@@ -92,36 +92,37 @@ import { ApStatus as Kr, ApStatusGroup as Or } from "./src/business/ap-status/in
92
92
  import { ApTitle as zr } from "./src/business/ap-title/index.mjs";
93
93
  import { usePageListApTable as Wr } from "./src/business/hooks/usePageListApTable.mjs";
94
94
  import { useTableRefresh as Hr } from "./src/business/hooks/useTableRefresh.mjs";
95
- import { computedRecords as jr, flattenColumns as qr, formatDataIndex as Jr, formatNumber as Qr } from "./src/business/ap-summary/utils.mjs";
96
- import { ApSummary as Yr } from "./src/business/ap-summary/index.mjs";
97
- import { ApNeedNameKeyDefault as et } from "./src/business/ap-appendix/interface.mjs";
98
- import { ApAppendix as rt } from "./src/business/ap-appendix/index.mjs";
99
- import { ApExtensionSelect as pt, ApGroupSearch as at, ApPopoverSelect as ft } from "./src/business/ap-group-search/index.mjs";
100
- import { default as lt } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
101
- import { default as dt } from "./src/business/batch-input-group/index.vue.mjs";
102
- import { default as st } from "./src/business/batch-input-group/form-item.vue.mjs";
103
- import { ApSizeInput as nt } from "./src/business/ap-size-input/index.mjs";
104
- import { useTablePaging as ct } from "./src/ap-table/hooks/use-table-paging.mjs";
105
- import { ApTable as It } from "./src/ap-table/index.mjs";
106
- import { default as Tt } from "./src/editable-table/index.vue.mjs";
107
- import { default as Ct } from "./src/editable-table/form-item.vue.mjs";
108
- import { default as gt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
109
- import { ensureRangeValue as Gt } from "./src/scroll-bar/utils/index.mjs";
110
- import { default as Pt } from "./src/scroll-bar/index.vue.mjs";
111
- import { default as Mt } from "./src/scroll-bar/internal.vue.mjs";
112
- import { default as Nt } from "./src/scroll-view/index.vue.mjs";
113
- import { default as wt } from "./src/portal/index.vue.mjs";
114
- import { default as Bt } from "./src/full-screen/index.vue.mjs";
115
- import { default as Kt } from "./src/resize-observer/index.vue.mjs";
116
- import { default as Ut } from "./src/ap-grid/index.vue.mjs";
117
- import { default as Vt } from "./src/ap-grid/editable/index.vue.mjs";
118
- import { default as _t } from "./src/ap-grid/editable/form-item.vue.mjs";
119
- import { useMessage as $t } from "./src/hooks/useMessage.mjs";
120
- import { useControllableValue as qt } from "./src/hooks/useControllableValue.mjs";
121
- import { useManualRef as Qt } from "./src/hooks/useManualRef.mjs";
122
- import { useThrottleRef as Yt } from "./src/hooks/useThrottleRef.mjs";
123
- import { useFullScreen as ep } from "./src/hooks/useFullScreen.mjs";
124
- import { useResize as rp } from "./src/hooks/useResize.mjs";
95
+ import { usePageListApGrid as jr } from "./src/business/hooks/usePageListApGrid.mjs";
96
+ import { computedRecords as Jr, flattenColumns as Qr, formatDataIndex as Xr, formatNumber as Yr } from "./src/business/ap-summary/utils.mjs";
97
+ import { ApSummary as et } from "./src/business/ap-summary/index.mjs";
98
+ import { ApNeedNameKeyDefault as rt } from "./src/business/ap-appendix/interface.mjs";
99
+ import { ApAppendix as pt } from "./src/business/ap-appendix/index.mjs";
100
+ import { ApExtensionSelect as ft, ApGroupSearch as mt, ApPopoverSelect as lt } from "./src/business/ap-group-search/index.mjs";
101
+ import { default as dt } from "./src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs";
102
+ import { default as st } from "./src/business/batch-input-group/index.vue.mjs";
103
+ import { default as it } from "./src/business/batch-input-group/form-item.vue.mjs";
104
+ import { ApSizeInput as ct } from "./src/business/ap-size-input/index.mjs";
105
+ import { useTablePaging as It } from "./src/ap-table/hooks/use-table-paging.mjs";
106
+ import { ApTable as Tt } from "./src/ap-table/index.mjs";
107
+ import { default as Ct } from "./src/editable-table/index.vue.mjs";
108
+ import { default as Dt } from "./src/editable-table/form-item.vue.mjs";
109
+ import { default as ht } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
110
+ import { ensureRangeValue as Et } from "./src/scroll-bar/utils/index.mjs";
111
+ import { default as Lt } from "./src/scroll-bar/index.vue.mjs";
112
+ import { default as Nt } from "./src/scroll-bar/internal.vue.mjs";
113
+ import { default as wt } from "./src/scroll-view/index.vue.mjs";
114
+ import { default as Bt } from "./src/portal/index.vue.mjs";
115
+ import { default as Kt } from "./src/full-screen/index.vue.mjs";
116
+ import { default as Ut } from "./src/resize-observer/index.vue.mjs";
117
+ import { default as Vt } from "./src/ap-grid/index.vue.mjs";
118
+ import { default as _t } from "./src/ap-grid/editable/index.vue.mjs";
119
+ import { default as $t } from "./src/ap-grid/editable/form-item.vue.mjs";
120
+ import { useMessage as qt } from "./src/hooks/useMessage.mjs";
121
+ import { useControllableValue as Qt } from "./src/hooks/useControllableValue.mjs";
122
+ import { useManualRef as Yt } from "./src/hooks/useManualRef.mjs";
123
+ import { useThrottleRef as ep } from "./src/hooks/useThrottleRef.mjs";
124
+ import { useFullScreen as rp } from "./src/hooks/useFullScreen.mjs";
125
+ import { useResize as pp } from "./src/hooks/useResize.mjs";
125
126
  const a = {
126
127
  install: (r) => {
127
128
  for (const t in o) {
@@ -138,7 +139,7 @@ export {
138
139
  xo as ApActionItemDropdown,
139
140
  ao as ApActionItemModal,
140
141
  mo as ApActionItemPopconfirm,
141
- rt as ApAppendix,
142
+ pt as ApAppendix,
142
143
  ar as ApAttachment,
143
144
  mr as ApBatchAction,
144
145
  xr as ApBatchActionGroup,
@@ -146,16 +147,16 @@ export {
146
147
  ur as ApButtonGroup,
147
148
  Ar as ApCard,
148
149
  jo as ApConfirmButton,
149
- gt as ApDescriptions,
150
- Lo as ApDownLoadNeedNameKeyDefault,
150
+ ht as ApDescriptions,
151
+ Mo as ApDownLoadNeedNameKeyDefault,
151
152
  yo as ApDownload,
152
153
  Jo as ApDrawer,
153
- ir as ApExpandAlert,
154
+ nr as ApExpandAlert,
154
155
  br as ApExportGroup,
155
156
  Fr as ApExportGroupActionType,
156
- pt as ApExtensionSelect,
157
- Ge as ApField,
158
- Me as ApFieldCheckbox,
157
+ ft as ApExtensionSelect,
158
+ he as ApField,
159
+ Le as ApFieldCheckbox,
159
160
  Ne as ApFieldDate,
160
161
  Ve as ApFieldDateRange,
161
162
  we as ApFieldNumber,
@@ -166,14 +167,14 @@ export {
166
167
  _e as ApFieldSelect,
167
168
  qe as ApFieldSlider,
168
169
  Ke as ApFieldSwitch,
169
- Pe as ApFieldText,
170
+ Ee as ApFieldText,
170
171
  Ue as ApFieldTextArea,
171
172
  re as ApForm,
172
173
  Te as ApFormControlRender,
173
- ne as ApFormDependency,
174
+ ie as ApFormDependency,
174
175
  Ie as ApFormDrawerForm,
175
176
  pe as ApFormItem,
176
- st as ApFormItemBatchInput,
177
+ it as ApFormItemBatchInput,
177
178
  Y as ApFormItemCheckbox,
178
179
  V as ApFormItemDate,
179
180
  _ as ApFormItemDateRange,
@@ -188,91 +189,92 @@ export {
188
189
  ee as ApFormItemTextPassword,
189
190
  le as ApFormList,
190
191
  se as ApFormModalForm,
191
- ge as ApFormProvider,
192
+ De as ApFormProvider,
192
193
  de as ApFormSearchForm,
193
194
  ce as ApFormSet,
194
- Ut as ApGrid,
195
- at as ApGroupSearch,
196
- hr as ApImage,
197
- ho as ApInfoLayout,
198
- Er as ApInputRadio,
195
+ Vt as ApGrid,
196
+ mt as ApGroupSearch,
197
+ Gr as ApImage,
198
+ Go as ApInfoLayout,
199
+ Pr as ApInputRadio,
199
200
  Rr as ApLabel,
200
- Mr as ApLabelGroup,
201
+ Lr as ApLabelGroup,
201
202
  wr as ApLadder,
202
203
  zo as ApList,
203
204
  Oo as ApModal,
204
- et as ApNeedNameKeyDefault,
205
- ft as ApPopoverSelect,
205
+ rt as ApNeedNameKeyDefault,
206
+ lt as ApPopoverSelect,
206
207
  Br as ApSelectLayout,
207
- nt as ApSizeInput,
208
+ ct as ApSizeInput,
208
209
  Kr as ApStatus,
209
210
  Or as ApStatusGroup,
210
- Yr as ApSummary,
211
- It as ApTable,
211
+ et as ApSummary,
212
+ Tt as ApTable,
212
213
  Zo as ApTableModal,
213
214
  So as ApTag,
214
- Do as ApTagGroup,
215
+ go as ApTagGroup,
215
216
  zr as ApTitle,
216
217
  Xo as ApTransformDataHelper,
217
218
  Ro as ApUpload,
218
- lt as ApUploadSingle,
219
- dt as BatchInputGroup,
219
+ dt as ApUploadSingle,
220
+ st as BatchInputGroup,
220
221
  vo as CheckCard,
221
222
  ko as CheckCardGroup,
222
- L as ConfigProvider,
223
+ M as ConfigProvider,
223
224
  s as DEFAULT_NAMESPACE,
224
225
  A as DEFAULT_UIMODE,
225
- no as DictCode,
226
- Vt as EditableGrid,
227
- _t as EditableGridFormItem,
228
- Tt as EditableTable,
229
- Ct as EditableTableFormItem,
230
- Bt as FullScreen,
231
- Mt as InternalScrollBar,
232
- Eo as NeedNameKeyDefault,
233
- wt as Portal,
234
- Kt as ResizeObserver,
235
- Pt as ScrollBar,
236
- Nt as ScrollView,
226
+ io as DictCode,
227
+ _t as EditableGrid,
228
+ $t as EditableGridFormItem,
229
+ Ct as EditableTable,
230
+ Dt as EditableTableFormItem,
231
+ Kt as FullScreen,
232
+ Nt as InternalScrollBar,
233
+ Po as NeedNameKeyDefault,
234
+ Bt as Portal,
235
+ Ut as ResizeObserver,
236
+ Lt as ScrollBar,
237
+ wt as ScrollView,
237
238
  bo as WorkOrderModal,
238
239
  eo as adminToken,
239
240
  oo as aplusToken,
240
241
  T as buildLocaleContext,
241
242
  S as buildTranslator,
242
- jr as computedRecords,
243
- n as configProviderContextKey,
243
+ Jr as computedRecords,
244
+ i as configProviderContextKey,
244
245
  d as configProviderProps,
245
- Dr as convertExportField,
246
+ gr as convertExportField,
246
247
  Fo as createWorkOrderModal,
247
248
  a as default,
248
- G as defaultNamespace,
249
- Gt as ensureRangeValue,
250
- qr as flattenColumns,
251
- Jr as formatDataIndex,
252
- Qr as formatNumber,
249
+ h as defaultNamespace,
250
+ Et as ensureRangeValue,
251
+ Qr as flattenColumns,
252
+ Xr as formatDataIndex,
253
+ Yr as formatNumber,
253
254
  N as globalConfigCached,
254
255
  Sr as handleExportDownload,
255
256
  c as keysOf,
256
- io as langMap,
257
+ no as langMap,
257
258
  C as localeContextKey,
258
259
  Nr as locales,
259
- E as namespaceContextKey,
260
+ P as namespaceContextKey,
260
261
  l as pathMap,
261
262
  F as provideGlobalConfig,
262
- D as translate,
263
- qt as useControllableValue,
264
- ep as useFullScreen,
265
- P as useGetDerivedNamespace,
263
+ g as translate,
264
+ Qt as useControllableValue,
265
+ rp as useFullScreen,
266
+ E as useGetDerivedNamespace,
266
267
  I as useGlobalConfig,
267
- g as useLocale,
268
- Qt as useManualRef,
269
- $t as useMessage,
268
+ D as useLocale,
269
+ Yt as useManualRef,
270
+ qt as useMessage,
270
271
  R as useNamespace,
272
+ jr as usePageListApGrid,
271
273
  Wr as usePageListApTable,
272
- rp as useResize,
274
+ pp as useResize,
273
275
  or as useTableModal,
274
- ct as useTablePaging,
276
+ It as useTablePaging,
275
277
  Hr as useTableRefresh,
276
278
  tr as useTableSelectModal,
277
- Yt as useThrottleRef
279
+ ep as useThrottleRef
278
280
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as N, createElementBlock as n, openBlock as l, normalizeStyle as h, normalizeClass as T, unref as r, createVNode as B, mergeProps as _, withCtx as f, Fragment as a, renderList as w, createBlock as i, h as c, renderSlot as E, resolveDynamicComponent as M } from "vue";
2
- import { Descriptions as V, DescriptionsItem as m } from "@aplus-frontend/antdv";
3
- import { mixinsAttachmentExtraProps as j, transformValue as x, isEmptyWithType as z } from "./helper.mjs";
4
- import { get as b } from "lodash-unified";
1
+ import { defineComponent as T, createElementBlock as i, openBlock as l, normalizeStyle as _, normalizeClass as d, unref as o, createVNode as w, mergeProps as E, withCtx as b, Fragment as p, renderList as M, createBlock as c, createCommentVNode as j, h as u, renderSlot as x, resolveDynamicComponent as z } from "vue";
2
+ import { Descriptions as A, DescriptionsItem as m } from "@aplus-frontend/antdv";
3
+ import { mixinsAttachmentExtraProps as F, transformValue as G, isEmptyWithType as L } from "./helper.mjs";
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 u } from "../config-provider/hooks/use-global-config.mjs";
8
- import { useNamespace as A } from "../config-provider/hooks/use-namespace.mjs";
9
- import F from "./help-message/index.vue2.mjs";
10
- const G = { key: 0 }, K = /* @__PURE__ */ N({
7
+ import { useGlobalConfig as f } from "../config-provider/hooks/use-global-config.mjs";
8
+ import { useNamespace as R } from "../config-provider/hooks/use-namespace.mjs";
9
+ import $ from "./help-message/index.vue2.mjs";
10
+ const I = { key: 0 }, Y = /* @__PURE__ */ T({
11
11
  __name: "ap-descriptions",
12
12
  props: {
13
13
  descriptionsProps: {},
@@ -17,69 +17,85 @@ const G = { key: 0 }, K = /* @__PURE__ */ N({
17
17
  className: {}
18
18
  },
19
19
  setup(g) {
20
- const p = g, S = u("uiMode", "admin"), C = u("apDescriptions"), k = u("downloadCenterTriggerConfig"), { m: v, b: P } = A("ap-descriptions"), D = (t = {}) => {
21
- var o;
20
+ const n = g, v = f("uiMode", "admin"), C = f("apDescriptions"), k = f("downloadCenterTriggerConfig"), { m: P, b: N, be: D } = R("ap-descriptions"), V = (e = {}) => {
21
+ var r;
22
22
  let s = "";
23
- return ((o = p.descriptionsProps) == null ? void 0 : o.layout) === "vertical" && (s = "start"), {
23
+ return ((r = n.descriptionsProps) == null ? void 0 : r.layout) === "vertical" && (s = "start"), {
24
24
  justifyContent: s,
25
- ...t
25
+ ...e
26
26
  };
27
- }, y = (t) => {
28
- var o, e;
29
- const s = b(p.dataSource, t.field);
30
- return t.customRender ? t.customRender(p.dataSource) : (t.valueType === "attachment" && (t.extraProps = j(t.extraProps, {
31
- fromConfig: (o = C.value) == null ? void 0 : o.downloadFile,
32
- fromGlobal: (e = k.value) == null ? void 0 : e.trigger
33
- })), x({ value: s, record: p.dataSource }, t));
27
+ }, y = (e) => {
28
+ var t, a;
29
+ const s = S(n.dataSource, e.field);
30
+ if (e.customRender)
31
+ return e.customRender(n.dataSource);
32
+ e.valueType === "attachment" && (e.extraProps = F(e.extraProps, {
33
+ fromConfig: (t = C.value) == null ? void 0 : t.downloadFile,
34
+ fromGlobal: (a = k.value) == null ? void 0 : a.trigger
35
+ }));
36
+ const r = e.format ? e.format(s, n.dataSource || {}) : s;
37
+ return G({ value: r, record: n.dataSource }, e);
38
+ }, B = (e) => {
39
+ if (e.visible != null) {
40
+ if (typeof e.visible == "boolean")
41
+ return e.visible;
42
+ if (typeof e.visible == "function")
43
+ return e.visible({
44
+ record: n.dataSource || {},
45
+ schema: e
46
+ });
47
+ }
48
+ return !0;
34
49
  };
35
- return (t, s) => {
36
- var o;
37
- return l(), n("div", {
38
- class: T([t.className, r(P)(), r(v)(r(S))]),
39
- style: h(t.style)
50
+ return (e, s) => {
51
+ var r;
52
+ return l(), i("div", {
53
+ class: d([e.className, o(N)(), o(P)(o(v))]),
54
+ style: _(e.style)
40
55
  }, [
41
- B(r(V), _(t.descriptionsProps, {
42
- "label-style": D({ ...((o = t.descriptionsProps) == null ? void 0 : o.labelStyle) || {} })
56
+ w(o(A), E(e.descriptionsProps, {
57
+ "label-style": V({ ...((r = e.descriptionsProps) == null ? void 0 : r.labelStyle) || {} })
43
58
  }), {
44
- default: f(() => [
45
- (l(!0), n(a, null, w(t.schemas, (e, d) => (l(), n(a, {
46
- key: e.field || "empty" + d
59
+ default: b(() => [
60
+ (l(!0), i(p, null, M(e.schemas, (t, a) => (l(), i(p, {
61
+ key: t.field || "empty" + a
47
62
  }, [
48
- e.valueType === "empty" ? (l(), i(r(m), {
63
+ t.valueType === "empty" ? (l(), c(o(m), {
49
64
  key: 0,
50
- "content-style": e.contentStyle,
51
- "label-style": e.labelStyle,
52
- span: e.span
53
- }, null, 8, ["content-style", "label-style", "span"])) : (l(), i(r(m), {
65
+ "content-style": t.contentStyle,
66
+ "label-style": t.labelStyle,
67
+ span: t.span
68
+ }, null, 8, ["content-style", "label-style", "span"])) : B(t) ? (l(), c(o(m), {
54
69
  key: 1,
55
- label: e.label ? c(a, [
56
- c(F, {
57
- helpMessage: e.helpMessage,
58
- label: e.label
70
+ class: d(o(D)("item", "ellipsis")),
71
+ label: t.label ? u(p, [
72
+ u($, {
73
+ helpMessage: t.helpMessage,
74
+ label: t.label
59
75
  })
60
76
  ]) : null,
61
- span: e.span,
62
- "content-style": e.contentStyle,
63
- "label-style": e.labelStyle
77
+ span: t.span,
78
+ "content-style": t.contentStyle,
79
+ "label-style": t.labelStyle
64
80
  }, {
65
- default: f(() => [
66
- r(z)(r(b)(t.dataSource, e.field), e.valueType) ? (l(), n("span", G, "--")) : (l(), n(a, { key: 1 }, [
67
- e.contentSlotName ? E(t.$slots, e.contentSlotName, {
81
+ default: b(() => [
82
+ o(L)(o(S)(e.dataSource, t.field), t) ? (l(), i("span", I, "--")) : (l(), i(p, { key: 1 }, [
83
+ t.contentSlotName ? x(e.$slots, t.contentSlotName, {
68
84
  key: 0,
69
- index: d,
70
- item: y(e),
71
- record: t.dataSource
72
- }) : (l(), i(M(
73
- c(a, [
74
- e.prefix,
75
- y(e),
76
- e.suffix
85
+ index: a,
86
+ item: y(t),
87
+ record: e.dataSource
88
+ }) : (l(), c(z(
89
+ u(p, [
90
+ t.prefix,
91
+ y(t),
92
+ t.suffix
77
93
  ])
78
94
  ), { key: 1 }))
79
95
  ], 64))
80
96
  ]),
81
97
  _: 2
82
- }, 1032, ["label", "span", "content-style", "label-style"]))
98
+ }, 1032, ["class", "label", "span", "content-style", "label-style"])) : j("", !0)
83
99
  ], 64))), 128))
84
100
  ]),
85
101
  _: 3
@@ -89,5 +105,5 @@ const G = { key: 0 }, K = /* @__PURE__ */ N({
89
105
  }
90
106
  });
91
107
  export {
92
- K as default
108
+ Y as default
93
109
  };
@@ -1,8 +1,9 @@
1
1
  import { ZoneAlias } from '@aplus-frontend/utils';
2
2
  import { FieldPath, FormatOptions } from '../interface';
3
3
  import { StyleValue } from 'vue';
4
+ import { ParagraphProps } from '@aplus-frontend/antdv/es/typography/Paragraph';
4
5
  /** 处理文本类型 */
5
- export declare function text(opt: FormatOptions): any;
6
+ export declare function text({ value }: FormatOptions, extraProps?: Omit<ParagraphProps, 'content'>): any;
6
7
  interface ArrayExtraProps {
7
8
  /** 默认值空格链接 */
8
9
  joinSymbol?: string;