【发布时间】:2016-10-28 03:23:21
【问题描述】:
我正在开发一个 Angular 2 应用程序。请参阅下面的部分模板 -
<label class="import-label" title="Select file">
<span class="grid-btn fa fa-folder">
<input type="file" class="form-control import-input-file" id="contactname" aria-describedby="contactname"
placeholder="File Name" name="filename" style="display:none;"
(change)="onChange($event)">
</span>
</label>
截图 -
当我单击文件夹图标按钮时,选择文件的对话框不会在 Chrome 中打开(它适用于 IE,如预期的那样)。但是,它可以在 Chrome 中双击。
注意:
input tag 有 display:none。
【问题讨论】: