@aplus-frontend/ui 0.2.11 → 0.2.13
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 +41 -39
- package/es/src/ap-list/index.vue.d.ts +1 -0
- package/es/src/ap-list/index.vue.mjs +85 -79
- package/es/src/ap-list/interface.d.ts +7 -0
- package/es/src/ap-table/ap-table.vue2.mjs +64 -65
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue.mjs +4 -0
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +82 -0
- package/es/src/ap-table/hooks/use-table-column-state.mjs +84 -75
- package/es/src/business/ap-image/ApImage.vue.d.ts +39 -1
- package/es/src/business/ap-image/ApImage.vue2.mjs +89 -39
- package/es/src/business/ap-image/hooks/useOss.mjs +35 -26
- package/es/src/business/ap-image/index.d.ts +41 -1
- package/es/src/business/ap-image/interface.d.ts +1 -0
- package/es/src/business/ap-image/style/css.d.ts +0 -1
- package/es/src/business/ap-image/style/css.js +1 -1
- package/es/src/business/ap-image/style/index.d.ts +0 -1
- package/es/src/business/ap-image/style/index.js +1 -1
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +30 -30
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +50 -0
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +227 -0
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue2.mjs +4 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/css.d.ts +0 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/css.js +1 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +0 -0
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -0
- package/es/src/business/ap-upload-file/hook/useInjectContext.d.ts +4 -0
- package/es/src/business/ap-upload-file/hook/useInjectContext.mjs +9 -0
- package/es/src/business/ap-upload-file/hook/useOss.d.ts +8 -0
- package/es/src/business/ap-upload-file/hook/useOss.mjs +30 -0
- package/es/src/business/ap-upload-file/hook/useProps.d.ts +12 -0
- package/es/src/business/ap-upload-file/hook/useProps.mjs +28 -0
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +3 -0
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +27 -0
- package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +3 -0
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +18 -0
- package/es/src/business/ap-upload-file/index.d.ts +3 -0
- package/es/src/business/ap-upload-file/index.mjs +2 -0
- package/es/src/business/ap-upload-file/interface.d.ts +29 -0
- package/es/src/business/ap-upload-file/interface.mjs +1 -0
- package/es/src/business/ap-upload-file/utils/accept.d.ts +16 -0
- package/es/src/business/ap-upload-file/utils/accept.mjs +55 -0
- package/es/src/business/ap-upload-file/utils/fileList.d.ts +5 -0
- package/es/src/business/ap-upload-file/utils/fileList.mjs +16 -0
- package/es/src/business/ap-upload-file/utils/upload.d.ts +10 -0
- package/es/src/business/ap-upload-file/utils/upload.mjs +62 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +43 -42
- package/es/src/config-provider/config-provider.d.ts +8 -0
- package/es/src/config-provider/css-var.d.ts +8 -0
- package/es/src/config-provider/css-var.mjs +25 -9
- package/es/src/config-provider/index.d.ts +48 -0
- package/es/src/index.mjs +33 -31
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/path-map.mjs +2 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +1 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +7 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.js +1 -0
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -0
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +39 -1
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-image/hooks/useOss.js +1 -1
- package/lib/src/business/ap-image/index.d.ts +41 -1
- package/lib/src/business/ap-image/interface.d.ts +1 -0
- package/lib/src/business/ap-image/style/css.d.ts +0 -1
- package/lib/src/business/ap-image/style/css.js +1 -1
- package/lib/src/business/ap-image/style/index.d.ts +0 -1
- package/lib/src/business/ap-image/style/index.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +50 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue2.js +1 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/css.d.ts +0 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/css.js +1 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +0 -0
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -0
- package/lib/src/business/ap-upload-file/hook/useInjectContext.d.ts +4 -0
- package/lib/src/business/ap-upload-file/hook/useInjectContext.js +1 -0
- package/lib/src/business/ap-upload-file/hook/useOss.d.ts +8 -0
- package/lib/src/business/ap-upload-file/hook/useOss.js +1 -0
- package/lib/src/business/ap-upload-file/hook/useProps.d.ts +12 -0
- package/lib/src/business/ap-upload-file/hook/useProps.js +1 -0
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -0
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -0
- package/lib/src/business/ap-upload-file/index.d.ts +3 -0
- package/lib/src/business/ap-upload-file/index.js +1 -0
- package/lib/src/business/ap-upload-file/interface.d.ts +29 -0
- package/lib/src/business/ap-upload-file/interface.js +1 -0
- package/lib/src/business/ap-upload-file/utils/accept.d.ts +16 -0
- package/lib/src/business/ap-upload-file/utils/accept.js +1 -0
- package/lib/src/business/ap-upload-file/utils/fileList.d.ts +5 -0
- package/lib/src/business/ap-upload-file/utils/fileList.js +1 -0
- package/lib/src/business/ap-upload-file/utils/upload.d.ts +10 -0
- package/lib/src/business/ap-upload-file/utils/upload.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +8 -0
- package/lib/src/config-provider/css-var.d.ts +8 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +48 -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/path-map.js +1 -1
- package/package.json +2 -2
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { defineComponent as ve, useSlots as Te, ref as
|
|
2
|
-
import {
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { defineComponent as ve, useSlots as Te, ref as P, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as w, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as Be, renderSlot as h, createCommentVNode as X, createElementVNode as I, normalizeProps as xe, guardReactiveProps as ke } from "vue";
|
|
2
|
+
import { Divider as ze, Table as Pe } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as Ie } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { ApForm as Ne } from "../ap-form/index.mjs";
|
|
5
|
+
import { noRenderAsFormItemValueList as Y } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { omit as
|
|
9
|
-
import { apColumnToColumn as
|
|
10
|
-
import
|
|
11
|
-
import { getRawDisplayValue as
|
|
12
|
-
import
|
|
13
|
-
import { isDef as
|
|
7
|
+
import { useTablePaging as Ee } from "./hooks/use-table-paging.mjs";
|
|
8
|
+
import { omit as Z, isUndefined as m, isBoolean as Ke } from "lodash-unified";
|
|
9
|
+
import { apColumnToColumn as Le, getTableTitle as Oe, getTableRenderType as Ve, getTableRenderProps as De, getTableCellRenderNode as Ae, getColumnOrder as ee, updateFormProps as je, getFieldProps as $e, getSearchFormItemRenderNode as We, recursionApColumns as ae, objectToString as He } from "./utils.mjs";
|
|
10
|
+
import qe from "./hooks/use-table-content-height.mjs";
|
|
11
|
+
import { getRawDisplayValue as Ue } from "../editable-table/utils.mjs";
|
|
12
|
+
import Ge from "./hooks/use-table-row-selection.mjs";
|
|
13
|
+
import { isDef as Me } from "../utils/index.mjs";
|
|
14
14
|
import "./components/setting/modal/index.vue.mjs";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
15
|
+
import "./components/paragraph-ellipsis/index.vue.mjs";
|
|
16
|
+
import { useProvideApTable as _e } from "./context.mjs";
|
|
17
|
+
import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
|
|
18
|
+
import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
|
|
19
|
+
import Xe from "./components/paragraph-ellipsis/index.vue2.mjs";
|
|
20
|
+
import Ye from "./components/setting/modal/index.vue2.mjs";
|
|
21
|
+
const Sa = /* @__PURE__ */ ve({
|
|
20
22
|
name: "ApTable",
|
|
21
23
|
__name: "ap-table",
|
|
22
24
|
props: {
|
|
@@ -145,15 +147,15 @@ const ha = /* @__PURE__ */ ve({
|
|
|
145
147
|
}) {
|
|
146
148
|
const a = oe;
|
|
147
149
|
let N = 0;
|
|
148
|
-
const S = Te(), [, re] =
|
|
150
|
+
const S = Te(), [, re] = Ie(), {
|
|
149
151
|
e: B,
|
|
150
152
|
b: i,
|
|
151
153
|
be: E
|
|
152
|
-
} =
|
|
154
|
+
} = Je("ap-table"), K = Qe("valueTypeMap"), {
|
|
153
155
|
height: le,
|
|
154
156
|
contentRef: ne
|
|
155
|
-
} =
|
|
156
|
-
|
|
157
|
+
} = qe(), x = P(a.size), d = P([]), L = P([]);
|
|
158
|
+
_e({
|
|
157
159
|
columns: s(() => d.value),
|
|
158
160
|
columnsBackup: s(() => L.value),
|
|
159
161
|
size: s(() => x.value),
|
|
@@ -169,36 +171,36 @@ const ha = /* @__PURE__ */ ve({
|
|
|
169
171
|
let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
|
|
170
172
|
function o(l, u) {
|
|
171
173
|
return l.map((n) => ({
|
|
172
|
-
resizable:
|
|
173
|
-
...
|
|
174
|
+
resizable: Me(n.resizable) ? n.resizable : a.columnResizable,
|
|
175
|
+
...Z(Le(n), ["ellipsis"]),
|
|
174
176
|
fixed: u ? u.fixed : n.fixed,
|
|
175
|
-
title:
|
|
177
|
+
title: Oe(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
|
|
176
178
|
customRender({
|
|
177
179
|
value: c,
|
|
178
180
|
...g
|
|
179
181
|
}) {
|
|
180
182
|
var H, q;
|
|
181
|
-
const
|
|
183
|
+
const $ = Ve(n), be = De({
|
|
182
184
|
...n,
|
|
183
|
-
valueType:
|
|
185
|
+
valueType: $
|
|
184
186
|
}, {
|
|
185
187
|
value: c,
|
|
186
188
|
...g
|
|
187
|
-
}), Re =
|
|
189
|
+
}), Re = Ae($, be, g.record, r(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
|
|
188
190
|
value: c,
|
|
189
191
|
...g
|
|
190
192
|
})) || c, Ce = n.renderText ? y(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
|
|
191
193
|
value: c,
|
|
192
194
|
...g
|
|
193
195
|
})]) : Re;
|
|
194
|
-
let
|
|
195
|
-
return n.customRender && (
|
|
196
|
+
let z = ye(n, W, Ce);
|
|
197
|
+
return n.customRender && (z = n.customRender({
|
|
196
198
|
value: c,
|
|
197
199
|
...g,
|
|
198
200
|
column: n,
|
|
199
|
-
originalNode:
|
|
200
|
-
originalText:
|
|
201
|
-
})),
|
|
201
|
+
originalNode: z,
|
|
202
|
+
originalText: W
|
|
203
|
+
})), z;
|
|
202
204
|
},
|
|
203
205
|
children: o(n.children || [], u || n)
|
|
204
206
|
}));
|
|
@@ -211,11 +213,11 @@ const ha = /* @__PURE__ */ ve({
|
|
|
211
213
|
});
|
|
212
214
|
const O = s(() => {
|
|
213
215
|
var e, o, t;
|
|
214
|
-
return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !
|
|
216
|
+
return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
|
|
215
217
|
let n = ee(l.order);
|
|
216
218
|
return ee(u.order) - n;
|
|
217
219
|
})) == null ? void 0 : t.map((l) => {
|
|
218
|
-
const u =
|
|
220
|
+
const u = je(l, $e(l.fieldProps, {})), n = {
|
|
219
221
|
...l,
|
|
220
222
|
fieldProps: {
|
|
221
223
|
label: l.title,
|
|
@@ -225,7 +227,7 @@ const ha = /* @__PURE__ */ ve({
|
|
|
225
227
|
},
|
|
226
228
|
renderNode: void 0
|
|
227
229
|
};
|
|
228
|
-
return n.renderNode =
|
|
230
|
+
return n.renderNode = We(n, r(K)), n;
|
|
229
231
|
})) || [];
|
|
230
232
|
}), de = s(() => ae(r(d), (e) => {
|
|
231
233
|
if (e.sorter === !0)
|
|
@@ -237,7 +239,7 @@ const ha = /* @__PURE__ */ ve({
|
|
|
237
239
|
rowSelection: b,
|
|
238
240
|
selectedRows: R,
|
|
239
241
|
...C
|
|
240
|
-
} =
|
|
242
|
+
} = Ge({
|
|
241
243
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
242
244
|
rowKey: a.rowKey,
|
|
243
245
|
dataSource: ie
|
|
@@ -249,7 +251,7 @@ const ha = /* @__PURE__ */ ve({
|
|
|
249
251
|
refresh: ce,
|
|
250
252
|
data: v,
|
|
251
253
|
setDataSource: pe
|
|
252
|
-
} =
|
|
254
|
+
} = Ee({
|
|
253
255
|
async request(e) {
|
|
254
256
|
var t, l;
|
|
255
257
|
if (!b.value.preserveSelectedRowKeys && m(a.dataSource) && C.clearAll(), !m(a.dataSource))
|
|
@@ -305,21 +307,18 @@ const ha = /* @__PURE__ */ ve({
|
|
|
305
307
|
};
|
|
306
308
|
}), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
|
|
307
309
|
function ye(e, o, t) {
|
|
308
|
-
if (
|
|
310
|
+
if (Y.includes(e.valueType))
|
|
309
311
|
return t;
|
|
310
|
-
const l =
|
|
311
|
-
return e.copyable || e.ellipsis ? y(
|
|
312
|
-
copyable: e.copyable
|
|
313
|
-
|
|
314
|
-
tooltip: !1
|
|
315
|
-
} : !1,
|
|
316
|
-
ellipsis: e.ellipsis ? Le(e.ellipsis) ? {
|
|
312
|
+
const l = He(o);
|
|
313
|
+
return e.copyable || e.ellipsis ? y(Xe, {
|
|
314
|
+
copyable: e.copyable,
|
|
315
|
+
ellipsis: e.ellipsis ? Ke(e.ellipsis) ? {
|
|
317
316
|
tooltip: l
|
|
318
317
|
} : {
|
|
319
318
|
...e.ellipsis,
|
|
320
319
|
tooltip: l
|
|
321
320
|
} : !1,
|
|
322
|
-
content: e.ellipsis ?
|
|
321
|
+
content: e.ellipsis ? Ue(e, o) : t
|
|
323
322
|
}, null) : t;
|
|
324
323
|
}
|
|
325
324
|
G(() => r(v).loading, (e) => {
|
|
@@ -330,11 +329,11 @@ const ha = /* @__PURE__ */ ve({
|
|
|
330
329
|
}, {
|
|
331
330
|
immediate: !0
|
|
332
331
|
});
|
|
333
|
-
function
|
|
332
|
+
function we(e) {
|
|
334
333
|
var o, t, l;
|
|
335
334
|
(l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
|
|
336
335
|
}
|
|
337
|
-
function
|
|
336
|
+
function he() {
|
|
338
337
|
var e, o, t;
|
|
339
338
|
return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
|
|
340
339
|
}
|
|
@@ -345,8 +344,8 @@ const ha = /* @__PURE__ */ ve({
|
|
|
345
344
|
submit: () => V(),
|
|
346
345
|
reset: () => D(),
|
|
347
346
|
refresh: () => ce(),
|
|
348
|
-
setSearchFormValues:
|
|
349
|
-
getSearchFormValues:
|
|
347
|
+
setSearchFormValues: we,
|
|
348
|
+
getSearchFormValues: he,
|
|
350
349
|
getShownColumns: Se,
|
|
351
350
|
dataSource: s(() => r(v).records),
|
|
352
351
|
rowSelection: {
|
|
@@ -359,15 +358,15 @@ const ha = /* @__PURE__ */ ve({
|
|
|
359
358
|
key: 0,
|
|
360
359
|
class: f(e.card ? r(B)("search-wrapper") : null),
|
|
361
360
|
style: M(e.searchFormWrapperStyle)
|
|
362
|
-
}, [y(r(
|
|
361
|
+
}, [y(r(Ne).SearchForm, w(e.searchForm || {}, {
|
|
363
362
|
ref_key: "formRef",
|
|
364
363
|
ref: k,
|
|
365
364
|
"custom-reset": "",
|
|
366
365
|
onSubmit: r(V),
|
|
367
366
|
onReset: r(D),
|
|
368
367
|
"submit-loading": r(A).loading
|
|
369
|
-
}),
|
|
370
|
-
default: F(() => [(p(!0), T(U, null,
|
|
368
|
+
}), _({
|
|
369
|
+
default: F(() => [(p(!0), T(U, null, J(O.value, (t) => (p(), Q(Be(t.renderNode), w({
|
|
371
370
|
key: t.dataIndex,
|
|
372
371
|
ref_for: !0
|
|
373
372
|
}, t.fieldProps || {}, {
|
|
@@ -376,9 +375,9 @@ const ha = /* @__PURE__ */ ve({
|
|
|
376
375
|
_: 2
|
|
377
376
|
}, [S.searchFormExtra ? {
|
|
378
377
|
name: "extra",
|
|
379
|
-
fn: F(() => [
|
|
378
|
+
fn: F(() => [h(e.$slots, "searchFormExtra")]),
|
|
380
379
|
key: "0"
|
|
381
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
380
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : X("", !0), I("div", {
|
|
382
381
|
ref_key: "contentRef",
|
|
383
382
|
ref: ne,
|
|
384
383
|
class: f([r(B)("table-wrapper"), e.card ? r(B)("table-wrapper-card") : null]),
|
|
@@ -390,40 +389,40 @@ const ha = /* @__PURE__ */ ve({
|
|
|
390
389
|
class: f(r(i)("header"))
|
|
391
390
|
}, [I("div", {
|
|
392
391
|
class: f(r(E)("header", "title"))
|
|
393
|
-
}, [
|
|
392
|
+
}, [h(e.$slots, "title", w({
|
|
394
393
|
selectedRows: r(R),
|
|
395
394
|
selectedRowKeys: r(b).selectedRowKeys,
|
|
396
395
|
shownColumns: d.value
|
|
397
|
-
}, C))], 2), S.title ? (p(),
|
|
396
|
+
}, C))], 2), S.title ? (p(), Q(r(ze), {
|
|
398
397
|
key: 0,
|
|
399
398
|
type: "vertical"
|
|
400
|
-
})) :
|
|
399
|
+
})) : X("", !0), y(Ye, {
|
|
401
400
|
config: e.settings === !0 ? {} : e.settings
|
|
402
|
-
}, null, 8, ["config"])], 2)) :
|
|
401
|
+
}, null, 8, ["config"])], 2)) : h(e.$slots, "title", w({
|
|
403
402
|
key: 1,
|
|
404
403
|
selectedRows: r(R),
|
|
405
404
|
selectedRowKeys: r(b).selectedRowKeys,
|
|
406
405
|
shownColumns: d.value
|
|
407
|
-
}, C))], 2), y(r(
|
|
406
|
+
}, C))], 2), y(r(Pe), w({
|
|
408
407
|
class: r(i)("table")
|
|
409
408
|
}, j.value, {
|
|
410
409
|
size: x.value,
|
|
411
410
|
"table-layout": me.value,
|
|
412
411
|
columns: d.value,
|
|
413
412
|
onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
|
|
414
|
-
}),
|
|
415
|
-
summary: F(() => [
|
|
413
|
+
}), _({
|
|
414
|
+
summary: F(() => [h(e.$slots, "summary", {
|
|
416
415
|
columns: d.value,
|
|
417
416
|
records: j.value.dataSource,
|
|
418
417
|
selectedRows: r(R)
|
|
419
418
|
})]),
|
|
420
419
|
_: 2
|
|
421
|
-
}, [
|
|
420
|
+
}, [J(r(Z)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
|
|
422
421
|
name: l,
|
|
423
|
-
fn: F((u) => [
|
|
422
|
+
fn: F((u) => [h(e.$slots, l, xe(ke(u || {})))])
|
|
424
423
|
}))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
|
|
425
424
|
}
|
|
426
425
|
});
|
|
427
426
|
export {
|
|
428
|
-
|
|
427
|
+
Sa as default
|
|
429
428
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
interface Props {
|
|
3
|
+
copyable?: boolean;
|
|
4
|
+
content?: VNodeChild;
|
|
5
|
+
ellipsis?: boolean | {
|
|
6
|
+
rows?: number;
|
|
7
|
+
tooltip?: VNodeChild;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare const _default: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToOption<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as T, ref as _, computed as w, openBlock as o, createElementBlock as f, mergeProps as B, unref as t, createElementVNode as O, normalizeClass as y, createVNode as d, createSlots as x, withCtx as u, createBlock as s, resolveDynamicComponent as v, h as b, Fragment as h, createCommentVNode as E } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import { Tooltip as C } from "@aplus-frontend/antdv";
|
|
4
|
+
import { CopyOutlined as N, CheckOutlined as j } from "@ant-design/icons-vue";
|
|
5
|
+
import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useLocale as V } from "../../../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
const $ = /* @__PURE__ */ T({
|
|
8
|
+
name: "ApTableParagraphEllipsis",
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
copyable: { type: Boolean },
|
|
12
|
+
content: { type: [Object, String, Number, Boolean, null, Array] },
|
|
13
|
+
ellipsis: { type: [Boolean, Object] }
|
|
14
|
+
},
|
|
15
|
+
setup(g) {
|
|
16
|
+
const { b: i } = S("ap-table-paragraph-ellipsis"), { t: m } = V(), e = g, l = _(!1), r = w(() => e.ellipsis === !0 ? {
|
|
17
|
+
rows: 1,
|
|
18
|
+
tooltip: e.content
|
|
19
|
+
} : typeof e.ellipsis == "object" ? Object.assign(
|
|
20
|
+
{
|
|
21
|
+
rows: 1,
|
|
22
|
+
tooltip: e.content
|
|
23
|
+
},
|
|
24
|
+
e.ellipsis
|
|
25
|
+
) : {});
|
|
26
|
+
function k() {
|
|
27
|
+
var c, a, p;
|
|
28
|
+
const n = ((c = r.value) == null ? void 0 : c.tooltip) ?? ((p = (a = e.content) == null ? void 0 : a.props) == null ? void 0 : p.value) ?? e.content;
|
|
29
|
+
navigator.clipboard.writeText(n), l.value || (l.value = !0, setTimeout(() => {
|
|
30
|
+
l.value = !1;
|
|
31
|
+
}, 2200));
|
|
32
|
+
}
|
|
33
|
+
return (n, c) => {
|
|
34
|
+
var a, p;
|
|
35
|
+
return o(), f("div", B({
|
|
36
|
+
class: [t(i)()]
|
|
37
|
+
}, {
|
|
38
|
+
...n.$attrs
|
|
39
|
+
}, {
|
|
40
|
+
style: {
|
|
41
|
+
"--ap-table-paragraph-ellipsis-rows": (a = r.value) == null ? void 0 : a.rows
|
|
42
|
+
}
|
|
43
|
+
}), [
|
|
44
|
+
O("div", {
|
|
45
|
+
class: y([t(i)("content")])
|
|
46
|
+
}, [
|
|
47
|
+
d(t(C), null, x({
|
|
48
|
+
default: u(() => [
|
|
49
|
+
(o(), s(v(b(h, [e.content]))))
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, [
|
|
53
|
+
(p = r.value) != null && p.tooltip ? {
|
|
54
|
+
name: "title",
|
|
55
|
+
fn: u(() => [
|
|
56
|
+
(o(), s(v(b(h, [r.value.tooltip]))))
|
|
57
|
+
]),
|
|
58
|
+
key: "0"
|
|
59
|
+
} : void 0
|
|
60
|
+
]), 1024)
|
|
61
|
+
], 2),
|
|
62
|
+
e.copyable ? (o(), f("div", {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: y([t(i)("copyable")]),
|
|
65
|
+
onClick: k
|
|
66
|
+
}, [
|
|
67
|
+
d(t(C), {
|
|
68
|
+
title: l.value ? t(m)("ap.apTable.paragraphEllipsis.copySuccess") : t(m)("ap.apTable.paragraphEllipsis.copy")
|
|
69
|
+
}, {
|
|
70
|
+
default: u(() => [
|
|
71
|
+
l.value ? (o(), s(t(j), { key: 1 })) : (o(), s(t(N), { key: 0 }))
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 8, ["title"])
|
|
75
|
+
], 2)) : E("", !0)
|
|
76
|
+
], 16);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
$ as default
|
|
82
|
+
};
|
|
@@ -1,118 +1,127 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isDef as
|
|
3
|
-
import
|
|
4
|
-
import { useInjectApTable as
|
|
5
|
-
import { isObject as B, mergeWith as E, isBoolean as
|
|
6
|
-
function a(
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
n(o), (
|
|
1
|
+
import { ref as j, shallowRef as z, unref as d, computed as D, watchEffect as G } from "vue";
|
|
2
|
+
import { isDef as W } from "../../utils/index.mjs";
|
|
3
|
+
import X, { customCloneColumnStates as A, getColumnStateString as q } from "../components/setting/utils.mjs";
|
|
4
|
+
import { useInjectApTable as H } from "../context.mjs";
|
|
5
|
+
import { isObject as B, mergeWith as E, isBoolean as L, omit as P, isNumber as N } from "lodash-unified";
|
|
6
|
+
function a(t, n) {
|
|
7
|
+
t.forEach((o) => {
|
|
8
|
+
var i;
|
|
9
|
+
n(o), (i = o.children) != null && i.length && a(o.children, n);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Q(t, n) {
|
|
13
13
|
if (!n)
|
|
14
14
|
return {};
|
|
15
|
-
const o =
|
|
15
|
+
const o = t.getItem(n);
|
|
16
16
|
return o ? JSON.parse(o) : {};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
if (B(
|
|
20
|
-
return E({},
|
|
18
|
+
function F(t, n) {
|
|
19
|
+
if (B(t) && B(n))
|
|
20
|
+
return E({}, t, n, F);
|
|
21
21
|
}
|
|
22
|
-
const b = Number.MAX_SAFE_INTEGER
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const b = Number.MAX_SAFE_INTEGER;
|
|
23
|
+
function U(t, n, o, i) {
|
|
24
|
+
return i ? i.fixed : n ? n.fixed : o && "fixed" in o ? o.fixed : L(t.fixed) ? t.fixed ? "left" : void 0 : t.fixed;
|
|
25
|
+
}
|
|
26
|
+
const te = (t, n) => {
|
|
27
|
+
const o = j(n), i = z(
|
|
28
|
+
A(n)
|
|
29
|
+
), { columnsBackup: p, updateColumns: l } = H(), I = t.persistenceType || "localStorage", x = window[I];
|
|
30
|
+
function T() {
|
|
31
|
+
const e = Q(
|
|
32
|
+
x,
|
|
33
|
+
t.persistenceKey
|
|
34
|
+
), r = E(
|
|
31
35
|
{},
|
|
32
|
-
|
|
36
|
+
t.defaultValue || {},
|
|
33
37
|
e,
|
|
34
|
-
|
|
35
|
-
), s =
|
|
36
|
-
function
|
|
37
|
-
return R.map((
|
|
38
|
-
var
|
|
39
|
-
const
|
|
40
|
-
key:
|
|
41
|
-
label:
|
|
38
|
+
F
|
|
39
|
+
), s = d(p);
|
|
40
|
+
function c(R, u, _) {
|
|
41
|
+
return R.map((f) => {
|
|
42
|
+
var k, v;
|
|
43
|
+
const w = (u == null ? void 0 : u[f.key]) || {}, h = {
|
|
44
|
+
key: f.key,
|
|
45
|
+
label: f.title,
|
|
42
46
|
show: !0,
|
|
43
|
-
fixed:
|
|
47
|
+
fixed: U(
|
|
48
|
+
f,
|
|
49
|
+
e[f.key],
|
|
50
|
+
(k = t.defaultValue) == null ? void 0 : k[f.key],
|
|
51
|
+
_
|
|
52
|
+
),
|
|
44
53
|
disabled: !1,
|
|
45
|
-
...
|
|
54
|
+
...P(w, ["children", "fixed"])
|
|
46
55
|
};
|
|
47
|
-
return h.children = (
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
return h.children = (v = f.children) != null && v.length ? c(
|
|
57
|
+
f.children,
|
|
58
|
+
w.children,
|
|
50
59
|
h
|
|
51
60
|
) : void 0, h;
|
|
52
61
|
}).sort(O);
|
|
53
62
|
}
|
|
54
|
-
return
|
|
63
|
+
return c(s || [], r);
|
|
55
64
|
}
|
|
56
|
-
function O(e,
|
|
65
|
+
function O(e, r) {
|
|
57
66
|
const s = N(e.order) ? e.order : b;
|
|
58
|
-
let
|
|
59
|
-
return e.fixed === "right" &&
|
|
67
|
+
let c = N(r.order) ? r.order : b;
|
|
68
|
+
return e.fixed === "right" && r.fixed !== "right" && (c = s - 1), r.fixed === "left" && e.fixed !== "left" && (c = s - 1), s - c;
|
|
60
69
|
}
|
|
61
|
-
const
|
|
62
|
-
function
|
|
63
|
-
const e =
|
|
64
|
-
a(e, (
|
|
65
|
-
!
|
|
70
|
+
const g = D(() => d(o).every((e) => e.show));
|
|
71
|
+
function C() {
|
|
72
|
+
const e = d(o);
|
|
73
|
+
a(e, (r) => {
|
|
74
|
+
!r.disabled && (r.show = !0);
|
|
66
75
|
});
|
|
67
76
|
}
|
|
68
|
-
function
|
|
69
|
-
const e =
|
|
70
|
-
a(e, (
|
|
71
|
-
!
|
|
77
|
+
function y() {
|
|
78
|
+
const e = d(o);
|
|
79
|
+
a(e, (r) => {
|
|
80
|
+
!r.disabled && (r.show = !1);
|
|
72
81
|
});
|
|
73
82
|
}
|
|
74
83
|
function K() {
|
|
75
|
-
|
|
84
|
+
d(g) ? y() : C();
|
|
76
85
|
}
|
|
77
|
-
function J(e,
|
|
78
|
-
a(
|
|
79
|
-
s.key === e && (s.show =
|
|
86
|
+
function J(e, r) {
|
|
87
|
+
a(d(o), (s) => {
|
|
88
|
+
s.key === e && (s.show = W(r) ? r : !s.show);
|
|
80
89
|
});
|
|
81
90
|
}
|
|
82
|
-
function
|
|
91
|
+
function S(e) {
|
|
83
92
|
o.value = e;
|
|
84
93
|
}
|
|
85
94
|
function M(e) {
|
|
86
|
-
|
|
95
|
+
i.value = e;
|
|
87
96
|
}
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
|
|
97
|
+
function m(e) {
|
|
98
|
+
if (t.persistenceKey) {
|
|
99
|
+
const r = q(e);
|
|
100
|
+
x.setItem(t.persistenceKey, JSON.stringify(r));
|
|
92
101
|
}
|
|
93
102
|
}
|
|
94
|
-
return
|
|
95
|
-
var
|
|
96
|
-
const e =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
return G(() => {
|
|
104
|
+
var r;
|
|
105
|
+
const e = T();
|
|
106
|
+
S(e), (r = t.onChange) == null || r.call(t, e), l == null || l(
|
|
107
|
+
X(
|
|
108
|
+
d(p),
|
|
109
|
+
d(e)
|
|
101
110
|
)
|
|
102
|
-
),
|
|
111
|
+
), i.value = A(e), m(e);
|
|
103
112
|
}), {
|
|
104
113
|
columnState: o,
|
|
105
|
-
selectAll:
|
|
106
|
-
unSelectAll:
|
|
114
|
+
selectAll: C,
|
|
115
|
+
unSelectAll: y,
|
|
107
116
|
toggleSelect: J,
|
|
108
|
-
setColumnState:
|
|
109
|
-
isAllSelected:
|
|
117
|
+
setColumnState: S,
|
|
118
|
+
isAllSelected: g,
|
|
110
119
|
toggleSelectAll: K,
|
|
111
|
-
columnStateBackup:
|
|
120
|
+
columnStateBackup: i,
|
|
112
121
|
setColumnStateBackup: M,
|
|
113
|
-
cacheColumnStateIfNeeded:
|
|
122
|
+
cacheColumnStateIfNeeded: m
|
|
114
123
|
};
|
|
115
124
|
};
|
|
116
125
|
export {
|
|
117
|
-
|
|
126
|
+
te as useTableColumnState
|
|
118
127
|
};
|
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import { ApImageProps } from './interface';
|
|
2
|
+
import { ImgInfo } from '@aplus-frontend/antdv/es/vc-image/src/Preview';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
declare
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
slots: {
|
|
6
|
+
toolbarRender?(_: {
|
|
7
|
+
originalNodes: import("vue/jsx-runtime").JSX.Element[];
|
|
8
|
+
actions: {
|
|
9
|
+
onFlipX: () => void;
|
|
10
|
+
onFlipY: () => void;
|
|
11
|
+
onRotateLeft: () => void;
|
|
12
|
+
onRotateRight: () => void;
|
|
13
|
+
onZoomIn: () => void;
|
|
14
|
+
onZoomOut: () => void;
|
|
15
|
+
};
|
|
16
|
+
transform: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
scale: number;
|
|
20
|
+
rotate: number;
|
|
21
|
+
flip: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
image: ImgInfo;
|
|
27
|
+
current?: number;
|
|
28
|
+
total?: number;
|
|
29
|
+
}): any;
|
|
30
|
+
};
|
|
31
|
+
refs: {};
|
|
32
|
+
attrs: Partial<{}>;
|
|
33
|
+
};
|
|
34
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
35
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
|
|
4
36
|
preview: boolean;
|
|
5
37
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
|
|
6
38
|
preview: boolean;
|
|
@@ -14,6 +46,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
14
46
|
current?: number;
|
|
15
47
|
};
|
|
16
48
|
}, {}>;
|
|
49
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
50
|
export default _default;
|
|
18
51
|
type __VLS_WithDefaults<P, D> = {
|
|
19
52
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
@@ -29,6 +62,11 @@ type __VLS_TypePropsToOption<T> = {
|
|
|
29
62
|
required: true;
|
|
30
63
|
};
|
|
31
64
|
};
|
|
65
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
32
70
|
type __VLS_PrettifyLocal<T> = {
|
|
33
71
|
[K in keyof T]: T[K];
|
|
34
72
|
} & {};
|