lisy
2023-08-07 aca52db249c7ddcd84e1d4125573a6bb3524670f
cloud-server-management/src/main/webapp/WEB-INF/view/system/tCoupon/TCouponAdd.html
@@ -227,8 +227,8 @@
                            <el-upload
                                    class="avatar-uploader"
                                    action="/tCouponManage/uploadPic"
                                    :show-file-list="false"
                                    :on-success="handleAvatarSuccess"
                                    accept=".jpg,.jpeg,.png,.JPG,.JPEG"
                                    :on-remove="handleRemove"
                                    :before-upload="beforeAvatarUpload">
                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
@@ -250,7 +250,7 @@
                                    class="avatar-uploader"
                                    action="/tCouponManage/uploadPic"
                                    list-type="picture-card"
                                    accept="."
                                    accept=".jpg,.jpeg,.png,.JPG,.JPEG"
                                    :on-success="handleAvatarSuccess"
                                    :on-remove="handleRemove">
                                <i class="el-icon-plus"></i>
@@ -369,10 +369,12 @@
        data: {
            autoUpload: true,//自动上传
            imageUrl: '',//模型数据,用于上传图片完成后图片预览
            dialogVisible: false
        },
        methods: {
            handleAvatarSuccess(res, file) {
                couponInfoDlg.goodsCover = URL.createObjectURL(file.raw);
                this.imageUrl = URL.createObjectURL(file.raw);
                couponInfoDlg.goodsCover = file.response;
            },
            beforeAvatarUpload(file) {
                const isLt2M = file.size / 1024 / 1024 < 10;
@@ -383,6 +385,7 @@
            },
            handleRemove(file, fileList) {
                couponInfoDlg.goodsCover = '';
                console.log(couponInfoDlg.goodsCover)
            },
        },
        created() {
@@ -391,13 +394,6 @@
    var vue2 = new Vue({
        el: '#app1',
        props: {
            // 数量限制
            limit: {
                type: Number,
                default: 2
            },
        },
        data: {
            autoUpload: true,//自动上传
            imageUrl1: '',//模型数据,用于上传图片完成后图片预览