hy-app 0.1.2 → 0.1.3
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/README.md +1 -1
- package/api/http.ts +8 -8
- package/components/dialog/index.ts +2 -2
- package/components/hy-address-picker/hy-address-picker.vue +3 -29
- package/components/hy-address-picker/index.scss +27 -0
- package/components/hy-avatar/hy-avatar.vue +1 -45
- package/components/hy-avatar/index.scss +45 -0
- package/components/hy-avatar/typing.d.ts +1 -1
- package/components/hy-back-top/hy-back-top.vue +7 -22
- package/components/hy-back-top/index.scss +16 -0
- package/components/hy-back-top/props.ts +4 -4
- package/components/hy-back-top/typing.d.ts +2 -3
- package/components/hy-badge/hy-badge.vue +1 -72
- package/components/hy-badge/index.scss +72 -0
- package/components/hy-button/hy-button.vue +12 -124
- package/components/hy-button/index.scss +116 -0
- package/components/hy-calendar/header.vue +76 -0
- package/components/hy-calendar/hy-calendar.vue +366 -0
- package/components/hy-calendar/index.scss +171 -0
- package/components/hy-calendar/month.vue +524 -0
- package/components/hy-calendar/props.ts +37 -0
- package/components/hy-calendar/typing.d.ts +126 -0
- package/components/hy-card/hy-card.vue +21 -84
- package/components/hy-card/index.scss +57 -0
- package/components/hy-card/props.ts +2 -2
- package/components/hy-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +1 -137
- package/components/hy-cell/index.scss +137 -0
- package/components/hy-check-button/hy-check-button.vue +1 -0
- package/components/hy-check-button/index.scss +5 -0
- package/components/hy-checkbox/hy-checkbox.vue +2 -95
- package/components/hy-checkbox/index.scss +94 -0
- package/components/hy-checkbox/typing.d.ts +1 -2
- package/components/hy-count-down/hy-count-down.vue +150 -0
- package/components/hy-count-down/index.scss +6 -0
- package/components/hy-count-down/index.ts +52 -0
- package/components/hy-count-down/props.ts +10 -0
- package/components/hy-count-down/typing.d.ts +20 -0
- package/components/hy-count-to/hy-count-to.vue +213 -0
- package/components/hy-count-to/index.scss +6 -0
- package/components/hy-count-to/props.ts +17 -0
- package/components/hy-count-to/typing.d.ts +48 -0
- package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -28
- package/components/hy-datetime-picker/index.scss +28 -0
- package/components/hy-divider/hy-divider.vue +24 -49
- package/components/hy-divider/index.scss +25 -0
- package/components/hy-divider/props.ts +2 -2
- package/components/hy-divider/typing.d.ts +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +43 -0
- package/components/hy-dropdown/index.scss +17 -0
- package/components/hy-dropdown/props.ts +17 -0
- package/components/hy-dropdown/typing.d.ts +48 -0
- package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
- package/components/hy-dropdown-item/index.scss +96 -0
- package/components/hy-dropdown-item/props.ts +10 -0
- package/components/hy-dropdown-item/typing.d.ts +31 -0
- package/components/hy-empty/hy-empty.vue +8 -26
- package/components/hy-empty/index.scss +19 -0
- package/components/hy-empty/props.ts +2 -2
- package/components/hy-empty/typing.d.ts +1 -1
- package/components/hy-float-button/hy-float-button.vue +201 -0
- package/components/hy-float-button/index.scss +69 -0
- package/components/hy-float-button/props.ts +25 -0
- package/components/hy-float-button/typing.d.ts +93 -0
- package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
- package/components/hy-folding-panel/index.scss +6 -0
- package/components/hy-folding-panel/props.ts +2 -2
- package/components/hy-folding-panel/typing.d.ts +2 -2
- package/components/hy-form/hy-form.vue +17 -34
- package/components/hy-form/index.scss +30 -0
- package/components/hy-form/props.ts +2 -0
- package/components/hy-form/typing.d.ts +9 -1
- package/components/hy-grid/hy-grid.vue +1 -43
- package/components/hy-grid/index.scss +40 -0
- package/components/hy-icon/hy-icon.vue +1 -93
- package/components/hy-icon/index.scss +84 -0
- package/components/hy-image/hy-image.vue +212 -0
- package/components/hy-image/index.scss +26 -0
- package/components/hy-image/props.ts +24 -0
- package/components/hy-image/typing.d.ts +76 -0
- package/components/hy-input/hy-input.vue +2 -72
- package/components/hy-input/index.scss +65 -0
- package/components/hy-line/hy-line.vue +4 -8
- package/components/hy-line/index.scss +5 -0
- package/components/hy-line/props.ts +3 -3
- package/components/hy-line/typing.d.ts +2 -2
- package/components/hy-line-progress/hy-line-progress.vue +15 -44
- package/components/hy-line-progress/index.scss +38 -0
- package/components/hy-line-progress/props.ts +2 -2
- package/components/hy-line-progress/typing.d.ts +1 -1
- package/components/hy-list/hy-list.vue +11 -41
- package/components/hy-list/index.scss +32 -0
- package/components/hy-list/props.ts +2 -2
- package/components/hy-loading/hy-loading.vue +95 -0
- package/components/hy-loading/index.scss +103 -0
- package/components/hy-loading/props.ts +17 -0
- package/components/hy-loading/typing.d.ts +52 -0
- package/components/hy-login/TheUserLogin.vue +16 -16
- package/components/hy-login/hy-login.vue +9 -9
- package/components/hy-login/props.ts +4 -4
- package/components/hy-modal/hy-modal.vue +11 -89
- package/components/hy-modal/index.scss +77 -0
- package/components/hy-modal/props.ts +2 -2
- package/components/hy-modal/typing.d.ts +1 -1
- package/components/hy-navbar/hy-navbar.vue +20 -92
- package/components/hy-navbar/index.scss +67 -0
- package/components/hy-navbar/props.ts +2 -2
- package/components/hy-navbar/typing.d.ts +1 -1
- package/components/hy-notice-bar/hy-column-notice.vue +11 -39
- package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
- package/components/hy-notice-bar/hy-row-notice.vue +5 -56
- package/components/hy-notice-bar/index.scss +93 -0
- package/components/hy-notice-bar/props.ts +4 -2
- package/components/hy-notice-bar/typing.d.ts +13 -3
- package/components/hy-number-step/hy-number-step.vue +1 -70
- package/components/hy-number-step/index.scss +71 -0
- package/components/hy-overlay/hy-overlay.vue +2 -14
- package/components/hy-overlay/index.scss +9 -0
- package/components/hy-picker/hy-picker.vue +1 -68
- package/components/hy-picker/index.scss +68 -0
- package/components/hy-popup/hy-popup.vue +1 -74
- package/components/hy-popup/index.scss +60 -0
- package/components/hy-price/hy-price.vue +1 -11
- package/components/hy-price/index.scss +11 -0
- package/components/hy-qrcode/hy-qrcode.vue +15 -37
- package/components/hy-qrcode/index.scss +23 -0
- package/components/hy-qrcode/props.ts +2 -2
- package/components/hy-qrcode/typing.d.ts +2 -2
- package/components/hy-radio/hy-radio.vue +2 -101
- package/components/hy-radio/index.scss +93 -0
- package/components/hy-radio/typing.d.ts +1 -2
- package/components/hy-rate/hy-rate.vue +1 -33
- package/components/hy-rate/index.scss +33 -0
- package/components/hy-read-more/hy-read-more.vue +7 -30
- package/components/hy-read-more/index.scss +25 -0
- package/components/hy-read-more/props.ts +3 -3
- package/components/hy-read-more/typing.d.ts +1 -1
- package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
- package/components/hy-safe-bottom/index.scss +5 -0
- package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
- package/components/hy-scroll-list/index.scss +34 -0
- package/components/hy-scroll-list/props.ts +2 -2
- package/components/hy-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +1 -83
- package/components/hy-search/index.scss +83 -0
- package/components/hy-slider/hy-slider.vue +14 -92
- package/components/hy-slider/index.scss +77 -0
- package/components/hy-status-bar/hy-status-bar.vue +41 -0
- package/components/hy-status-bar/index.scss +6 -0
- package/components/hy-status-bar/props.ts +8 -0
- package/components/hy-status-bar/typing.d.ts +12 -0
- package/components/hy-steps/hy-steps.vue +36 -163
- package/components/hy-steps/index.scss +131 -0
- package/components/hy-steps/props.ts +2 -2
- package/components/hy-steps/typing.d.ts +2 -2
- package/components/hy-subsection/hy-subsection.vue +40 -132
- package/components/hy-subsection/index.scss +82 -0
- package/components/hy-subsection/props.ts +1 -0
- package/components/hy-subsection/typing.d.ts +13 -4
- package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
- package/components/hy-swipe-action/index.scss +9 -0
- package/components/hy-swipe-action/index.wxs +235 -0
- package/components/hy-swipe-action/props.ts +16 -0
- package/components/hy-swipe-action/typing.d.ts +55 -0
- package/components/hy-swipe-action/wxs.js +15 -0
- package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
- package/components/hy-swiper/hy-swiper.vue +1 -54
- package/components/hy-swiper/index.scss +82 -0
- package/components/hy-switch/hy-switch.vue +62 -72
- package/components/hy-switch/index.scss +46 -0
- package/components/hy-switch/props.ts +4 -1
- package/components/hy-switch/typing.d.ts +14 -1
- package/components/hy-tabs/hy-tabs.vue +22 -81
- package/components/hy-tabs/index.scss +63 -0
- package/components/hy-tabs/props.ts +5 -5
- package/components/hy-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +1 -214
- package/components/hy-tag/index.scss +204 -0
- package/components/hy-text/hy-text.vue +238 -0
- package/components/hy-text/index.scss +70 -0
- package/components/hy-text/index.ts +0 -0
- package/components/hy-text/props.ts +30 -0
- package/components/hy-text/typing.d.ts +98 -0
- package/components/hy-textarea/hy-textarea.vue +1 -46
- package/components/hy-textarea/index.scss +40 -0
- package/components/hy-tooltip/hy-tooltip.vue +42 -95
- package/components/hy-tooltip/index.scss +64 -0
- package/components/hy-tooltip/props.ts +2 -2
- package/components/hy-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/hy-transition.vue +4 -2
- package/components/hy-transition/typing.d.ts +1 -13
- package/components/hy-upload/hy-upload.vue +37 -182
- package/components/hy-upload/index.scss +147 -0
- package/components/hy-upload/props.ts +2 -2
- package/components/hy-upload/typing.d.ts +11 -11
- package/components/hy-warn/hy-warn.vue +15 -123
- package/components/hy-warn/index.scss +109 -0
- package/components/hy-warn/props.ts +3 -3
- package/components/hy-warn/typing.d.ts +4 -3
- package/components/hy-waterfall/index.scss +82 -0
- package/components/index.ts +25 -1
- package/components/message/index.ts +54 -54
- package/config/color.ts +2 -1
- package/global/index.ts +6 -6
- package/global/register-properties.ts +2 -2
- package/index.scss +2 -1
- package/libs/css/common.scss +14 -2
- package/package.json +2 -2
- package/{libs/css → public/font}/iconfont.css +4 -4
- package/theme.scss +6 -4
- package/typing/modules/common.d.ts +16 -1
- package/utils/calendar.js +1021 -0
- package/utils/colorGradient.ts +112 -0
- package/utils/index.ts +2 -0
- package/utils/inside.ts +80 -34
- package/utils/inspect.ts +66 -0
- package/utils/utils.ts +11 -12
- package/libs/css/download.zip +0 -0
- /package/{libs/css → public/font}/iconfont.ttf +0 -0
- /package/{libs/css → public/font}/iconfont.woff +0 -0
- /package/{libs/css → public/font}/iconfont.woff2 +0 -0
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
:style="[
|
|
17
17
|
{
|
|
18
18
|
width: addUnit(width),
|
|
19
|
-
height: addUnit(height)
|
|
20
|
-
}
|
|
19
|
+
height: addUnit(height),
|
|
20
|
+
},
|
|
21
21
|
]"
|
|
22
22
|
/>
|
|
23
23
|
<view
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
:style="[
|
|
108
108
|
{
|
|
109
109
|
width: addUnit(width),
|
|
110
|
-
height: addUnit(height)
|
|
111
|
-
}
|
|
110
|
+
height: addUnit(height),
|
|
111
|
+
},
|
|
112
112
|
]"
|
|
113
113
|
>
|
|
114
114
|
<HyIcon
|
|
@@ -128,7 +128,8 @@
|
|
|
128
128
|
<script setup lang="ts">
|
|
129
129
|
import { ref, toRefs, watch } from "vue";
|
|
130
130
|
import defaultProps from "./props";
|
|
131
|
-
import IProps
|
|
131
|
+
import type IProps from "./typing";
|
|
132
|
+
import type { FileVo } from "./typing";
|
|
132
133
|
import { addUnit, chooseFile } from "../../utils";
|
|
133
134
|
import { IconConfig } from "../../config";
|
|
134
135
|
// 组件
|
|
@@ -151,7 +152,6 @@ const {
|
|
|
151
152
|
previewFullImage,
|
|
152
153
|
deletable,
|
|
153
154
|
useBeforeRead,
|
|
154
|
-
afterRead
|
|
155
155
|
} = toRefs(props);
|
|
156
156
|
const emit = defineEmits([
|
|
157
157
|
"clickPreview",
|
|
@@ -159,7 +159,7 @@ const emit = defineEmits([
|
|
|
159
159
|
"error",
|
|
160
160
|
"delete",
|
|
161
161
|
"afterRead",
|
|
162
|
-
"oversize"
|
|
162
|
+
"oversize",
|
|
163
163
|
]);
|
|
164
164
|
|
|
165
165
|
const lists = ref<FileVo[]>([]);
|
|
@@ -172,8 +172,8 @@ const formatFileList = () => {
|
|
|
172
172
|
// 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
|
|
173
173
|
isImage: accept.value === "image",
|
|
174
174
|
isVideo: accept.value === "video",
|
|
175
|
-
deletable: item.deletable || deletable.value
|
|
176
|
-
})
|
|
175
|
+
deletable: item.deletable || deletable.value,
|
|
176
|
+
}),
|
|
177
177
|
);
|
|
178
178
|
isInCount.value = lists.value.length < maxCount.value;
|
|
179
179
|
};
|
|
@@ -183,28 +183,28 @@ watch(
|
|
|
183
183
|
() => {
|
|
184
184
|
formatFileList();
|
|
185
185
|
},
|
|
186
|
-
{ immediate: true, deep: true }
|
|
186
|
+
{ immediate: true, deep: true },
|
|
187
187
|
);
|
|
188
188
|
|
|
189
189
|
watch(
|
|
190
190
|
() => deletable.value,
|
|
191
191
|
() => {
|
|
192
192
|
formatFileList();
|
|
193
|
-
}
|
|
193
|
+
},
|
|
194
194
|
);
|
|
195
195
|
|
|
196
196
|
watch(
|
|
197
197
|
() => maxCount.value,
|
|
198
198
|
() => {
|
|
199
199
|
formatFileList();
|
|
200
|
-
}
|
|
200
|
+
},
|
|
201
201
|
);
|
|
202
202
|
|
|
203
203
|
watch(
|
|
204
204
|
() => accept.value,
|
|
205
205
|
() => {
|
|
206
206
|
formatFileList();
|
|
207
|
-
}
|
|
207
|
+
},
|
|
208
208
|
);
|
|
209
209
|
|
|
210
210
|
const chooseFileFn = () => {
|
|
@@ -226,12 +226,12 @@ const chooseFileFn = () => {
|
|
|
226
226
|
compressed: compressed.value,
|
|
227
227
|
maxDuration: maxDuration.value,
|
|
228
228
|
sizeType: sizeType.value,
|
|
229
|
-
camera: camera.value
|
|
229
|
+
camera: camera.value,
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
maxCount: maxCount.value - lists.value.length
|
|
233
|
-
}
|
|
234
|
-
)
|
|
232
|
+
maxCount: maxCount.value - lists.value.length,
|
|
233
|
+
},
|
|
234
|
+
),
|
|
235
235
|
)
|
|
236
236
|
.then((res: any) => {
|
|
237
237
|
onBeforeRead(multiple.value ? res : res[0]);
|
|
@@ -255,16 +255,16 @@ const onBeforeRead = (file: FileVo) => {
|
|
|
255
255
|
Object.assign(
|
|
256
256
|
Object.assign(
|
|
257
257
|
{
|
|
258
|
-
file
|
|
258
|
+
file,
|
|
259
259
|
},
|
|
260
|
-
getDetail()
|
|
260
|
+
getDetail(),
|
|
261
261
|
),
|
|
262
262
|
{
|
|
263
263
|
callback: (ok: any) => {
|
|
264
264
|
ok ? resolve(ok) : reject();
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
)
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
),
|
|
268
268
|
);
|
|
269
269
|
});
|
|
270
270
|
}
|
|
@@ -278,7 +278,7 @@ const onBeforeRead = (file: FileVo) => {
|
|
|
278
278
|
const getDetail = (index?: number) => {
|
|
279
279
|
return {
|
|
280
280
|
name: name.value,
|
|
281
|
-
index: index == null ? fileList.value.length : index
|
|
281
|
+
index: index == null ? fileList.value.length : index,
|
|
282
282
|
};
|
|
283
283
|
};
|
|
284
284
|
const onAfterRead = (file: FileVo) => {
|
|
@@ -290,10 +290,10 @@ const onAfterRead = (file: FileVo) => {
|
|
|
290
290
|
"oversize",
|
|
291
291
|
Object.assign(
|
|
292
292
|
{
|
|
293
|
-
file
|
|
293
|
+
file,
|
|
294
294
|
},
|
|
295
|
-
getDetail()
|
|
296
|
-
)
|
|
295
|
+
getDetail(),
|
|
296
|
+
),
|
|
297
297
|
);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
@@ -304,10 +304,10 @@ const onAfterRead = (file: FileVo) => {
|
|
|
304
304
|
"afterRead",
|
|
305
305
|
Object.assign(
|
|
306
306
|
{
|
|
307
|
-
file
|
|
307
|
+
file,
|
|
308
308
|
},
|
|
309
|
-
getDetail()
|
|
310
|
-
)
|
|
309
|
+
getDetail(),
|
|
310
|
+
),
|
|
311
311
|
);
|
|
312
312
|
};
|
|
313
313
|
|
|
@@ -320,8 +320,8 @@ const deleteItem = (index: number) => {
|
|
|
320
320
|
emit(
|
|
321
321
|
"delete",
|
|
322
322
|
Object.assign(Object.assign({}, getDetail(index)), {
|
|
323
|
-
file: fileList.value[index]
|
|
324
|
-
})
|
|
323
|
+
file: fileList.value[index],
|
|
324
|
+
}),
|
|
325
325
|
);
|
|
326
326
|
};
|
|
327
327
|
|
|
@@ -351,7 +351,7 @@ const onPreviewImage = (previewItem: FileVo, index: number) => {
|
|
|
351
351
|
current: current,
|
|
352
352
|
fail() {
|
|
353
353
|
uni.showToast({ title: "预览图片失败" });
|
|
354
|
-
}
|
|
354
|
+
},
|
|
355
355
|
});
|
|
356
356
|
};
|
|
357
357
|
|
|
@@ -368,8 +368,8 @@ const onPreviewVideo = (index: number) => {
|
|
|
368
368
|
if (item.isVideo || (item.type && item.type === "video")) {
|
|
369
369
|
sources.push(
|
|
370
370
|
Object.assign(Object.assign({}, item), {
|
|
371
|
-
type: "video"
|
|
372
|
-
})
|
|
371
|
+
type: "video",
|
|
372
|
+
}),
|
|
373
373
|
);
|
|
374
374
|
if (i === index) {
|
|
375
375
|
current = videoIndex;
|
|
@@ -386,7 +386,7 @@ const onPreviewVideo = (index: number) => {
|
|
|
386
386
|
current: current,
|
|
387
387
|
fail() {
|
|
388
388
|
uni.showToast({ title: "预览视频失败" });
|
|
389
|
-
}
|
|
389
|
+
},
|
|
390
390
|
});
|
|
391
391
|
// #endif
|
|
392
392
|
};
|
|
@@ -402,156 +402,11 @@ const onClickPreview = (item: FileVo, index: number) => {
|
|
|
402
402
|
}
|
|
403
403
|
emit(
|
|
404
404
|
"clickPreview",
|
|
405
|
-
Object.assign(Object.assign({}, item), getDetail(index))
|
|
405
|
+
Object.assign(Object.assign({}, item), getDetail(index)),
|
|
406
406
|
);
|
|
407
407
|
};
|
|
408
408
|
</script>
|
|
409
409
|
|
|
410
410
|
<style lang="scss" scoped>
|
|
411
|
-
@import "
|
|
412
|
-
@import "../../theme.scss";
|
|
413
|
-
$hy-upload-image-width: 80px !default;
|
|
414
|
-
$hy-upload-text-font-size: 11px !default;
|
|
415
|
-
|
|
416
|
-
.hy-upload {
|
|
417
|
-
@include flex(column);
|
|
418
|
-
flex: 1;
|
|
419
|
-
|
|
420
|
-
&__wrap {
|
|
421
|
-
@include flex;
|
|
422
|
-
flex-wrap: wrap;
|
|
423
|
-
flex: 1;
|
|
424
|
-
|
|
425
|
-
&__preview {
|
|
426
|
-
border-radius: 2px;
|
|
427
|
-
margin: 0 8px 8px 0;
|
|
428
|
-
position: relative;
|
|
429
|
-
overflow: hidden;
|
|
430
|
-
@include flex;
|
|
431
|
-
|
|
432
|
-
&__image {
|
|
433
|
-
width: $hy-upload-image-width;
|
|
434
|
-
height: $hy-upload-image-width;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
&__other {
|
|
438
|
-
width: $hy-upload-image-width;
|
|
439
|
-
height: $hy-upload-image-width;
|
|
440
|
-
background-color: rgb(242, 242, 242);
|
|
441
|
-
flex: 1;
|
|
442
|
-
@include flex(column);
|
|
443
|
-
justify-content: center;
|
|
444
|
-
align-items: center;
|
|
445
|
-
|
|
446
|
-
&__text {
|
|
447
|
-
font-size: $hy-upload-text-font-size;
|
|
448
|
-
color: $hy-tips-color;
|
|
449
|
-
margin-top: 2px;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
&__deletable {
|
|
456
|
-
position: absolute;
|
|
457
|
-
top: 0;
|
|
458
|
-
right: 0;
|
|
459
|
-
background-color: rgb(55, 55, 55);
|
|
460
|
-
height: 14px;
|
|
461
|
-
width: 14px;
|
|
462
|
-
@include flex;
|
|
463
|
-
border-bottom-left-radius: 100px;
|
|
464
|
-
align-items: center;
|
|
465
|
-
justify-content: center;
|
|
466
|
-
z-index: 9;
|
|
467
|
-
|
|
468
|
-
&__icon {
|
|
469
|
-
position: absolute;
|
|
470
|
-
transform: scale(0.7);
|
|
471
|
-
top: 0;
|
|
472
|
-
right: 0;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
&__success {
|
|
477
|
-
position: absolute;
|
|
478
|
-
bottom: 0;
|
|
479
|
-
right: 0;
|
|
480
|
-
@include flex;
|
|
481
|
-
// 由于weex(nvue)为阿里巴巴的KPI(部门业绩考核)的laji产物,不支持css绘制三角形
|
|
482
|
-
// 所以在nvue下使用图片,非nvue下使用css实现
|
|
483
|
-
/* #ifndef APP-NVUE */
|
|
484
|
-
border-style: solid;
|
|
485
|
-
border-color: transparent $hy-success $hy-success transparent;
|
|
486
|
-
border-width: 9px;
|
|
487
|
-
align-items: center;
|
|
488
|
-
justify-content: center;
|
|
489
|
-
/* #endif */
|
|
490
|
-
|
|
491
|
-
&__icon {
|
|
492
|
-
/* #ifndef APP-NVUE */
|
|
493
|
-
position: absolute;
|
|
494
|
-
transform: scale(0.7);
|
|
495
|
-
bottom: -10px;
|
|
496
|
-
right: -10px;
|
|
497
|
-
/* #endif */
|
|
498
|
-
/* #ifdef APP-NVUE */
|
|
499
|
-
width: 16px;
|
|
500
|
-
height: 16px;
|
|
501
|
-
/* #endif */
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
&__button {
|
|
506
|
-
@include flex(column);
|
|
507
|
-
align-items: center;
|
|
508
|
-
justify-content: center;
|
|
509
|
-
width: $hy-upload-image-width;
|
|
510
|
-
height: $hy-upload-image-width;
|
|
511
|
-
background-color: rgb(244, 245, 247);
|
|
512
|
-
border-radius: 2px;
|
|
513
|
-
margin: 0 8px 8px 0;
|
|
514
|
-
/* #ifndef APP-NVUE */
|
|
515
|
-
box-sizing: border-box;
|
|
516
|
-
/* #endif */
|
|
517
|
-
|
|
518
|
-
&__text {
|
|
519
|
-
font-size: $hy-upload-text-font-size;
|
|
520
|
-
color: $hy-tips-color;
|
|
521
|
-
margin-top: 2px;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
&--hover {
|
|
525
|
-
background-color: rgb(230, 231, 233);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
&--disabled {
|
|
529
|
-
opacity: 0.5;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.material-sent {
|
|
535
|
-
width: 100%;
|
|
536
|
-
height: 100%;
|
|
537
|
-
background: rgba(245, 245, 245, 0.3);
|
|
538
|
-
backdrop-filter: blur(4px);
|
|
539
|
-
position: absolute;
|
|
540
|
-
display: flex;
|
|
541
|
-
justify-content: center;
|
|
542
|
-
align-items: center;
|
|
543
|
-
flex-direction: column;
|
|
544
|
-
z-index: 10;
|
|
545
|
-
|
|
546
|
-
.select-tips {
|
|
547
|
-
width: 70%;
|
|
548
|
-
height: 10rpx;
|
|
549
|
-
margin-bottom: 12rpx;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.tips-text {
|
|
553
|
-
font-size: 12px;
|
|
554
|
-
color: #b99c65;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
411
|
+
@import "./index.scss";
|
|
557
412
|
</style>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
2
|
+
@use "../../theme.scss" as *;
|
|
3
|
+
|
|
4
|
+
$hy-upload-image-width: 80px !default;
|
|
5
|
+
$hy-upload-text-font-size: 11px !default;
|
|
6
|
+
|
|
7
|
+
.hy-upload {
|
|
8
|
+
@include flex(column);
|
|
9
|
+
flex: 1;
|
|
10
|
+
|
|
11
|
+
&__wrap {
|
|
12
|
+
@include flex;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
flex: 1;
|
|
15
|
+
|
|
16
|
+
&__preview {
|
|
17
|
+
border-radius: 2px;
|
|
18
|
+
margin: 0 8px 8px 0;
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
@include flex;
|
|
22
|
+
|
|
23
|
+
&__image {
|
|
24
|
+
width: $hy-upload-image-width;
|
|
25
|
+
height: $hy-upload-image-width;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__other {
|
|
29
|
+
width: $hy-upload-image-width;
|
|
30
|
+
height: $hy-upload-image-width;
|
|
31
|
+
background-color: rgb(242, 242, 242);
|
|
32
|
+
flex: 1;
|
|
33
|
+
@include flex(column);
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
&__text {
|
|
38
|
+
font-size: $hy-upload-text-font-size;
|
|
39
|
+
color: $hy-tips-color;
|
|
40
|
+
margin-top: 2px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__deletable {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
background-color: rgb(55, 55, 55);
|
|
51
|
+
height: 14px;
|
|
52
|
+
width: 14px;
|
|
53
|
+
@include flex;
|
|
54
|
+
border-bottom-left-radius: 100px;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
z-index: 9;
|
|
58
|
+
|
|
59
|
+
&__icon {
|
|
60
|
+
position: absolute;
|
|
61
|
+
transform: scale(0.7);
|
|
62
|
+
top: 0;
|
|
63
|
+
right: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__success {
|
|
68
|
+
position: absolute;
|
|
69
|
+
bottom: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
@include flex;
|
|
72
|
+
// 由于weex(nvue)为阿里巴巴的KPI(部门业绩考核)的laji产物,不支持css绘制三角形
|
|
73
|
+
// 所以在nvue下使用图片,非nvue下使用css实现
|
|
74
|
+
/* #ifndef APP-NVUE */
|
|
75
|
+
border-style: solid;
|
|
76
|
+
border-color: transparent $hy-success $hy-success transparent;
|
|
77
|
+
border-width: 9px;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
/* #endif */
|
|
81
|
+
|
|
82
|
+
&__icon {
|
|
83
|
+
/* #ifndef APP-NVUE */
|
|
84
|
+
position: absolute;
|
|
85
|
+
transform: scale(0.7);
|
|
86
|
+
bottom: -10px;
|
|
87
|
+
right: -10px;
|
|
88
|
+
/* #endif */
|
|
89
|
+
/* #ifdef APP-NVUE */
|
|
90
|
+
width: 16px;
|
|
91
|
+
height: 16px;
|
|
92
|
+
/* #endif */
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__button {
|
|
97
|
+
@include flex(column);
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
width: $hy-upload-image-width;
|
|
101
|
+
height: $hy-upload-image-width;
|
|
102
|
+
background-color: rgb(244, 245, 247);
|
|
103
|
+
border-radius: 2px;
|
|
104
|
+
margin: 0 8px 8px 0;
|
|
105
|
+
/* #ifndef APP-NVUE */
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
/* #endif */
|
|
108
|
+
|
|
109
|
+
&__text {
|
|
110
|
+
font-size: $hy-upload-text-font-size;
|
|
111
|
+
color: $hy-tips-color;
|
|
112
|
+
margin-top: 2px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--hover {
|
|
116
|
+
background-color: rgb(230, 231, 233);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--disabled {
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.material-sent {
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 100%;
|
|
128
|
+
background: rgba(245, 245, 245, 0.3);
|
|
129
|
+
backdrop-filter: blur(4px);
|
|
130
|
+
position: absolute;
|
|
131
|
+
display: flex;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
align-items: center;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
z-index: 10;
|
|
136
|
+
|
|
137
|
+
.select-tips {
|
|
138
|
+
width: 70%;
|
|
139
|
+
height: 10rpx;
|
|
140
|
+
margin-bottom: 12rpx;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.tips-text {
|
|
144
|
+
font-size: 12px;
|
|
145
|
+
color: #b99c65;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
1
|
+
import type IProps from "./typing";
|
|
2
2
|
import { IconConfig } from "../../config";
|
|
3
3
|
|
|
4
4
|
const defaultProps: IProps = {
|
|
@@ -23,7 +23,7 @@ const defaultProps: IProps = {
|
|
|
23
23
|
fileList: [],
|
|
24
24
|
uploadText: "",
|
|
25
25
|
width: 80,
|
|
26
|
-
height: 80
|
|
26
|
+
height: 80,
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export default defaultProps;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { CSSProperties } from "vue";
|
|
1
|
+
import type { CSSProperties } from "vue";
|
|
2
2
|
|
|
3
3
|
export interface FileVo {
|
|
4
4
|
/**
|
|
5
5
|
* @description 上传文件本地地址链接
|
|
6
6
|
* */
|
|
7
|
-
url
|
|
7
|
+
url?: string;
|
|
8
8
|
/**
|
|
9
9
|
* @description 上传文件类型
|
|
10
10
|
* */
|
|
11
|
-
type
|
|
11
|
+
type?: "image" | "video" | "file";
|
|
12
12
|
/**
|
|
13
13
|
* @description 上传文件本地地址链接
|
|
14
14
|
* */
|
|
15
|
-
thumb
|
|
15
|
+
thumb?: string;
|
|
16
16
|
/**
|
|
17
17
|
* @description 文件大小
|
|
18
18
|
* */
|
|
19
|
-
size
|
|
19
|
+
size?: number;
|
|
20
20
|
/**
|
|
21
21
|
* @description 是否视频
|
|
22
22
|
* */
|
|
23
|
-
isVideo
|
|
23
|
+
isVideo?: boolean;
|
|
24
24
|
/**
|
|
25
25
|
* @description 是否图片
|
|
26
26
|
* */
|
|
27
|
-
isImage
|
|
27
|
+
isImage?: boolean;
|
|
28
28
|
/**
|
|
29
29
|
* @description 是否显示删除按钮
|
|
30
30
|
* */
|
|
31
|
-
deletable
|
|
31
|
+
deletable?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* @description 上传时候状态
|
|
34
34
|
* */
|
|
35
|
-
status
|
|
35
|
+
status?: "loading" | "failed" | "success";
|
|
36
36
|
/**
|
|
37
37
|
* @description 提示信息
|
|
38
38
|
* */
|
|
39
|
-
message
|
|
39
|
+
message?: string;
|
|
40
40
|
/**
|
|
41
41
|
* @description 进度条
|
|
42
42
|
* */
|
|
43
|
-
schedule
|
|
43
|
+
schedule?: string | number;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export default interface IProps {
|