Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mineadmin/MineAdmin-Vue
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Mar 26, 2024
2 parents 61eb123 + dda5e3b commit 67db99d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/components/ma-upload/components/chunk-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
import { ref, inject, watch } from 'vue'
import commonApi from '@/api/common'
import tool from '@/utils/tool'
import { isArray } from 'lodash'
import { isArray, throttle } from 'lodash'
import { getFileUrl } from '../js/utils'
import { Message } from '@arco-design/web-vue'
import file2md5 from 'file2md5'
Expand Down Expand Up @@ -217,7 +217,7 @@ const removeFile = (idx) => {
emit('update:modelValue', files)
}
const init = async() => {
const init = throttle(async() => {
if(config.multiple) {
if(isArray(props.modelValue) && props.modelValue.length > 0) {
const result = await props.modelValue.map(async item => {
Expand Down Expand Up @@ -259,7 +259,7 @@ const init = async() => {
} else {
removeSignFile()
}
}
}, 1000);
watch(() => props.modelValue, (val) => {
init()
Expand Down
6 changes: 3 additions & 3 deletions src/components/ma-upload/components/file-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<script setup>
import { ref, inject, watch } from 'vue'
import tool from '@/utils/tool'
import { isArray } from 'lodash'
import { isArray, throttle } from 'lodash'
import { getFileUrl, uploadRequest } from '../js/utils'
import { Message } from '@arco-design/web-vue'
Expand Down Expand Up @@ -148,7 +148,7 @@ const removeFile = (idx) => {
emit('update:modelValue', files)
}
const init = async() => {
const init = throttle(async() => {
if(config.multiple) {
if(isArray(props.modelValue) && props.modelValue.length > 0) {
const result = await props.modelValue.map(async item => {
Expand Down Expand Up @@ -186,7 +186,7 @@ const init = async() => {
} else {
removeSignFile()
}
}
}, 1000);
watch(() => props.modelValue, (val) => {
init()
Expand Down
6 changes: 3 additions & 3 deletions src/components/ma-upload/components/image-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<script setup>
import { ref, inject, watch } from 'vue'
import tool from '@/utils/tool'
import { isArray } from 'lodash'
import { isArray, throttle } from 'lodash'
import { getFileUrl, uploadRequest } from '../js/utils'
import { Message } from '@arco-design/web-vue'
Expand Down Expand Up @@ -141,7 +141,7 @@ const removeImage = (idx) => {
emit('update:modelValue', files)
}
const init = async() => {
const init = throttle(async() => {
if(config.multiple) {
if(isArray(props.modelValue) && props.modelValue.length > 0) {
const result = await props.modelValue.map(async(item) => {
Expand Down Expand Up @@ -174,7 +174,7 @@ const init = async() => {
} else {
removeSignImage()
}
}
}, 1000);
watch(() => props.modelValue, (val) => {
init()
Expand Down

0 comments on commit 67db99d

Please sign in to comment.