Add upload (#1016)

* [style] 修改右上角图标,选择统一风格的iconfont

* [fix] fix webfont tree in readme file

* (fix) 菜单编辑的时候,icon不居中

* 更新为使用组件

* 媒体库增加 普通上传、压缩上传按钮,方便媒体库直接上传图片

* 普通上传组件

* 增加数据类型切换后的的校验,避免使用错误的查询条件和字典条件。

Co-authored-by: bypanghu <bypanghu@163.com>
Co-authored-by: tesun <36953434+tesun@users.noreply.github.com>
This commit is contained in:
奇淼(piexlmax
2022-04-10 22:01:36 +08:00
committed by GitHub
co-authored by bypanghu tesun
parent dd7e37ef6e
commit eaa97e7eb8
5 changed files with 411 additions and 344 deletions
+20
View File
@@ -1,5 +1,19 @@
<template>
<el-drawer v-model="drawer" title="媒体库">
<div class="gva-btn-list">
<upload-common
v-model:imageCommon="imageCommon"
class="upload-btn-media-library"
@on-success="open"
/>
<upload-image
v-model:imageUrl="imageUrl"
:file-size="512"
:max-w-h="1080"
class="upload-btn-media-library"
@on-success="open"
/>
</div>
<div class="media">
<el-image
v-for="(item,key) in picList"
@@ -21,6 +35,11 @@
<script setup>
import { ref } from 'vue'
import { getFileList } from '@/api/fileUploadAndDownload'
import UploadImage from '@/components/upload/image.vue'
import UploadCommon from '@/components/upload/common.vue'
const imageUrl = ref('')
const imageCommon = ref('')
const emit = defineEmits(['enterImg'])
defineProps({
@@ -56,6 +75,7 @@ defineExpose({ open })
</script>
<style lang="scss">
.upload-btn-media-library{margin-left: 20px;}
.media{
display:flex;
flex-wrap:wrap;