zhaoxiaoqiang
2022-08-05 441b33dabe3cc9079634783c7f48cc5314ad65ba
src/components/upload/uploadIdCard.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2019-08-30 18:04:49
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 15:35:58
 * @LastEditTime: 2022-08-05 14:09:34
 * @Description:
 -->
<template>
@@ -23,7 +23,7 @@
      <input
        style="display: none;cursor:pointer"
        type="file"
        id='androidInputFileImage'
        id='inputFileImage'
        ref="androidInputFileImage"
        @change="handlePhotoChange($event,1)"
        accept="image/jpg, image/jpeg, image/png"
@@ -31,7 +31,7 @@
      <input
        style="display: none;cursor:pointer;"
        type="file"
        id='androidInputFileCapture'
        id='inputFileCapture'
        ref="androidInputFileCapture"
        @change="handlePhotoChange($event,2)"
        accept="image/*"
@@ -313,11 +313,11 @@
    },
    // 选择拍照或者相册选项
    handleMenuSelect(item, index) {
      console.log(this.$refs,index)
      console.log( this.$refs.androidInputFileCapture )
      if (index === 0) {
        this.$refs.androidInputFileCapture.$el.click();
        this.$refs.androidInputFileCapture.click();
      } else {
        this.$refs.androidInputFileImage.$el.click();
        this.$refs.androidInputFileImage.click();
      }
      this.selectModel = false;
    },