<script>
import mixins from '../mixins';
import props from '../props';
import { createVNode } from 'vue';
export default {
    name:'file',
    mixins,
    props,
    render:function (vm,vNode,props) {

        let attrs = {
            accept: props.accept,
            type:'file',

        };
        // 是否支持多选
        if (props.multiple) {
            attrs.multiple = 'multiple';
        }

        // 是否支持拍照
		    if (props.capture) {
            attrs.capture = 'camera';
        }

        // 返回组件
        return createVNode('input',{
            ref:'input',
            style:{
              display:'none'
            },
            ...attrs,
            onChange: this.onChange
        });

    }
}
</script>

<style scoped lang="scss" src="../style.scss" ></style>
