From 79745a1b12fa6d69edd3a353cb11b8ae02b8d4aa Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 26 八月 2024 17:16:53 +0800
Subject: [PATCH] 投递与确认
---
src/components/tem/tem-upload.vue | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/components/tem/tem-upload.vue b/src/components/tem/tem-upload.vue
index 8c228d0..d93d108 100644
--- a/src/components/tem/tem-upload.vue
+++ b/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) => {
--
Gitblit v1.9.1