@peng_kai/kit 0.2.1 → 0.2.2
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.
|
@@ -9,20 +9,24 @@ defineOptions({
|
|
|
9
9
|
inheritAttrs: false,
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
const props = withDefaults(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
12
|
+
const props = withDefaults(defineProps<{
|
|
13
|
+
/** Hash */
|
|
14
|
+
hash: string
|
|
15
|
+
/** 是否脱敏 */
|
|
16
|
+
hide?: boolean
|
|
17
|
+
/** 链名 */
|
|
18
|
+
chain?: string
|
|
19
|
+
/** Hash 类型 */
|
|
20
|
+
type?: HashType
|
|
21
|
+
/** 当 Hash 为空时显示 */
|
|
22
|
+
empty?: string
|
|
23
|
+
/** 脱敏 hash 两端字符串的长度 */
|
|
24
|
+
bothLen?: number
|
|
25
|
+
}>(), {
|
|
26
|
+
hide: true,
|
|
27
|
+
type: 'transaction',
|
|
28
|
+
empty: '-',
|
|
29
|
+
});
|
|
26
30
|
|
|
27
31
|
const href = computed(() => {
|
|
28
32
|
const { hash, chain, type } = props;
|
|
@@ -33,7 +37,7 @@ const href = computed(() => {
|
|
|
33
37
|
});
|
|
34
38
|
const text = computed(() => {
|
|
35
39
|
if (props.hash)
|
|
36
|
-
return props.hide ? desensitize(props.hash) : props.hash;
|
|
40
|
+
return props.hide ? desensitize(props.hash, props.bothLen) : props.hash;
|
|
37
41
|
else
|
|
38
42
|
return props.empty;
|
|
39
43
|
});
|
|
@@ -27,6 +27,8 @@ const props = withDefaults(
|
|
|
27
27
|
cardSize?: string
|
|
28
28
|
/** 允许的图片后缀 */
|
|
29
29
|
allowExts?: string[]
|
|
30
|
+
/** 禁用 */
|
|
31
|
+
disabled?: boolean
|
|
30
32
|
}>(),
|
|
31
33
|
{
|
|
32
34
|
modelValue: () => [],
|
|
@@ -34,6 +36,7 @@ const props = withDefaults(
|
|
|
34
36
|
rowCount: 'auto-fill',
|
|
35
37
|
cardSize: '90px',
|
|
36
38
|
allowExts: () => ['jpg', 'jpeg', 'png', 'gif', 'apng', 'webp', 'svg'],
|
|
39
|
+
disabled: false,
|
|
37
40
|
},
|
|
38
41
|
);
|
|
39
42
|
const emits = defineEmits<{
|
|
@@ -68,7 +71,8 @@ function beforeUpload(file: UploadFile) {
|
|
|
68
71
|
<div :class="{ 'w-fit': typeof props.rowCount === 'number' }">
|
|
69
72
|
<AUpload
|
|
70
73
|
v-model:fileList="fileList" class="pic-card-upload" listType="picture-card" multiple :maxCount="$props.maxCount"
|
|
71
|
-
:beforeUpload="beforeUpload" :customRequest="createAwsS3Request($props.awsS3, $props.rootDir)"
|
|
74
|
+
:disabled="props.disabled" :beforeUpload="beforeUpload" :customRequest="createAwsS3Request($props.awsS3, $props.rootDir)"
|
|
75
|
+
@preview="handlePreview"
|
|
72
76
|
>
|
|
73
77
|
<i v-if="fileList.length < props.maxCount" class="i-ant-design:plus-outlined text-26px text-$antd-colorTextTertiary" />
|
|
74
78
|
</AUpload>
|
|
@@ -223,26 +223,41 @@
|
|
|
223
223
|
--padding-size: 22px;
|
|
224
224
|
|
|
225
225
|
pointer-events: all;
|
|
226
|
+
background-color: var(--antd-colorBgElevated);
|
|
226
227
|
|
|
227
228
|
@media bp-lt-mobilel {
|
|
228
229
|
--padding-size: 16px;
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
.ant-card-head {
|
|
233
|
+
position: relative;
|
|
232
234
|
min-height: 56px;
|
|
233
235
|
padding: 0 var(--padding-size);
|
|
236
|
+
background-color: var(--antd-colorBgElevated);
|
|
237
|
+
border-bottom: 1px solid var(--antd-colorBorderSecondary);
|
|
234
238
|
|
|
235
239
|
@media bp-lt-mobilel {
|
|
236
240
|
min-height: 51px;
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
243
|
|
|
244
|
+
.ant-tabs-nav {
|
|
245
|
+
&::before {
|
|
246
|
+
display: none;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
240
250
|
.ant-card-body {
|
|
241
251
|
height: var(--body-height, auto);
|
|
242
252
|
min-height: var(--min-body-height, auto);
|
|
243
253
|
max-height: var(--max-body-height, auto);
|
|
244
254
|
padding: var(--padding-size);
|
|
245
255
|
overflow-y: auto;
|
|
256
|
+
background-color: var(--antd-colorBgElevated);
|
|
257
|
+
|
|
258
|
+
&:has(+ .ant-card-actions) {
|
|
259
|
+
border-radius: 0;
|
|
260
|
+
}
|
|
246
261
|
}
|
|
247
262
|
|
|
248
263
|
.ant-card-extra .close-btn {
|
|
@@ -295,6 +310,7 @@
|
|
|
295
310
|
justify-content: flex-end !important;
|
|
296
311
|
min-height: 56px;
|
|
297
312
|
padding: 0 var(--padding-size);
|
|
313
|
+
background-color: var(--antd-colorBgElevated);
|
|
298
314
|
|
|
299
315
|
> li {
|
|
300
316
|
width: auto !important;
|