소스 검색

身份证图片修改

pengyh 1 년 전
부모
커밋
03fddd98e3
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 2
      src/views/userManagement/distributorManagement/index.vue

+ 9 - 2
src/views/userManagement/distributorManagement/index.vue

@@ -187,13 +187,20 @@ export default {
       }, {
         md: 12,
         isShow: true,
-        name: 'el-image',
-        attributes: { src: this.formData.idCardImg },
+        name: 'slot-component',
+        attributes: {},
         formItemAttributes: {
           label: '身份证',
           prop: 'idCardImg',
           rules: []
         },
+        render: (h, { props, onInput }) => {
+          var { value } = props
+          console.log(this.formData.idCardImg)
+          return (
+            this.formData.idCardImg ? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="cover"></el-image> : ''
+          )
+        }
       }, {
         md: 12,
         isShow: true,