1. vue-ajax-upload
A Vue component to vue upload
vue-ajax-upload
Package: vue-ajax-upload
Created by: adouwt
Last modified: Mon, 23 May 2022 11:48:51 GMT
Version: 0.1.7
License: MIT
Downloads: 13
Repository: https://github.com/adouwt/vue-upload

Install

npm install vue-ajax-upload
yarn add vue-ajax-upload

vue-ajax-upload

A Vue.js project

Build Setup

 # install 
 npm install vue-ajax-upload --save

# 使用组件必须传递的参数 options
options: {
    'showProgress': true, // 是否显示进度控制
    'imagePreview': true, // 是否显示图片预览
    'url': 'str', // 上传接口url
    'fileUploadName': 'ajax-upload', // 后台采用是什么名字就传递什么名字
    'limitSize': 1 // 限制文件上传的大小
}
# dom 组件使用
<hupload :options=options v-on:receiveUploadMsg="receiveUploadMsg"> </hupload>

#js 接受的信息判断
methods: {
    receiveUploadMsg (msg) {
      // msg ....
    }
}

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code