wente
2024-05-08 90d84d6e1bb895c144b6865d7df40e4739c1b535
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -14,16 +14,12 @@
      <zt-form-item label="检索关键字" prop="contentType">
        <el-input v-model="dataForm.contentType"></el-input>
      </zt-form-item>
      <div class="el-flex img-src" style="height: 20px">
        <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
          <!--<config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm"
                           v-model="dataForm.files"/>-->
        <zt-form-item>
          <el-upload :limit="1" :http-request="httpRequest" :before-upload="beforeUpload" :on-exceed="handleExceed">
            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
          </el-upload>
          <el-image v-if="dataForm.id" :src="url+dataForm.id" style="height: 50px;width: 50px"></el-image>
        </el-form-item>
      </div>
        </zt-form-item>
    </el-form>
  </zt-dialog>
</template>
@@ -62,6 +58,10 @@
        //大于5M,不允许上传
        if (fileSize > FIVE_M) {
          this.$message.error("最大上传5M")
          return false
        }
        if (fileSize = 0) {
          this.$message.error("未上传图片")
          return false
        }
      },
@@ -117,4 +117,7 @@
    margin-top: 10px !important;
    margin-bottom: 0 !important;
  }
  /*.zt .el-dialog .el-dialog__body .el-form {
    min-height: 310px !important;
  }*/
</style>