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)