爱意满满的作品展示区。
Terry05

v-uploader - 基于 Vue2 简洁易用,可批量、拖拽的文件上传插件

  •  
  •   Terry05 ·
    TerryZ · Sep 10, 2018 · 5855 views
    This topic created in 2893 days ago, the information mentioned may be changed or developed.

    v-uploader

    基于 Vue2 简洁易用,可批量、拖拽的文件上传插件


    Demo、文档

    请浏览


    插件预览

    单文件上传带图片预览模式 single

    批量上传,支持拖拽模式 multiple



    插件安装

    npm i v-uploader --save
    

    在项目入口文件 main.js 中引用插件

    import Vue from 'vue'
    import vUploader from 'v-uploader';
    
    /**
     * v-uploader plugin global config
     */
    const uploaderConfig = {
        uploadFileUrl: 'http://xxx/upload',
        deleteFileUrl: 'http://xxx/delete',
        showMessage: (vue, message) => {
            //using v-dialogs to show message
            vue.$vDialog.alert(message, null, {messageType: 'error'});
        }
    };
    
    //install plugin with options
    Vue.use(vUploader, uploaderConfig);
    
    6 replies    2018-09-11 00:40:39 +08:00
    a132811
        1
    a132811  
       Sep 10, 2018
    顶下。
    你这个 github pages 站点写的文档, 也是基于 vue,貌似 vue 的文档都是这个风格,
    莫非是有自动生成此文档静态站的工具?
    Terry05
        2
    Terry05  
    OP
       Sep 10, 2018
    @a132811 No,纯手写
    dixeran
        3
    dixeran  
       Sep 10, 2018 via Android
    @a132811 你想要的话有 VuePress
    helone
        4
    helone  
       Sep 10, 2018
    不错支持个,最好能实现下分片上传,见过很多 upload 组件都没实现这个功能
    Terry05
        5
    Terry05  
    OP
       Sep 11, 2018
    @helone 分片上传?
    hcwhan
        6
    hcwhan  
       Sep 11, 2018
    start
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5743 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 02:34 · PVG 10:34 · LAX 19:34 · JFK 22:34
    ♥ Do have faith in what you're doing.