@halobear/vue-upload

1.1.4 • Public • Published

@halobear/vue-upload

vue 上传组件封装

安装

yarn add @halobear/vue-upload

使用

<template>
  <div>
    <upload
      v-model="value"
      :fetchToken="testToken"
      :params="params"
      :limit="5"
    />
    <p style="padding-top: 20px;">{{ value }}</p>
  </div>
</template>

<script>
  import Upload from "../index.vue";

  function testToken() {
    return "";
  }

  export default {
    components: {
      Upload
    },
    data() {
      return {
        value: [
          { url: "http://pic.kuan1.top/e12720a8cee945216bc5e516fcb36028.png" },
          { url: "http://pic.kuan1.top/0b5934b623f3c6f5377f221959d77982.gif" },
          { url: "http://pic.kuan1.top/38d54e7711a19ac1ca08f134934bdbf3.png" }
        ],
        params: {
          test: 1
        }
      };
    },
    methods: {
      testToken
    }
  };
</script>

示例

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.0-alpha.00next
1.1.40latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.0-alpha.00
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.50
1.0.20
1.0.2-alpha.10
1.0.10

Package Sidebar

Install

npm i @halobear/vue-upload

Weekly Downloads

0

Version

1.1.4

License

ISC

Unpacked Size

1.13 MB

Total Files

16

Last publish

Collaborators

  • wtwei
  • luzhongk
  • v_yan_v