<template>
    <el-upload
        :id="id"
        :limit="3"
        v-bind="$attrs"
        v-on="$listeners"
        action="default">
        <el-button size="small" type="primary" class="__button">点击上传</el-button>
    </el-upload>
</template>
<script>
import mixin from "../../comp/form/su-upload/types/mixin"
export default {
    name:"silentUpload",
    mixins:[mixin],
    data() {
        return {
        };
    },
    methods: {
        toClick(){
            let vm_ = this;
            let timer = setInterval(function () {
                if (!vm_.$el.getElementsByClassName) return;
                let ele = vm_.$el.getElementsByClassName("__button");
                if (!ele.length) return;
                clearInterval(timer);
                ele[0].click();
            }, 200)
        }
    }
}
</script>
