@aplus-frontend/ui 0.1.19 → 0.1.21

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 (37) hide show
  1. package/es/src/ap-modal/interface.d.ts +3 -3
  2. package/es/src/ap-table/ap-table.vue.mjs +107 -107
  3. package/es/src/ap-table/constants.mjs +11 -9
  4. package/es/src/ap-table/hooks/use-table-paging.d.ts +12 -2
  5. package/es/src/ap-table/hooks/use-table-paging.mjs +115 -103
  6. package/es/src/ap-table/interface.d.ts +13 -4
  7. package/es/src/ap-table/style/ap-table.css +9 -0
  8. package/es/src/ap-table/utils.d.ts +4 -4
  9. package/es/src/ap-table/utils.mjs +44 -39
  10. package/es/src/business/ap-image/ApImage.vue.d.ts +12 -66
  11. package/es/src/business/ap-image/ApImage.vue2.mjs +44 -44
  12. package/es/src/business/ap-image/interface.d.ts +17 -0
  13. package/es/src/business/index.d.ts +47 -50
  14. package/es/src/config-provider/config-provider.mjs +9 -9
  15. package/es/src/locale/lang/en.mjs +4 -2
  16. package/es/src/locale/lang/zh-cn.mjs +4 -2
  17. package/es/src/theme/ap-table/ap-table.css +9 -0
  18. package/es/src/theme/css-var/index.mjs +23 -7
  19. package/lib/src/ap-modal/interface.d.ts +3 -3
  20. package/lib/src/ap-table/ap-table.vue.js +1 -1
  21. package/lib/src/ap-table/constants.js +1 -1
  22. package/lib/src/ap-table/hooks/use-table-paging.d.ts +12 -2
  23. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  24. package/lib/src/ap-table/interface.d.ts +13 -4
  25. package/lib/src/ap-table/style/ap-table.css +9 -0
  26. package/lib/src/ap-table/utils.d.ts +4 -4
  27. package/lib/src/ap-table/utils.js +1 -1
  28. package/lib/src/business/ap-image/ApImage.vue.d.ts +12 -66
  29. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  30. package/lib/src/business/ap-image/interface.d.ts +17 -0
  31. package/lib/src/business/index.d.ts +47 -50
  32. package/lib/src/config-provider/config-provider.js +1 -1
  33. package/lib/src/locale/lang/en.js +1 -1
  34. package/lib/src/locale/lang/zh-cn.js +1 -1
  35. package/lib/src/theme/ap-table/ap-table.css +9 -0
  36. package/lib/src/theme/css-var/index.js +1 -1
  37. package/package.json +1 -1
@@ -1,145 +1,157 @@
1
- import { ref as S, nextTick as N, unref as o, onMounted as U, computed as z } from "vue";
2
- import { parseFieldValue as W, dataIndexToStr as X } from "../utils.mjs";
3
- import { isArray as Y } from "lodash-unified";
1
+ import { ref as x, nextTick as Z, unref as o, onMounted as _, computed as V, createVNode as P } from "vue";
2
+ import { parseFieldValue as I, dataIndexToStr as k } from "../utils.mjs";
3
+ import { isArray as ee } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
- import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
6
- const oe = ({
7
- manual: j = !1,
8
- defaultCurrent: D = 1,
9
- defaultPageSize: P = 10,
10
- request: R,
11
- defaultParams: A = {},
12
- defaultData: B = [],
13
- formatParams: w,
14
- paramsValueTypeMap: V,
15
- resetFieldsIgnores: b,
16
- filterFields: E,
17
- sortFields: L
5
+ import { useLocale as te } from "../../config-provider/hooks/use-locale.mjs";
6
+ import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
7
+ const le = ({
8
+ manual: B = !1,
9
+ defaultCurrent: E = 1,
10
+ defaultPageSize: w = 10,
11
+ request: M,
12
+ defaultParams: N = {},
13
+ defaultData: $ = [],
14
+ formatParams: C,
15
+ paramsValueTypeMap: y,
16
+ resetFieldsIgnores: O,
17
+ filterFields: q,
18
+ sortFields: J,
19
+ showLessItems: b = !1,
20
+ showTotal: L = !0
18
21
  }) => {
19
- let T = 0, f = {};
20
- const M = (e) => w ? w(e) : e, l = S(), i = S(D), g = S(P), { t: C } = Z(), n = S({
22
+ let z = 0, p = {};
23
+ const Q = (e) => C ? C(e) : e, l = x(), c = x(E), f = x(w), {
24
+ t: S
25
+ } = te(), {
26
+ b: F
27
+ } = ae("ap-table"), r = x({
21
28
  total: 0,
22
- records: B,
29
+ records: $,
23
30
  loading: !1
24
- }), x = async (e) => {
25
- var r;
26
- const a = M(e), t = Date.now();
27
- T = t, n.value.loading = !0;
31
+ }), R = async (e) => {
32
+ var n;
33
+ const a = Q(e), t = Date.now();
34
+ z = t, r.value.loading = !0;
28
35
  try {
29
- const s = await R({
30
- ...A,
36
+ const s = await M({
37
+ ...N,
31
38
  ...a
32
39
  });
33
- T === t && (n.value.total = s.total || ((r = s.data) == null ? void 0 : r.length) || 0, n.value.records = [...s.data || []]);
40
+ z === t && (r.value.total = s.total || ((n = s.data) == null ? void 0 : n.length) || 0, r.value.records = [...s.data || []]);
34
41
  } catch {
35
- T === t && (n.value.records = [], n.value.total = 0);
42
+ z === t && (r.value.records = [], r.value.total = 0);
36
43
  } finally {
37
- n.value.loading = !1;
44
+ r.value.loading = !1;
38
45
  }
39
- }, y = (e) => {
46
+ }, j = (e) => {
40
47
  const a = {};
41
- return Object.entries(e).forEach(([t, r]) => {
42
- if (a[t] = r, V && r) {
43
- const s = V[t];
44
- s && (a[t] = W(s, r));
48
+ return Object.entries(e).forEach(([t, n]) => {
49
+ if (a[t] = n, y && n) {
50
+ const s = y[t];
51
+ s && (a[t] = I(s, n));
45
52
  }
46
53
  }), a;
47
- }, q = async (e) => {
48
- var r, s, d, p, m, u, h;
49
- const a = ((s = (r = l.value) == null ? void 0 : r.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
50
- Object.entries(a).forEach(([v, c]) => {
51
- b && b.indexOf(v) > -1 && (t[v] = c);
52
- }), await ((p = (d = l.value) == null ? void 0 : d.apForm) == null ? void 0 : p.resetFields()), (h = (u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || h.call(u, t), N(() => {
54
+ }, G = async (e) => {
55
+ var n, s, g, d, m, u, h;
56
+ const a = ((s = (n = l.value) == null ? void 0 : n.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
57
+ Object.entries(a).forEach(([v, i]) => {
58
+ O && O.indexOf(v) > -1 && (t[v] = i);
59
+ }), await ((d = (g = l.value) == null ? void 0 : g.apForm) == null ? void 0 : d.resetFields()), (h = (u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || h.call(u, t), Z(() => {
53
60
  e == null || e();
54
61
  });
55
- }, F = (e) => {
56
- f = e;
57
- const a = y(e);
58
- x(a);
59
- }, J = (e) => {
60
- F({
61
- ...f,
62
+ }, T = (e) => {
63
+ p = e;
64
+ const a = j(e);
65
+ R(a);
66
+ }, H = (e) => {
67
+ T({
68
+ ...p,
62
69
  ...e
63
70
  });
64
- }, O = () => {
71
+ }, D = () => {
65
72
  var a, t;
66
73
  const e = ((t = (a = l.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
67
- i.value = 1, F({
74
+ c.value = 1, T({
68
75
  ...e,
69
76
  current: 1,
70
- pageSize: f.pageSize || P
77
+ pageSize: p.pageSize || w
71
78
  });
72
- }, Q = () => {
73
- q(O);
74
- }, G = () => {
75
- F(f);
76
- }, H = (e) => {
77
- const a = o(n).total - e, t = Math.ceil(a / o(g)), r = o(i) > t ? t : o(i);
78
- J({
79
- current: r > 0 ? r : 1
79
+ }, K = () => {
80
+ G(D);
81
+ }, U = () => {
82
+ T(p);
83
+ }, W = (e) => {
84
+ const a = o(r).total - e, t = Math.ceil(a / o(f)), n = o(c) > t ? t : o(c);
85
+ H({
86
+ current: n > 0 ? n : 1
80
87
  });
81
- }, $ = (e, a, t) => {
88
+ }, A = (e, a, t) => {
82
89
  var m, u, h, v;
83
- const r = ((u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
84
- i.value = e.current, g.value = e.pageSize;
85
- const s = Y(t) ? [...t] : [t], d = {};
86
- for (const c of s)
87
- (h = o(L)) != null && h.includes(c.field) && (d[X(c.field)] = c.order);
88
- const p = {};
89
- for (const c of Object.keys(a))
90
- (v = o(E)) != null && v.includes(c) && (p[c] = a[c]);
91
- F({
92
- ...r,
93
- filter: p,
94
- sort: d,
90
+ const n = ((u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
91
+ c.value = e.current, f.value = e.pageSize;
92
+ const s = ee(t) ? [...t] : [t], g = {};
93
+ for (const i of s)
94
+ (h = o(J)) != null && h.includes(i.field) && (g[k(i.field)] = i.order);
95
+ const d = {};
96
+ for (const i of Object.keys(a))
97
+ (v = o(q)) != null && v.includes(i) && (d[i] = a[i]);
98
+ T({
99
+ ...n,
100
+ filter: d,
101
+ sort: g,
95
102
  current: e.current,
96
103
  pageSize: e.pageSize
97
104
  });
98
105
  };
99
- U(() => {
106
+ _(() => {
100
107
  var a, t;
101
108
  const e = ((t = (a = l.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
102
- if (f = {
103
- current: o(i),
104
- pageSize: o(g),
109
+ if (p = {
110
+ current: o(c),
111
+ pageSize: o(f),
105
112
  ...e
106
- }, !j) {
107
- const r = y(f);
108
- x(r);
113
+ }, !B) {
114
+ const n = j(p);
115
+ R(n);
109
116
  }
110
117
  });
111
- const I = z(() => o(n).total === 0 ? "-" : `${o(i.value)}/${Math.ceil(
112
- o(n).total / o(g)
113
- )}`), K = z(() => ({
114
- loading: o(n).loading,
118
+ const X = V(() => o(r).total === 0 ? "-" : `${o(c.value)}/${Math.ceil(o(r).total / o(f))}`), Y = V(() => ({
119
+ loading: o(r).loading,
115
120
  pagination: {
116
- current: o(i),
117
- pageSize: o(g),
118
- total: o(n).total,
119
- showSizeChanger: !0,
120
- showQuickJumper: !0,
121
- showTotal: (e) => `${C("ap.apTable.pagination.totalLeft", { total: e })} ${C(
122
- "ap.apTable.pagination.totalRight",
123
- { page: o(I) }
124
- )}`
121
+ current: o(c),
122
+ pageSize: o(f),
123
+ total: o(r).total,
124
+ showSizeChanger: !b,
125
+ showQuickJumper: !b,
126
+ showLessItems: b,
127
+ size: "default",
128
+ showTotal: L ? (e) => P("span", {
129
+ class: F("pagination-total-wrapper")
130
+ }, [S("ap.apTable.pagination.totalLeftPrefix"), " ", P("span", {
131
+ class: F("pagination-count-text")
132
+ }, [e]), " ", S("ap.apTable.pagination.totalLeftSuffix"), P("span", {
133
+ class: F("pagination--total-right")
134
+ }, [S("ap.apTable.pagination.totalRightPrefix"), " ", P("span", {
135
+ class: F("pagination-count-text")
136
+ }, [o(X)]), " ", S("ap.apTable.pagination.totalRightSuffix")])]) : void 0
125
137
  },
126
- onChange: $,
127
- dataSource: o(n).records
138
+ onChange: A,
139
+ dataSource: o(r).records
128
140
  }));
129
141
  return {
130
142
  formRef: l,
131
- submit: O,
132
- reset: Q,
133
- refresh: G,
134
- refreshByDelete: H,
135
- data: n,
136
- current: i,
137
- pageSize: g,
138
- handleTableChange: $,
139
- tableProps: K,
140
- dataSource: z(() => o(n).records)
143
+ submit: D,
144
+ reset: K,
145
+ refresh: U,
146
+ refreshByDelete: W,
147
+ data: r,
148
+ current: c,
149
+ pageSize: f,
150
+ handleTableChange: A,
151
+ tableProps: Y,
152
+ dataSource: V(() => o(r).records)
141
153
  };
142
154
  };
143
155
  export {
144
- oe as useTablePaging
156
+ le as useTablePaging
145
157
  };
@@ -162,6 +162,18 @@ export type RequestData<T> = {
162
162
  data: T[] | undefined;
163
163
  total: number;
164
164
  } & Record<string, any>;
165
+ export type ApTablePaginationConfig = {
166
+ defaultCurrent?: number;
167
+ defaultPageSize?: number;
168
+ /**
169
+ * 是否显示较少页面内容
170
+ */
171
+ showLessItems?: boolean;
172
+ /**
173
+ * 用于显示数据总量和当前数据顺序
174
+ */
175
+ showTotal?: boolean;
176
+ };
165
177
  export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection'> & {
166
178
  /**
167
179
  * 列配置
@@ -230,10 +242,7 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
230
242
  /**
231
243
  * 是否显示分页器(特定的分页器)或者指定默认的当前页和pageSize
232
244
  */
233
- pagination?: false | {
234
- defaultCurrent?: number;
235
- defaultPageSize?: number;
236
- };
245
+ pagination?: false | ApTablePaginationConfig;
237
246
  /**
238
247
  * 自定义查询表单容器样式
239
248
  */
@@ -86,3 +86,12 @@
86
86
  .aplus-ap-table .ant-table-cell .ant-typography {
87
87
  margin-bottom: 0;
88
88
  }
89
+ .aplus-ap-table-pagination-count-text {
90
+ color: var(--ap-table-pagination-total-count-color, #182948);
91
+ }
92
+ .aplus-ap-table-pagination--total-right {
93
+ padding-left: 12px;
94
+ }
95
+ .aplus-ap-table-pagination-total-wrapper {
96
+ color: var(--ap-table-pagination-total-color, #526A90);
97
+ }
@@ -1,13 +1,15 @@
1
1
  import { ApColumnType, ApTableValueFields, ValueEnum, ValueEnumType } from './interface';
2
2
  import { Translator, ValueTypeRenderConfig } from '../config-provider';
3
3
  import { apTableRenderItemMap } from './constants';
4
- import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, RendererNode, RendererElement } from 'vue';
4
+ import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNodeArrayChildren } from 'vue';
5
5
  import { ColSize } from 'ant-design-vue/es/grid';
6
6
  import { ApFieldTextPasswordProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldCheckboxProps } from '..';
7
7
  import { RuleObject } from 'ant-design-vue/es/form';
8
8
  import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
9
9
  import { ApFormItemSlots, ApFormItemTextPassword } from '../ap-form';
10
10
  import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
11
+ import { ColumnTitleProps } from 'ant-design-vue/es/table/interface';
12
+ import { VueNode } from 'ant-design-vue/es/_util/type';
11
13
  export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
12
14
  export declare const formatParamsValueType: (type: FieldValueType | Record<string, FieldValueType>, value: any, cb: (t: FieldValueType, value: any) => any) => any;
13
15
  /**
@@ -8425,7 +8427,5 @@ export declare function objectToString(value: any): any;
8425
8427
  export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
8426
8428
  title: any;
8427
8429
  column: ApColumnType<any>;
8428
- }) => any, tooltipColor?: string): VNode< RendererNode, RendererElement, {
8429
- [key: string]: any;
8430
- }>[] | import("vue/jsx-runtime").JSX.Element | (() => import("vue/jsx-runtime").JSX.Element);
8430
+ }) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | import("vue/jsx-runtime").JSX.Element | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
8431
8431
  export {};
@@ -1,18 +1,18 @@
1
- import { isVNode as d, createVNode as s, mergeProps as f, cloneVNode as T, Fragment as l } from "vue";
2
- import { isObject as c, isArray as a, isUndefined as b, isFunction as y, omit as g, isBoolean as h, isString as j } from "lodash-unified";
1
+ import { isVNode as d, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as b } from "vue";
2
+ import { isObject as l, isArray as f, isUndefined as y, isFunction as g, omit as h, isBoolean as j, isString as c } from "lodash-unified";
3
3
  import { apTableRenderItemMap as F, apTableFormItemMap as O, ellipsisTitleStyle as E } from "./constants.mjs";
4
4
  import { isType as S } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
- import { Tooltip as N } from "ant-design-vue";
7
- import { QuestionCircleOutlined as x } from "@ant-design/icons-vue";
8
- import v from "../ap-form/ap-form-item.vue.mjs";
9
- function I(t) {
6
+ import { Tooltip as x } from "ant-design-vue";
7
+ import { QuestionCircleOutlined as N } from "@ant-design/icons-vue";
8
+ import I from "../ap-form/ap-form-item.vue.mjs";
9
+ function v(t) {
10
10
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !d(t);
11
11
  }
12
12
  const C = (t, e, n) => {
13
13
  let o = {};
14
- return c(t) ? Object.keys(t).forEach((u) => {
15
- c(t[u]) ? o[u] = C(t[u], e[u], n) : o[u] = n(t[u], e);
14
+ return l(t) ? Object.keys(t).forEach((i) => {
15
+ l(t[i]) ? o[i] = C(t[i], e[i], n) : o[i] = n(t[i], e);
16
16
  }) : o = n(t, e), o;
17
17
  }, J = (t, e) => {
18
18
  switch (t) {
@@ -26,7 +26,7 @@ const C = (t, e, n) => {
26
26
  }
27
27
  case "multiple":
28
28
  case "multipleNumber":
29
- return a(e) ? e : [e];
29
+ return f(e) ? e : [e];
30
30
  case "boolean":
31
31
  return e;
32
32
  case "object":
@@ -36,7 +36,7 @@ const C = (t, e, n) => {
36
36
  }
37
37
  };
38
38
  function L(t) {
39
- return a(t) ? t.join(".") : t;
39
+ return f(t) ? t.join(".") : t;
40
40
  }
41
41
  function P(t) {
42
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
@@ -44,13 +44,13 @@ function P(t) {
44
44
  }
45
45
  const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), p = (t) => {
46
46
  const e = [], n = V(t);
47
- return n.forEach((o, u) => {
48
- const r = n.get(u) || n.get(`${u}`);
47
+ return n.forEach((o, i) => {
48
+ const r = n.get(i) || n.get(`${i}`);
49
49
  if (r) {
50
50
  if (typeof r == "object" && (r != null && r.text)) {
51
51
  e.push({
52
52
  text: r == null ? void 0 : r.text,
53
- value: u,
53
+ value: i,
54
54
  label: r == null ? void 0 : r.text,
55
55
  disabled: r.disabled
56
56
  });
@@ -59,46 +59,46 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), p = (t)
59
59
  e.push({
60
60
  text: r,
61
61
  label: r,
62
- value: u
62
+ value: i
63
63
  });
64
64
  }
65
65
  }), e;
66
- }, Q = (t) => b(t) || t < 0 ? 0 : t, U = (t, e, n) => {
66
+ }, Q = (t) => y(t) || t < 0 ? 0 : t, U = (t, e, n) => {
67
67
  if (n)
68
68
  return n;
69
- const o = ["select", "date"], u = ["text", "textArea", "number"];
69
+ const o = ["select", "date"], i = ["text", "textArea", "number"];
70
70
  if (e === "dateRange")
71
71
  return [t("ap.common.chooseText"), t("ap.common.chooseText")];
72
72
  if (o.includes(e))
73
73
  return t("ap.common.chooseText");
74
- if (u.includes(e))
74
+ if (i.includes(e))
75
75
  return t("ap.common.inputText");
76
76
  };
77
77
  function w(t, e) {
78
- return !t || !y(t) ? t : t(e);
78
+ return !t || !g(t) ? t : t(e);
79
79
  }
80
80
  function z(t) {
81
81
  let e = t.valueType || "text";
82
82
  return t.valueEnum && (e = "status"), e;
83
83
  }
84
84
  function G(t, e, n, o) {
85
- var i;
86
- const u = F[t];
87
- if (u)
88
- return s(u, f(e, {
85
+ var s;
86
+ const i = F[t];
87
+ if (i)
88
+ return u(i, a(e, {
89
89
  mode: "read"
90
90
  }), null);
91
91
  const r = o == null ? void 0 : o[t];
92
- return ((i = r == null ? void 0 : r.render) == null ? void 0 : i.call(r, e.value, n, e)) || e.value;
92
+ return ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(r, e.value, n, e)) || e.value;
93
93
  }
94
94
  function K(t, e) {
95
95
  if (t.customRenderFormItem)
96
96
  return () => {
97
- const u = t.customRenderFormItem(t);
98
- return T(u, {
97
+ const i = t.customRenderFormItem(t);
98
+ return T(i, {
99
99
  ...t.fieldProps,
100
100
  span: t.span,
101
- ...u.props || {}
101
+ ...i.props || {}
102
102
  });
103
103
  };
104
104
  const n = O[t.valueType];
@@ -107,30 +107,30 @@ function K(t, e) {
107
107
  const o = e == null ? void 0 : e[t.valueType];
108
108
  return () => {
109
109
  var r;
110
- const u = (r = o == null ? void 0 : o.renderFormItem) == null ? void 0 : r.call(o, t.fieldProps.field);
111
- return u ? s(v, f(t.fieldProps, {
110
+ const i = (r = o == null ? void 0 : o.renderFormItem) == null ? void 0 : r.call(o, t.fieldProps.field);
111
+ return i ? u(I, a(t.fieldProps, {
112
112
  span: t.span
113
- }), I(u) ? u : {
114
- default: () => [u]
113
+ }), v(i) ? i : {
114
+ default: () => [i]
115
115
  }) : null;
116
116
  };
117
117
  }
118
118
  function W(t, e) {
119
- const n = w(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, u = t.valueType === "switch", r = t.valueType === "index", i = u ? {
119
+ const n = w(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, i = t.valueType === "switch", r = t.valueType === "index", s = i ? {
120
120
  checked: e.value
121
121
  } : {
122
122
  value: r ? e.index + 1 : e.value
123
123
  };
124
124
  return t.valueEnum && (o.valueEnum = t.valueEnum), {
125
- ...g(o, ["request"]),
126
- ...i
125
+ ...h(o, ["request"]),
126
+ ...s
127
127
  };
128
128
  }
129
129
  function X(t) {
130
130
  const e = {
131
131
  ...t
132
132
  };
133
- return h(t.filters) && t.filters && t.valueEnum && (e.filters = p(t.valueEnum)), e;
133
+ return j(t.filters) && t.filters && t.valueEnum && (e.filters = p(t.valueEnum)), e;
134
134
  }
135
135
  function Y(t, e) {
136
136
  var o;
@@ -156,14 +156,19 @@ function k(t, e, n) {
156
156
  });
157
157
  if (o && (o.length > 1 || o[0].children !== "v-if"))
158
158
  return o;
159
- const r = s("span", {
159
+ const r = c(t.title) ? u("span", {
160
160
  style: E,
161
161
  title: t.title
162
- }, [t.title]), i = t.tooltip ? j(t.tooltip) ? s(l, null, [t.tooltip]) : t.tooltip(t) : null, m = () => s(l, null, [r, s(N, {
163
- title: i,
162
+ }, [t.title]) : t.title, s = t.tooltip ? c(t.tooltip) ? u(b, null, [t.tooltip]) : t.tooltip(t) : null, m = () => u("span", {
163
+ style: {
164
+ display: "inline-flex",
165
+ alignItems: "center"
166
+ }
167
+ }, [r, u(x, {
168
+ title: s,
164
169
  placement: "bottom"
165
170
  }, {
166
- default: () => [s(x, {
171
+ default: () => [u(N, {
167
172
  style: {
168
173
  padding: "4px",
169
174
  color: n,
@@ -171,7 +176,7 @@ function k(t, e, n) {
171
176
  }
172
177
  }, null)]
173
178
  })]);
174
- return i ? m : r;
179
+ return s ? m : r;
175
180
  }
176
181
  export {
177
182
  X as apColumnToColumn,
@@ -1,67 +1,13 @@
1
- import { accessCreate } from '@aplus-frontend/oss';
2
- import { PropType, DefineComponent, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
- import { VueTypeValidableDef } from '../../../node_modules/vue-types';
4
- import { ImagePreviewType } from 'ant-design-vue/es/vc-image';
5
- import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
6
- declare const _default: DefineComponent<{
7
- path: StringConstructor;
8
- getOssAccess: PropType<() => Promise<accessCreate>>;
9
- src: StringConstructor;
10
- wrapperClassName: StringConstructor;
11
- wrapperStyle: {
12
- type: PropType< CSSProperties>;
13
- default: CSSProperties;
14
- };
15
- rootClassName: StringConstructor;
16
- prefixCls: StringConstructor;
17
- previewPrefixCls: StringConstructor;
18
- previewMask: {
19
- type: PropType<false | (() => any)>;
20
- default: any;
21
- };
22
- placeholder: VueTypeValidableDef<any>;
23
- fallback: StringConstructor;
24
- preview: {
25
- type: PropType<boolean | ImagePreviewType>;
26
- default: boolean | ImagePreviewType;
27
- };
28
- onClick: {
29
- type: PropType< MouseEventHandler>;
30
- };
31
- onError: {
32
- type: PropType<OnErrorEventHandlerNonNull>;
33
- };
34
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
35
- path: StringConstructor;
36
- getOssAccess: PropType<() => Promise<accessCreate>>;
37
- src: StringConstructor;
38
- wrapperClassName: StringConstructor;
39
- wrapperStyle: {
40
- type: PropType< CSSProperties>;
41
- default: CSSProperties;
42
- };
43
- rootClassName: StringConstructor;
44
- prefixCls: StringConstructor;
45
- previewPrefixCls: StringConstructor;
46
- previewMask: {
47
- type: PropType<false | (() => any)>;
48
- default: any;
49
- };
50
- placeholder: VueTypeValidableDef<any>;
51
- fallback: StringConstructor;
52
- preview: {
53
- type: PropType<boolean | ImagePreviewType>;
54
- default: boolean | ImagePreviewType;
55
- };
56
- onClick: {
57
- type: PropType< MouseEventHandler>;
58
- };
59
- onError: {
60
- type: PropType<OnErrorEventHandlerNonNull>;
61
- };
62
- }>>, {
63
- preview: boolean | ImagePreviewType;
64
- wrapperStyle: CSSProperties;
65
- previewMask: false | (() => any);
66
- }, {}>;
1
+ import { ApImageProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<ApImageProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApImageProps>>>, {}, {}>;
67
4
  export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToOption<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };