@aplus-frontend/ui 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-download/ap-download.vue.mjs +33 -30
- package/es/src/ap-download/style/ap-download.css +1 -4
- package/es/src/ap-field/select/index.vue.mjs +5 -5
- package/es/src/ap-form/ap-form-item.vue.mjs +18 -17
- package/es/src/ap-table/ap-table.vue.d.ts +10 -3
- package/es/src/ap-table/ap-table.vue.mjs +135 -134
- package/es/src/ap-table/constants.d.ts +8 -31
- package/es/src/ap-table/constants.mjs +51 -41
- package/es/src/ap-table/interface.d.ts +5 -1
- package/es/src/ap-table/style/ap-table.css +0 -3
- package/es/src/ap-table/utils.d.ts +7 -1
- package/es/src/ap-table/utils.mjs +113 -86
- package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/es/src/business/ap-image/ApImage.vue.d.ts +31 -29
- package/es/src/business/ap-image/ApImage.vue2.mjs +32 -29
- package/es/src/business/ap-label/ApLabel.d.ts +141 -0
- package/es/src/business/ap-label/ApLabel.mjs +49 -0
- package/es/src/business/ap-label/ApLabelGroup.mjs +11 -12
- package/es/src/business/ap-label/constans.d.ts +65 -1
- package/es/src/business/ap-label/constans.mjs +33 -2
- package/es/src/business/ap-label/index.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -1
- package/es/src/business/index.d.ts +195 -201
- package/es/src/business/index.mjs +18 -19
- package/es/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/es/src/theme/ap-download/ap-download.css +1 -4
- package/es/src/theme/ap-table/ap-table.css +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/style/ap-download.css +1 -4
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +8 -31
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -1
- package/lib/src/ap-table/style/ap-table.css +0 -3
- package/lib/src/ap-table/utils.d.ts +7 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +31 -29
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +141 -0
- package/lib/src/business/ap-label/ApLabel.js +1 -0
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +65 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/index.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -1
- package/lib/src/business/index.d.ts +195 -201
- package/lib/src/business/index.js +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/lib/src/theme/ap-download/ap-download.css +1 -4
- package/lib/src/theme/ap-table/ap-table.css +0 -3
- package/package.json +1 -1
- package/es/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/es/src/business/ap-label/ApLabel.vue.mjs +0 -4
- package/es/src/business/ap-label/ApLabel.vue2.mjs +0 -85
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/lib/src/business/ap-label/ApLabel.vue.js +0 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
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 { CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase,
|
|
4
|
+
import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, RendererNode, RendererElement } 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';
|
|
@@ -8422,4 +8422,10 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
|
|
|
8422
8422
|
* @returns
|
|
8423
8423
|
*/
|
|
8424
8424
|
export declare function objectToString(value: any): any;
|
|
8425
|
+
export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
|
|
8426
|
+
title: any;
|
|
8427
|
+
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);
|
|
8425
8431
|
export {};
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as c, isArray as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
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";
|
|
3
|
+
import { apTableRenderItemMap as F, apTableFormItemMap as O, ellipsisTitleStyle as E } from "./constants.mjs";
|
|
4
|
+
import { isType as S } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
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) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !d(t);
|
|
9
11
|
}
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
return c(t) ? Object.keys(t).forEach((
|
|
13
|
-
c(t[
|
|
14
|
-
}) :
|
|
15
|
-
},
|
|
12
|
+
const C = (t, e, n) => {
|
|
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);
|
|
16
|
+
}) : o = n(t, e), o;
|
|
17
|
+
}, J = (t, e) => {
|
|
16
18
|
switch (t) {
|
|
17
19
|
case "dayjs":
|
|
18
20
|
return e.valueOf();
|
|
19
21
|
case "dayjsRange":
|
|
20
22
|
return e.map((n) => n.valueOf());
|
|
21
23
|
case "dayjsDayRange": {
|
|
22
|
-
const [n,
|
|
23
|
-
return [n.startOf("day").valueOf(),
|
|
24
|
+
const [n, o] = e;
|
|
25
|
+
return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
|
|
24
26
|
}
|
|
25
27
|
case "multiple":
|
|
26
28
|
case "multipleNumber":
|
|
27
|
-
return
|
|
29
|
+
return a(e) ? e : [e];
|
|
28
30
|
case "boolean":
|
|
29
31
|
return e;
|
|
30
32
|
case "object":
|
|
@@ -33,113 +35,113 @@ const O = (t, e, n) => {
|
|
|
33
35
|
return e;
|
|
34
36
|
}
|
|
35
37
|
};
|
|
36
|
-
function
|
|
37
|
-
return
|
|
38
|
+
function L(t) {
|
|
39
|
+
return a(t) ? t.join(".") : t;
|
|
38
40
|
}
|
|
39
|
-
function
|
|
41
|
+
function P(t) {
|
|
40
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
41
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
42
44
|
}
|
|
43
|
-
const
|
|
44
|
-
const e = [], n =
|
|
45
|
-
return n.forEach((
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
if (typeof
|
|
45
|
+
const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), p = (t) => {
|
|
46
|
+
const e = [], n = V(t);
|
|
47
|
+
return n.forEach((o, u) => {
|
|
48
|
+
const r = n.get(u) || n.get(`${u}`);
|
|
49
|
+
if (r) {
|
|
50
|
+
if (typeof r == "object" && (r != null && r.text)) {
|
|
49
51
|
e.push({
|
|
50
|
-
text:
|
|
51
|
-
value:
|
|
52
|
-
label:
|
|
53
|
-
disabled:
|
|
52
|
+
text: r == null ? void 0 : r.text,
|
|
53
|
+
value: u,
|
|
54
|
+
label: r == null ? void 0 : r.text,
|
|
55
|
+
disabled: r.disabled
|
|
54
56
|
});
|
|
55
57
|
return;
|
|
56
58
|
}
|
|
57
59
|
e.push({
|
|
58
|
-
text:
|
|
59
|
-
label:
|
|
60
|
-
value:
|
|
60
|
+
text: r,
|
|
61
|
+
label: r,
|
|
62
|
+
value: u
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
}), e;
|
|
64
|
-
},
|
|
66
|
+
}, Q = (t) => b(t) || t < 0 ? 0 : t, U = (t, e, n) => {
|
|
65
67
|
if (n)
|
|
66
68
|
return n;
|
|
67
|
-
const
|
|
69
|
+
const o = ["select", "date"], u = ["text", "textArea", "number"];
|
|
68
70
|
if (e === "dateRange")
|
|
69
71
|
return [t("ap.common.chooseText"), t("ap.common.chooseText")];
|
|
70
|
-
if (r.includes(e))
|
|
71
|
-
return t("ap.common.chooseText");
|
|
72
72
|
if (o.includes(e))
|
|
73
|
+
return t("ap.common.chooseText");
|
|
74
|
+
if (u.includes(e))
|
|
73
75
|
return t("ap.common.inputText");
|
|
74
76
|
};
|
|
75
|
-
function
|
|
76
|
-
return !t || !
|
|
77
|
+
function w(t, e) {
|
|
78
|
+
return !t || !y(t) ? t : t(e);
|
|
77
79
|
}
|
|
78
|
-
function
|
|
80
|
+
function z(t) {
|
|
79
81
|
let e = t.valueType || "text";
|
|
80
82
|
return t.valueEnum && (e = "status"), e;
|
|
81
83
|
}
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
84
|
+
function G(t, e, n, o) {
|
|
85
|
+
var i;
|
|
86
|
+
const u = F[t];
|
|
87
|
+
if (u)
|
|
88
|
+
return s(u, f(e, {
|
|
87
89
|
mode: "read"
|
|
88
90
|
}), null);
|
|
89
|
-
const
|
|
90
|
-
return ((
|
|
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;
|
|
91
93
|
}
|
|
92
|
-
function
|
|
94
|
+
function K(t, e) {
|
|
93
95
|
if (t.customRenderFormItem)
|
|
94
96
|
return () => {
|
|
95
|
-
const
|
|
96
|
-
return
|
|
97
|
+
const u = t.customRenderFormItem(t);
|
|
98
|
+
return T(u, {
|
|
97
99
|
...t.fieldProps,
|
|
98
100
|
span: t.span,
|
|
99
|
-
...
|
|
101
|
+
...u.props || {}
|
|
100
102
|
});
|
|
101
103
|
};
|
|
102
|
-
const n =
|
|
104
|
+
const n = O[t.valueType];
|
|
103
105
|
if (n)
|
|
104
106
|
return n;
|
|
105
|
-
const
|
|
107
|
+
const o = e == null ? void 0 : e[t.valueType];
|
|
106
108
|
return () => {
|
|
107
|
-
var
|
|
108
|
-
const
|
|
109
|
-
return
|
|
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
112
|
span: t.span
|
|
111
|
-
}),
|
|
112
|
-
default: () => [
|
|
113
|
+
}), I(u) ? u : {
|
|
114
|
+
default: () => [u]
|
|
113
115
|
}) : null;
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
const n =
|
|
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 ? {
|
|
118
120
|
checked: e.value
|
|
119
121
|
} : {
|
|
120
|
-
value:
|
|
122
|
+
value: r ? e.index + 1 : e.value
|
|
121
123
|
};
|
|
122
|
-
return t.valueEnum && (
|
|
123
|
-
...
|
|
124
|
-
...
|
|
124
|
+
return t.valueEnum && (o.valueEnum = t.valueEnum), {
|
|
125
|
+
...g(o, ["request"]),
|
|
126
|
+
...i
|
|
125
127
|
};
|
|
126
128
|
}
|
|
127
|
-
function
|
|
129
|
+
function X(t) {
|
|
128
130
|
const e = {
|
|
129
131
|
...t
|
|
130
132
|
};
|
|
131
|
-
return
|
|
133
|
+
return h(t.filters) && t.filters && t.valueEnum && (e.filters = p(t.valueEnum)), e;
|
|
132
134
|
}
|
|
133
|
-
function
|
|
134
|
-
var
|
|
135
|
+
function Y(t, e) {
|
|
136
|
+
var o;
|
|
135
137
|
const n = e || {};
|
|
136
|
-
return t.valueEnum && !((
|
|
138
|
+
return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
|
|
137
139
|
...n.field,
|
|
138
|
-
options:
|
|
140
|
+
options: p(t.valueEnum)
|
|
139
141
|
}), n;
|
|
140
142
|
}
|
|
141
|
-
function
|
|
142
|
-
if (!
|
|
143
|
+
function Z(t) {
|
|
144
|
+
if (!S("Object")(t))
|
|
143
145
|
return t;
|
|
144
146
|
try {
|
|
145
147
|
return JSON.stringify(t);
|
|
@@ -147,20 +149,45 @@ function z(t) {
|
|
|
147
149
|
return t;
|
|
148
150
|
}
|
|
149
151
|
}
|
|
152
|
+
function k(t, e, n) {
|
|
153
|
+
const o = e == null ? void 0 : e({
|
|
154
|
+
title: t.title,
|
|
155
|
+
column: t
|
|
156
|
+
});
|
|
157
|
+
if (o && (o.length > 1 || o[0].children !== "v-if"))
|
|
158
|
+
return o;
|
|
159
|
+
const r = s("span", {
|
|
160
|
+
style: E,
|
|
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,
|
|
164
|
+
placement: "bottom"
|
|
165
|
+
}, {
|
|
166
|
+
default: () => [s(x, {
|
|
167
|
+
style: {
|
|
168
|
+
padding: "4px",
|
|
169
|
+
color: n,
|
|
170
|
+
verticalAlign: "middle"
|
|
171
|
+
}
|
|
172
|
+
}, null)]
|
|
173
|
+
})]);
|
|
174
|
+
return i ? m : r;
|
|
175
|
+
}
|
|
150
176
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
177
|
+
X as apColumnToColumn,
|
|
178
|
+
L as dataIndexToStr,
|
|
179
|
+
C as formatParamsValueType,
|
|
180
|
+
Q as getColumnOrder,
|
|
181
|
+
w as getFieldProps,
|
|
182
|
+
U as getPlaceholder,
|
|
183
|
+
K as getSearchFormItemRenderNode,
|
|
184
|
+
G as getTableCellRenderNode,
|
|
185
|
+
W as getTableRenderProps,
|
|
186
|
+
z as getTableRenderType,
|
|
187
|
+
k as getTableTitle,
|
|
188
|
+
V as objectToMap,
|
|
189
|
+
Z as objectToString,
|
|
190
|
+
J as parseFieldValue,
|
|
191
|
+
Y as updateFormProps,
|
|
192
|
+
p as valueEnumToArray
|
|
166
193
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, MenuItemProps } from 'ant-design-vue';
|
|
2
|
-
import { DropdownButtonProps } from 'ant-design-vue/
|
|
2
|
+
import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
|
|
3
3
|
import { VNodeChild } from 'vue';
|
|
4
4
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
5
5
|
type MixinButton<T> = Omit<T, 'type'> & {
|
|
@@ -1,62 +1,64 @@
|
|
|
1
1
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
2
|
import { PropType, DefineComponent, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
-
import { MouseEventHandler } from 'ant-design-vue/lib/_util/EventInterface';
|
|
4
3
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
-
import { ImagePreviewType } from 'ant-design-vue/
|
|
4
|
+
import { ImagePreviewType } from 'ant-design-vue/es/vc-image';
|
|
5
|
+
import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
6
6
|
declare const _default: DefineComponent<{
|
|
7
7
|
path: StringConstructor;
|
|
8
8
|
getOssAccess: PropType<() => Promise<accessCreate>>;
|
|
9
|
-
|
|
10
|
-
type: PropType< MouseEventHandler>;
|
|
11
|
-
};
|
|
12
|
-
onError: {
|
|
13
|
-
type: PropType<OnErrorEventHandlerNonNull>;
|
|
14
|
-
};
|
|
15
|
-
prefixCls: StringConstructor;
|
|
16
|
-
placeholder: VueTypeValidableDef<any>;
|
|
17
|
-
preview: {
|
|
18
|
-
type: PropType<boolean | ImagePreviewType>;
|
|
19
|
-
default: boolean | ImagePreviewType;
|
|
20
|
-
};
|
|
21
|
-
rootClassName: StringConstructor;
|
|
9
|
+
src: StringConstructor;
|
|
22
10
|
wrapperClassName: StringConstructor;
|
|
23
|
-
fallback: StringConstructor;
|
|
24
|
-
previewPrefixCls: StringConstructor;
|
|
25
11
|
wrapperStyle: {
|
|
26
12
|
type: PropType< CSSProperties>;
|
|
27
13
|
default: CSSProperties;
|
|
28
14
|
};
|
|
15
|
+
rootClassName: StringConstructor;
|
|
16
|
+
prefixCls: StringConstructor;
|
|
17
|
+
previewPrefixCls: StringConstructor;
|
|
29
18
|
previewMask: {
|
|
30
19
|
type: PropType<false | (() => any)>;
|
|
31
20
|
default: any;
|
|
32
21
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
placeholder: VueTypeValidableDef<any>;
|
|
23
|
+
fallback: StringConstructor;
|
|
24
|
+
preview: {
|
|
25
|
+
type: PropType<boolean | ImagePreviewType>;
|
|
26
|
+
default: boolean | ImagePreviewType;
|
|
27
|
+
};
|
|
36
28
|
onClick: {
|
|
37
29
|
type: PropType< MouseEventHandler>;
|
|
38
30
|
};
|
|
39
31
|
onError: {
|
|
40
32
|
type: PropType<OnErrorEventHandlerNonNull>;
|
|
41
33
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
default: boolean | ImagePreviewType;
|
|
47
|
-
};
|
|
48
|
-
rootClassName: StringConstructor;
|
|
34
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
35
|
+
path: StringConstructor;
|
|
36
|
+
getOssAccess: PropType<() => Promise<accessCreate>>;
|
|
37
|
+
src: StringConstructor;
|
|
49
38
|
wrapperClassName: StringConstructor;
|
|
50
|
-
fallback: StringConstructor;
|
|
51
|
-
previewPrefixCls: StringConstructor;
|
|
52
39
|
wrapperStyle: {
|
|
53
40
|
type: PropType< CSSProperties>;
|
|
54
41
|
default: CSSProperties;
|
|
55
42
|
};
|
|
43
|
+
rootClassName: StringConstructor;
|
|
44
|
+
prefixCls: StringConstructor;
|
|
45
|
+
previewPrefixCls: StringConstructor;
|
|
56
46
|
previewMask: {
|
|
57
47
|
type: PropType<false | (() => any)>;
|
|
58
48
|
default: any;
|
|
59
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
|
+
};
|
|
60
62
|
}>>, {
|
|
61
63
|
preview: boolean | ImagePreviewType;
|
|
62
64
|
wrapperStyle: CSSProperties;
|
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
import { defineComponent as b, computed as
|
|
1
|
+
import { defineComponent as b, computed as c, ref as h, watchEffect as O, openBlock as _, createBlock as P, unref as w, normalizeProps as C, guardReactiveProps as F } from "vue";
|
|
2
2
|
import { Image as I } from "ant-design-vue";
|
|
3
3
|
import { injectLocaleToOss as M, getOssInstance as S, getSignatureUrl as U } from "./hooks/useOss.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { imageProps as x } from "ant-design-vue/
|
|
6
|
-
import
|
|
7
|
-
import B from "./imgs/
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const K = /* @__PURE__ */ b({
|
|
5
|
+
import { imageProps as x } from "ant-design-vue/es/image";
|
|
6
|
+
import y from "./imgs/admin-fallback.jpg.mjs";
|
|
7
|
+
import B from "./imgs/aplus-fallback.jpg.mjs";
|
|
8
|
+
import { useGlobalConfig as u } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
import { useLocale as L } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
const H = /* @__PURE__ */ b({
|
|
12
11
|
__name: "ApImage",
|
|
13
12
|
props: {
|
|
14
|
-
...
|
|
13
|
+
...x(),
|
|
15
14
|
path: String,
|
|
16
15
|
getOssAccess: Function
|
|
17
16
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
aplus:
|
|
21
|
-
admin:
|
|
22
|
-
},
|
|
17
|
+
setup(i) {
|
|
18
|
+
const a = i, o = {
|
|
19
|
+
aplus: B,
|
|
20
|
+
admin: y
|
|
21
|
+
}, m = u("uiMode"), p = u("apUpload"), { t: f, lang: g } = L(), r = c(() => a.path), v = c(
|
|
23
22
|
() => {
|
|
24
|
-
var
|
|
25
|
-
return
|
|
23
|
+
var e;
|
|
24
|
+
return a.getOssAccess || ((e = p.value) == null ? void 0 : e.getOssAccess);
|
|
26
25
|
}
|
|
27
|
-
), l =
|
|
28
|
-
() =>
|
|
29
|
-
), n =
|
|
26
|
+
), l = c(
|
|
27
|
+
() => o[m.value] || o.aplus
|
|
28
|
+
), n = c(() => (a == null ? void 0 : a.fallback) || l.value), s = h(l.value);
|
|
30
29
|
M(f, g);
|
|
31
|
-
function d(
|
|
32
|
-
const { path: t, getOssAccess: k, ...A } =
|
|
30
|
+
function d(e) {
|
|
31
|
+
const { path: t, getOssAccess: k, ...A } = e;
|
|
33
32
|
return A;
|
|
34
33
|
}
|
|
35
34
|
return O(async () => {
|
|
35
|
+
if (a != null && a.src) {
|
|
36
|
+
s.value = a.src;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
36
39
|
try {
|
|
37
40
|
if (r.value) {
|
|
38
|
-
const
|
|
39
|
-
oss:
|
|
41
|
+
const e = await S(v.value), t = await U({
|
|
42
|
+
oss: e,
|
|
40
43
|
fileName: r.value
|
|
41
44
|
});
|
|
42
|
-
t && (
|
|
45
|
+
t && (s.value = t);
|
|
43
46
|
}
|
|
44
47
|
} catch {
|
|
45
|
-
|
|
48
|
+
s.value = n.value;
|
|
46
49
|
}
|
|
47
|
-
}), (
|
|
48
|
-
...d(
|
|
50
|
+
}), (e, t) => (_(), P(w(I), C(F({
|
|
51
|
+
...d(a),
|
|
49
52
|
fallback: n.value,
|
|
50
|
-
src:
|
|
53
|
+
src: s.value
|
|
51
54
|
})), null, 16));
|
|
52
55
|
}
|
|
53
56
|
});
|
|
54
57
|
export {
|
|
55
|
-
|
|
58
|
+
H as default
|
|
56
59
|
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { VNode, DefineComponent, PropType, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
3
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
5
|
+
declare const _default: DefineComponent<{
|
|
6
|
+
helpMessage: {
|
|
7
|
+
type: PropType<VNode | string | undefined>;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
placement: {
|
|
11
|
+
type: PropType<TooltipPlacement>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
iconColor: {
|
|
15
|
+
type: PropType<string>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
iconType: {
|
|
19
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
iconSize: {
|
|
23
|
+
type: PropType<number>;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
show: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
toolTipBgColor: {
|
|
31
|
+
type: PropType<string>;
|
|
32
|
+
};
|
|
33
|
+
count: VueTypeValidableDef<any> & {
|
|
34
|
+
default: any;
|
|
35
|
+
};
|
|
36
|
+
showZero: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
overflowCount: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
dot: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: any;
|
|
47
|
+
};
|
|
48
|
+
prefixCls: StringConstructor;
|
|
49
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
50
|
+
status: {
|
|
51
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
52
|
+
};
|
|
53
|
+
size: {
|
|
54
|
+
type: PropType<"default" | "small">;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
58
|
+
text: VueTypeValidableDef<any>;
|
|
59
|
+
offset: PropType<[string | number, string | number]>;
|
|
60
|
+
numberStyle: {
|
|
61
|
+
type: PropType<CSSProperties>;
|
|
62
|
+
default: CSSProperties;
|
|
63
|
+
};
|
|
64
|
+
title: StringConstructor;
|
|
65
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
66
|
+
helpMessage: {
|
|
67
|
+
type: PropType<VNode | string | undefined>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
placement: {
|
|
71
|
+
type: PropType<TooltipPlacement>;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
iconColor: {
|
|
75
|
+
type: PropType<string>;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
iconType: {
|
|
79
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
iconSize: {
|
|
83
|
+
type: PropType<number>;
|
|
84
|
+
default: number;
|
|
85
|
+
};
|
|
86
|
+
show: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
toolTipBgColor: {
|
|
91
|
+
type: PropType<string>;
|
|
92
|
+
};
|
|
93
|
+
count: VueTypeValidableDef<any> & {
|
|
94
|
+
default: any;
|
|
95
|
+
};
|
|
96
|
+
showZero: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: any;
|
|
99
|
+
};
|
|
100
|
+
overflowCount: {
|
|
101
|
+
type: NumberConstructor;
|
|
102
|
+
default: number;
|
|
103
|
+
};
|
|
104
|
+
dot: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: any;
|
|
107
|
+
};
|
|
108
|
+
prefixCls: StringConstructor;
|
|
109
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
110
|
+
status: {
|
|
111
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
112
|
+
};
|
|
113
|
+
size: {
|
|
114
|
+
type: PropType<"default" | "small">;
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
118
|
+
text: VueTypeValidableDef<any>;
|
|
119
|
+
offset: PropType<[string | number, string | number]>;
|
|
120
|
+
numberStyle: {
|
|
121
|
+
type: PropType<CSSProperties>;
|
|
122
|
+
default: CSSProperties;
|
|
123
|
+
};
|
|
124
|
+
title: StringConstructor;
|
|
125
|
+
}>>, {
|
|
126
|
+
size: "small" | "default";
|
|
127
|
+
placement: TooltipPlacement;
|
|
128
|
+
iconType: "ellipsis" | "success" | "warning" | "question";
|
|
129
|
+
iconSize: number;
|
|
130
|
+
show: boolean;
|
|
131
|
+
dot: boolean;
|
|
132
|
+
helpMessage: string | VNode< RendererNode, RendererElement, {
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}> | undefined;
|
|
135
|
+
count: any;
|
|
136
|
+
showZero: boolean;
|
|
137
|
+
overflowCount: number;
|
|
138
|
+
numberStyle: CSSProperties;
|
|
139
|
+
iconColor: string;
|
|
140
|
+
}, {}>;
|
|
141
|
+
export default _default;
|