0

我想在 ViewModel 中覆盖显示图片的方式。

根据 DevelopmentView:图片为 foto2

<div ng-show="ViewModelRoot.VM_Status.vmEditAlumno_foto2_Visible">
  <table>
    <thead>

    </thead><tbody>
      <tr>
        <img ng-src="{{StreamingViewModelClient.GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), "foto2")}}" img-responsive class="vmImage" />
      </tr><tr>
        <input type="file" onchange="angular.element(this).scope().onFileSelect('vmEditAlumno.foto2', angular.element(this).scope().ViewModelRoot.Curr_vmEditAlumno().VMClassId)" id="vmEditAlumno.foto2" ng-show="ViewModelRoot.VM_Status.vmEditAlumno_foto2_Enabled" />
      </tr>
    </tbody>
  </table>
</div>

我在列中设置“内容覆盖”并创建一个值为“Foto2Alumno.cshtml”的 AngularUIOverride 标记。

不是它获取新文件“Foto2Alumno.cshtml”,就好像我在该文件中更改了它显示的内容,但是来自命令 GetVMImageUrl 的图片没有显示

我错过了什么?

谢谢

4

1 回答 1

1

双引号 (") 有问题。我将它们更改为单引号 ('),现在显示图像。

错误:GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), "foto2" )

右:GetVMImageUrl(ViewModelRoot.Curr_vmEditAlumno(), 'foto2' )

于 2018-11-01T15:27:44.707 回答