|
|
@@ -1,6 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref } from 'vue';
|
|
|
-import { PlusOutlined, LoadingOutlined } from '@ant-design/icons-vue';
|
|
|
+import { PlusOutlined, LoadingOutlined, DeleteOutlined } from '@ant-design/icons-vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import type { UploadChangeParam } from 'ant-design-vue';
|
|
|
|
|
|
@@ -13,6 +13,7 @@ defineProps({
|
|
|
|
|
|
const emits = defineEmits<{
|
|
|
(e: "change", file: File): void;
|
|
|
+ (e: "delete"): void;
|
|
|
}>();
|
|
|
|
|
|
function getBase64(img: Blob, callback: (base64Url: string) => void) {
|
|
|
@@ -61,6 +62,10 @@ const beforeUpload = (file: File) => {
|
|
|
|
|
|
return false;
|
|
|
};
|
|
|
+
|
|
|
+function onDelete() {
|
|
|
+ emits("delete")
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -84,8 +89,15 @@ const beforeUpload = (file: File) => {
|
|
|
</div>
|
|
|
</a-upload>
|
|
|
</a-col>
|
|
|
- <a-col class="description">
|
|
|
- 请按需上传企业logo<br />仅支持 jpg. png. 格式图片
|
|
|
+ <a-col class="description-wrap">
|
|
|
+ <div class="description">
|
|
|
+ <div style="flex: 1;">
|
|
|
+ 请按需上传企业logo<br />仅支持 jpg. png. 格式图片
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <a-button @click="onDelete"><delete-outlined /></a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
@@ -97,8 +109,16 @@ const beforeUpload = (file: File) => {
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
|
|
|
-.description {
|
|
|
+.description-wrap {
|
|
|
font-size: 0.85em;
|
|
|
color: $desc-color;
|
|
|
+ padding-bottom: 8px;
|
|
|
+
|
|
|
+ .description {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-content: space-between;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|