From a8cc408e225494ff6f810e8dc1df3c098c4c31d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Mon, 28 Feb 2022 17:01:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 212 ++++++++++++++++++++++++++++ src/main.js | 3 + 2 files changed, 215 insertions(+) create mode 100644 src/components/FileUpload/index.vue diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue new file mode 100644 index 0000000..71b592d --- /dev/null +++ b/src/components/FileUpload/index.vue @@ -0,0 +1,212 @@ + + + + + 选取文件 + + + 请上传 + + 大小不超过 {{ fileSize }}MB + + + 格式为 {{ fileType.join("/") }} + + 的文件 + + + + + + + + {{ getFileName(file.name) }} + + + 删除 + + + + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index c3b7ba6..212943f 100644 --- a/src/main.js +++ b/src/main.js @@ -38,6 +38,8 @@ import RightToolbar from '@/components/RightToolbar' import Editor from '@/components/Editor' // 图片上传组件 import ImageUpload from "@/components/ImageUpload" +// 文件上传组件 +import FileUpload from "@/components/FileUpload" // 自定义树选择组件 import TreeSelect from '@/components/TreeSelect' // 字典标签组件 @@ -66,6 +68,7 @@ app.component('Pagination', Pagination) app.component('TreeSelect', TreeSelect) app.component('Editor', Editor) app.component('ImageUpload', ImageUpload) +app.component('FileUpload', FileUpload) app.component('RightToolbar', RightToolbar) app.use(router)