---
layout: templateLayout
---
```vue
<template>
    <Upload :max-size="maxSize" :image-size="imageSize" :accept="accpetType" :action="action">
    </Upload>
</template>
<script>
export default {
    data(){
        return {
            accpetType: ['jpg', 'png'],
            maxSize: 1024 * 1024,  
            imageSize: {
                width: 200,
                height: 100
            }
        }
    },
    methods: {
        action(valid, formData) {
            console.log(valid)
            console.log(formData)
        },
    }
}
</script>
```