@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>

示例

Readme

Keywords

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