标签:执行 属性 name nbsp ons user div ips const
<input v-if="ipshow" type="file" accept="image/*" name="file1" capture="camera" @change="upload"> <input v-else type="file" accept="image/*" name="file1" @change="upload">
data() { return{ ipshow:false,//切换input属性 } },
//判断是否ios,是则不执行,否则安卓执行 if (‘andriod‘ == this.appSource()) { this.ipshow = true; }else{ this.ipshow = false; }
//判断ios和安卓 appSource() { const u = navigator.userAgent; const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); if (isiOS) { return "ios"; } else { return "andriod"; } },
标签:执行 属性 name nbsp ons user div ips const
原文地址:https://www.cnblogs.com/edczjw-Edison/p/12373507.html