Commit 3878599c authored by chenqikuai's avatar chenqikuai

fix:修复图片上传时自动打开摄像头的bug、修复头像上传处未对文件类型做出限制的bug

parent ffe999f8
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
id="thumb" id="thumb"
style="display:none" style="display:none"
@change="handleFileChange" @change="handleFileChange"
accept=".png,.jpg,.jpeg,.gif" accept="image/png,image/jpg,image/jpeg,image/gif"
/> />
<label <label
for="thumb" for="thumb"
......
<template> <template>
<div class="account-num"> <div class="account-num">
<input type="file" name="img" @change="change" id="input" style="display:none;"> <input type="file" name="img" @change="change" id="input" style="display:none;" accept="image/png,image/jpg,image/jpeg,image/gif">
<h5-cropper :option="option" hide-input @getFile="getFile" ref="cropper"></h5-cropper> <h5-cropper :option="option" hide-input @getFile="getFile" ref="cropper"></h5-cropper>
<label class="item" for="input"> <label class="item" for="input">
<div class="title">头像</div> <div class="title">头像</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment