| | |
| | | <view class="uni-flex" style="flex-wrap: wrap;"> |
| | | <view v-for="(image,index) in qsImage" :key="index" class="uni-uploader__input-box" |
| | | style="position: relative; border: 0;"> |
| | | <image :src="image.img" :data-src="image.img" |
| | | <image :data-src="image.img" :src="image.img" |
| | | @tap="previewImage(index)"></image> |
| | | <image src="/static/plus.png" class="image-remove" @click="removeImage(index,image.id)"></image> |
| | | <image class="image-remove" src="/static/plus.png" @click="removeImage(index,image.id)"></image> |
| | | </view> |
| | | <image class="uni-uploader__input-box" @tap="chooseImage" src="/static/plus.png"></image> |
| | | <image class="uni-uploader__input-box" src="/static/plus.png" @tap="chooseImage"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="primary" class="upImg" @click="save">上传图片</button> |
| | | <button class="upImg" type="primary" @click="save">上传图片</button> |
| | | </view> |
| | | </view> |
| | | <!-- #ifdef APP --> |
| | |
| | | |
| | | <script> |
| | | |
| | | import {pathToBase64, base64ToPath} from '../../../js_sdk/mmmm-image-tools/index' |
| | | import {pathToBase64} from '../../../js_sdk/mmmm-image-tools/index' |
| | | |
| | | var sourceTypeArray = [ |
| | | ['camera'], |
| | |
| | | cropResize: false, |
| | | qsImage: [], |
| | | fid: 0, |
| | | qsType : 5, |
| | | qsType: 5, |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | |
| | | }, |
| | | init() { |
| | | this.$post({ |
| | | url: "/Base/getLljAllImgByFid", |
| | | url: "/Base/getByOqcFid", |
| | | data: { |
| | | id: this.fid, |
| | | fid: this.fid, |
| | | qsType: this.qsType |
| | | } |
| | | }).then(res => { |
| | |
| | | max-height: calc(100vh - 240px); /* 屏幕高度减去上传按钮高度 */ |
| | | overflow-y: auto; /* 当内容超出高度时出现垂直滚动条 */ |
| | | } |
| | | .upImg{ |
| | | |
| | | background-color: #3498db; |
| | | color: white; |
| | | |
| | | |
| | | .upImg { |
| | | |
| | | background-color: #3498db; |
| | | color: white; |
| | | |
| | | } |
| | | </style> |