mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 16:19:44 +08:00
优化图片
This commit is contained in:
parent
1002f04a76
commit
18c0e3d468
@ -4,9 +4,9 @@
|
||||
<span v-on:click="this._removeImage(image)" class="fa fa-remove float-right"
|
||||
style="position: relative; right: 20px; color: #d9534f"></span>
|
||||
</div>
|
||||
<div class="uploadButton" v-on:click="this._uploadPhoto()">
|
||||
<div class="uploadButton" v-on:click="this._uploadPhoto()" v-if= "this.uploadImageInfo.photos < this.uploadImageInfo.imageCount">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
</div>
|
||||
<input type="file" class="file" accept="image/*" id="uploadImage" hidden
|
||||
<input type="file" class="file" accept="image/*" id="uploadImage" v-if= "this.uploadImageInfo.photos < this.uploadImageInfo.imageCount" hidden
|
||||
v-on:change="this._choosePhoto($event)">
|
||||
</div>
|
||||
@ -5,11 +5,13 @@
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
callBackFunction: vc.propTypes.string, //父组件监听方法
|
||||
imageCount: vc.propTypes.string = '99' // -1 不限制
|
||||
},
|
||||
data: {
|
||||
uploadImageInfo: {
|
||||
photos: [],
|
||||
imageCount: 99
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -21,6 +23,10 @@
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
let _imageCount = $props.imageCount;
|
||||
if (_imageCount != 99) {
|
||||
this.uploadImageInfo.imageCount = _imageCount;
|
||||
}
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
<vc:create path="frame/uploadImage"
|
||||
callBackListener="addActivitiesView"
|
||||
callBackFunction="notifyUploadImage"
|
||||
imageCount="1"
|
||||
namespace="addActivitiesView"
|
||||
></vc:create>
|
||||
</div>
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
<vc:create path="frame/uploadImage"
|
||||
callBackListener="editActivitiesView"
|
||||
callBackFunction="notifyUploadImage"
|
||||
imageCount="1"
|
||||
namespace="editActivitiesView"
|
||||
></vc:create>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user