jeecgBootUniapp/src/components/Mupload/Mupload.vue

46 lines
942 B
Vue
Raw Normal View History

2025-05-26 07:00:08 +00:00
<template>
<view>
<wd-upload accept="all" multiple :file-list="fileList" :action="action" @change="handleChange"
:multiple="multiple"></wd-upload>
</view>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue'
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
import { http } from '@/utils/http'
import {
getEnvBaseUrl
} from '@/utils/index'
defineOptions({ //文件上传组件 by 闵
name: 'Mupload',
options: {
styleIsolation: 'shared'
}
})
const props = defineProps({
modelValue: {
type: String,
default: '',
},
multiple: { //是否多选
type: String,
default: false
},
path: { //自定义path
type: String,
default: ''
}
})
const emit = defineEmits(['change', 'update:modelValue'])
const fileList = ref([])
const action = ref('')
const handleChange = (val)=>{ //文件发生变化
}
</script>
<style lang="scss" scoped></style>