JSPM

  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q58989F
  • License ISC

vue upload

Package Exports

  • vupload

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vupload) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

// vupload 组件 基于swiper 组件制作查看大图,可滑动查看全图 解决 前端图片压缩,图片颠倒问题, 图片压缩: { 宽高压缩: 以手机屏幕宽度为值,等比例压缩高度 质量宽度: canvas 压缩质量参数压缩 }

简化了使用配置,优化了删除功能,修复安卓下上传不了

优化了上传异步请求队列 增加了上传失败提示,超时 摈弃了对swiper的依赖 增加了 data 属性(string/Object) 例: 上传参数为file=图片&type='png'两个参数, 即data={file:'', type: 'png'}, 组件以对象中位空的参数为图片内容字段

// 引入上传组件 import { upload, uploadList, uploadFile } from 'vupload'

注:以上方式如果出现报错可换成 import upload from 'vupload/upload' import uploadList from 'vupload/component/uploadlist' import uploadFile from 'vupload/component/upload' 分别引入

export default { components: { upload, uploadList, uploadFile } }

参数大全 :

上传组件使用方法

#样式 从父组件定义组件内样式,

‘scoped’ 不需要加,否则会导致内部样式丢失,以防冲突,可以通过,顶层id包含下面的样式