Merge branch 'main' into gitee

This commit is contained in:
xiaoxian521
2024-04-24 10:40:12 +08:00
23 changed files with 528 additions and 536 deletions

View File

@@ -1,27 +0,0 @@
<script setup lang="ts">
import "@vue-office/excel/lib/index.css";
import VueOfficeExcel from "@vue-office/excel";
defineOptions({
name: "Excels"
});
const excel = "https://xiaoxian521.github.io/hyperlink/other/excel.xlsx";
function renderedHandler() {
console.log("渲染完成");
}
function errorHandler() {
console.log("渲染失败");
}
</script>
<template>
<vue-office-excel
:src="excel"
style="height: 100vh"
@rendered="renderedHandler"
@error="errorHandler"
/>
</template>

View File

@@ -1,18 +0,0 @@
<script setup lang="ts">
import "@vue-office/docx/lib/index.css";
import VueOfficeDocx from "@vue-office/docx";
defineOptions({
name: "Word"
});
const docx = "https://xiaoxian521.github.io/hyperlink/other/word.docx";
function rendered() {
console.log("渲染完成");
}
</script>
<template>
<vue-office-docx :src="docx" @rendered="rendered" />
</template>

View File

@@ -13,7 +13,7 @@ defineOptions({
});
const imgSrc = ref("");
const cropperInfo = ref();
const cropperBlob = ref();
const cropRef = ref();
const uploadRef = ref();
const isShow = ref(false);
@@ -66,11 +66,11 @@ const handleClose = () => {
isShow.value = false;
};
const onCropper = info => (cropperInfo.value = info);
const onCropper = ({ blob }) => (cropperBlob.value = blob);
const handleSubmitImage = () => {
const formData = createFormData({
files: new File([cropperInfo.value], "avatar")
files: new File([cropperBlob.value], "avatar")
});
formUpload(formData)
.then(({ success, data }) => {