---
layout: templateLayout
---
```vue
<template>
    <Upload url="/upload" param="file" :accept="accpetType" @on-success="success" @on-fail="fail">
    </Upload>
    <Upload url="/upload" param="file" :accept="accpetType" @on-success="success" @on-fail="fail">
        <Wb-button type="primary">点击上传</Wb-button>
    </Upload>
</template>
<script>
export default {
    data(){
        return {
            accpetType: ['jpg', 'png'],
        }
    },
    methods: {
        success(files, result, arg) {
            console.log(files)
            console.log(result)
        },
        fail(files, result) {
            console.log(files)
            console.log(result)
        }
    }
}
</script>
```