<script>
import { Tree } from 'element-ui'

export default {
    name: 'WsTree',
    extends: Tree,
    props: {
        size: {
            default: 'small',
            type: String
        }
    },
    mounted(){
        if(this.size){
            this.$el.classList.add(`el-tree-${this.size || 'small'}`);
        }
    }
}
</script>

<style lang="scss" scoped>
@import "../../WsTheme/var.scss";

.el-tree-large{
    /deep/ .el-tree-node__label{
        font-size: $font-size-large;
    }
}
.el-tree-medium{
    /deep/ .el-tree-node__label{
        font-size: $font-size-medium;
    }
}
.el-tree-base{
    /deep/ .el-tree-node__label{
        font-size: $font-size-base;
    }
}
.el-tree-small{
    /deep/ .el-tree-node__label{
        font-size: $font-size-small;
    }
}

</style>