|
@@ -90,7 +90,7 @@ import { confirm } from "@/helper/message";
|
|
|
|
|
|
const props = defineProps<{
|
|
|
type: BoardType;
|
|
|
- existsBgImage: boolean
|
|
|
+ existsBgImage: boolean;
|
|
|
addShape: MetaShapeType | null;
|
|
|
}>();
|
|
|
|
|
@@ -112,12 +112,14 @@ const cover = reactive(
|
|
|
);
|
|
|
|
|
|
const coverUploadHandler = async () => {
|
|
|
- if (props.existsBgImage && await confirm('重新上传将替换当前图体,确定要上传吗?')) {
|
|
|
+ if (props.existsBgImage && (await confirm("重新上传将替换当前图体,确定要上传吗?"))) {
|
|
|
// await cover.upload(file)
|
|
|
}
|
|
|
- const input = document.querySelector('#coverupload')!.querySelector('input[type=file]') as HTMLInputElement
|
|
|
- input.click()
|
|
|
-}
|
|
|
+ const input = document
|
|
|
+ .querySelector("#coverupload")!
|
|
|
+ .querySelector("input[type=file]") as HTMLInputElement;
|
|
|
+ input.click();
|
|
|
+};
|
|
|
watchEffect(async () => {
|
|
|
if (cover.file) {
|
|
|
const coverImage = (await coverImageSize(cover.file, 540, 390, false)) || cover.file;
|
|
@@ -141,7 +143,7 @@ watchEffect(async () => {
|
|
|
if (imageLabel.file) {
|
|
|
emit("update:addShape", customImage, imageLabel.file);
|
|
|
imageLabel.removeFile();
|
|
|
- ElMessage.info("请前往右边画板选择为止单击添加图例");
|
|
|
+ // ElMessage.info("请前往右边画板选择为止单击添加图例");
|
|
|
}
|
|
|
});
|
|
|
</script>
|