Home > front end >  Why do I use the element UI photo wall will be caton phenomenon
Why do I use the element UI photo wall will be caton phenomenon

Time:10-29


Is every time I upload pictures in the middle will be blank and then in the past,
 & lt; Template> 


Shop management & lt;/span>







Action="http://127.0.0.1:5000/users/avatar_upload"
: show - file - list="false"
: on - success="handleAvatarSuccess"
: before - upload="beforeAvatarUpload"

V - if="storeForm imageUrl"
: the SRC="https://bbs.csdn.net/topics/
'http://127.0.0.1:5000/upload/imgs/acc_img/' +
StoreForm. ImageUrl
"

/>



Action="http://127.0.0.1:5000/shop/upload"
The list - type="picture - card"
: file - the list="storeForm. ImgUrl"
: on the preview="handlePictureCardPreview"
: on - remove="handleRemove"
: on - success="handleSuccess"















V - for="item in activeArr
": key="item"
: label="item"



Is - range
V - model="storeForm. Date"
Range - the separator="to"
Start - placeholder="start time"
End - placeholder="end time"
Placeholder="to choose time range"




Confirm to modify & lt;/el - the button







<script>
The import moment from 'moment'
Import a panel from the '../../components/panel. Vue '
The import {getStoreInfo, editStore} from '../../API/store. Js'

Export the default {
Components: {
The panel
},
Data () {
Return {
StoreForm: {
Name: '
Tips: "'
//store head
ImageUrl: "'
//store picture
ImgUrl: [],
Price: "'
Time: "'
Desc: "'
Rate: "'
SellCount: "'
Active: [],
Date: []
},
ActiveArr: [
'online payment with 28 subtract 5',
'VC infinite orange juice full 8 fold,
'single wonderful meal',
'special drink 8 fold for'
'single feature set'
],
DialogVisible: false,
DialogImageUrl: "'
BaseImg: 'http://127.0.0.1:5000/upload/shop/',
ShopAvatar: "'
}
},
Created () {
Enclosing getShop ()
},
Methods: {
Async getShop () {
Const {data}=await getStoreInfo ()

Const imgArr=[]
//request back pictures of list processing ChengXiang to array format
Data. The pics. ForEach (item=& gt; {
ImgArr. Push ({
Url: this. BaseImg + item,
Path: the item
})
})
Enclosing storeForm={
Id: data. Id,
Name: data. The name,
Tips: data bulletin,
//store head
ImageUrl: data. Avatar,
//store picture
ImgUrl: imgArr,
Price: data deliveryPrice,
Time: the data. The deliveryTime,
Desc: data description,
Rate: data) score,
SellCount: data sellCount,
Active: data supports,
Date: data. The date
}
},
HandleAvatarSuccess (res, file) {
Enclosing storeForm. ImageUrl=res. ImgUrl
This. ShopAvatar=res. ImgUrl
},
BeforeAvatarUpload (file) {
Const arr=[' image/jpeg ', 'image/JPG', 'image/PNG', 'image/webp]
//const isJPG=file. Type==='image/jpeg'
Const isJPG=arr. Includes (file type)
Const isLt2M=file. The size/1024/1024 & lt; 2

if (! nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related