export default {
    methods:{
        getStyleTreeList(){
            function filterArray(data){
                for (let i = 0; i < data.length; i++) {
                    let item = data[i];
                    if(item.children.length === 0){
                        delete item.children;
                    }else{
                        filterArray(item.children)
                    }
                }
                return data
            }
            this.$http("orderTicket.styleTreeList").then(res =>{
                let {
                    code, data
                } = res;
                if(code === 200){
                    this.brandSelectList = filterArray(data);
                }
            })
        },
    }
}
