o-s-upload

1.0.2 • Public • Published

Install

npm install --save o-s-upload

Useage

use in the vue component

<template>
        <div>
            <o-s-upload
            :ossDir="ossDir"
            :getSgin="getSgin"
            :dom="logo"
            ref="logo"
            ></z-o-upload>
        </div>
    </template>

    <script>
        import OSUpload from 'o-s-upload'
        export default {
            name: 'Test',
            data () {
                return {
                    ossDir: 'myDir',
                    getSgin: 'http://xxx.xxx.com/get_sgin',
                    logo: 'logo',
                    logoSrc: ''
                }
            },
            methods: {
                getUrl () {
                    this.logoSrc = this.$refs.logo.imgUrl
                },
                setUrl () {
                    this.$refs.logo.imgUrl = 'https://www.baidu.com/img/baidu_jgylogo3.gif'
                }
            }
        }
    </script>
    
    <style></style>

Component props

propos type default value explain
dom String '' required field
ossDir String '' required field
getSgin String '' required field
addIcon String 'upload.png'
loadding String 'loadding.gif'
boxStyle Object {}
height Number 0 image height(px, no limit)
width Number 0 image width(px, no limit)
customName String '' System naming
ratio Number 0.75 Compression ratio

License

copyright © 2019 zhaizhaohui

Readme

Keywords

Package Sidebar

Install

npm i o-s-upload

Weekly Downloads

4

Version

1.0.2

License

ISC

Unpacked Size

90.9 kB

Total Files

5

Last publish

Collaborators

  • yinuo2012