Skip to content

Commit

Permalink
删除selectImage.vue中chooseImg下多余的console.log(url)
Browse files Browse the repository at this point in the history
增加emit('getChooseImgUrl', url)返回给父组件获取选中的图片url
  • Loading branch information
xue-ding-e committed May 24, 2024
1 parent 92b9c4d commit 08f8e85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/components/selectImage/selectImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
<script setup>
import { getUrl, isVideoExt } from '@/utils/image'
import { onMounted, ref } from 'vue'
import { onMounted, ref , defineEmits } from 'vue'
import { getFileList, editFileName } from '@/api/fileUploadAndDownload'
import UploadImage from '@/components/upload/image.vue'
import UploadCommon from '@/components/upload/common.vue'
import WarningBar from '@/components/warningBar/warningBar.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Picture as IconPicture } from '@element-plus/icons-vue'
import selectComponent from '@/components/selectImage/selectComponent.vue'
const emit = defineEmits(['getChooseImgUrl']);
const imageUrl = ref('')
const imageCommon = ref('')
Expand Down Expand Up @@ -216,7 +216,6 @@ const listObj = {
}
const chooseImg = (url) => {
console.log(url)
if (props.fileType) {
const typeSuccess = listObj[props.fileType].some(item => {
if (url.includes(item)) {
Expand All @@ -238,6 +237,7 @@ const chooseImg = (url) => {
model.value = url
}
drawer.value = false
emit('getChooseImgUrl', url)
}
const openChooseImg = async() => {
if (model.value && !props.multiple) {
Expand Down

0 comments on commit 08f8e85

Please sign in to comment.