let tools = {
    changeMap(arr: any, k: any, name: any) {
        let data = arr.map((items: any) => {
            if (items[name] && items[name].length) {
                items[name].map((children: any) => {
                    if (Array.isArray(children)) {
                        return children.map(res => {
                            res.Y = res.Y * k
                            return res
                        })
                    } else {
                        children.Y = children.Y * k
                        return children
                    }
                })
            }
        })
        return data
    }
}
export default tools
