zhangwei
2024-08-20 ef1114c22614762e54e49bc7c600d2a2cd460791
src/components/tem/tem-upload.vue
@@ -1,6 +1,6 @@
<template>
   <view>
      <up-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="6" :maxCount="1" width="150"
      <up-upload :fileList="fileList" useBeforeRead @beforeRead="afterRead" @delete="deletePic" name="6" :maxCount="1" width="150"
         height="50">
         <image :src="src" mode="widthFix" style="width: 150px;height: 50px;"></image>
      </up-upload>
@@ -11,7 +11,8 @@
   import {
      ref,
      reactive,
      defineProps
      defineProps,
      defineEmits
   } from 'vue';
   const props = defineProps({
      src: {
@@ -19,15 +20,15 @@
         default: ''
      }
   });
   const emit = defineEmits(['up-after-read']);
   // let isShow = false
   const fileList = reactive([{
      url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
   }, ]);
   const fileList = reactive([]);
   const deletePic = (event) => {
      fileList.splice(event.index, 1);
   };
   const afterRead = () => {
   const afterRead = (event) => {
      console.log(event,'event');
      emit('up-after-read', event);
   };
   // 新增图片
   // const afterRead = async (event) => {