Vue 可以通过使用组件和指令来创建图片上传页面。
首先,需要在组件的 template 中添加一个文件选择器,例如:
<template>
<div>
<form>
<input type="file" ref="fileInput" @change="upload"/>
</form>
</div>
</template>
Vue 可以通过使用组件和指令来创建图片上传页面。
首先,需要在组件的 template 中添加一个文件选择器,例如:
<template>
<div>
<form>
<input type="file" ref="fileInput" @change="upload"/>
</form>
</div>
</template>