file input control upload local files and manage type classification
发布时间
阅读量:
阅读量
通过input file控件实现本地文件上传操作,其使用方式简便直观

以下为使用流程的简要说明
HTML:
<input ref="file" id="file" multiple webkitdirectory type="file" accept=".txt" style="display: none" @change="importFile"/>
<div class="col">
<SunInput :config="SunInput109"@click.native="versionCheckClick"></SunInput>
</div>
<Button @click="submitClick">提交</Button>
webkitdirectory: 只上传文件夹 不上传文件夹的可以去掉,
accept: 需要上传文件的类型 现在我需要的是txt类型(需要什么类型到代码块下面类型模板去找)
JS:
//打开本地弹框操作(比
全部评论 (0)
还没有任何评论哟~
