<template>
<div>
<glp-upload v-model="value" action="http://localhost:3000/nas/upload" :resp="resp" multiple></glp-upload>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { FileResp } from '@@/components/upload/GlpUpload.vue'

/**
 * @title  基本
 * @desc 最基本的用法。
 */
@Component
export default class BasicExample extends Vue {
  value: FileResp[] = [
    {
      name: '1.jpg',
      url: 'http://localhost:3000/nas/download/1.jpg'
    },
    {
      name: 'oss.jpg',
      url: 'http://glp-common.oss-cn-shanghai.aliyuncs.com/tmp/0518d981-b53b-4dc3-8f0a-70f40f4e441c.jpg'
    },
    {
      name: 'oss.pdf',
      url: 'http://glp-common.oss-cn-shanghai.aliyuncs.com/tmp/142b7584-9fad-42de-b278-107873065b1e.pdf'
    },
    {
      name: 'oss.docx',
      url: 'http://glp-common.oss-cn-shanghai.aliyuncs.com/tmp/75b9063a-9952-4429-9d00-2ecff2724a55.docx'
    }
  ]

  resp = (response: any) => response.data
}
</script>
