Lane-dependant stats (fix #5)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
const props = defineProps<{
|
||||
builds: Builds
|
||||
}>()
|
||||
const builds = props.builds
|
||||
|
||||
const {data : items} : ItemResponse = await useFetch(CDRAGON_BASE + "plugins/rcp-be-lol-game-data/global/default/v1/items.json")
|
||||
const itemMap = reactive(new Map())
|
||||
@@ -10,9 +9,15 @@ for(let item of items.value) {
|
||||
itemMap.set(item.id, item)
|
||||
}
|
||||
|
||||
builds.tree.children.splice(1, builds.tree.children.length - 1)
|
||||
if(builds.tree.children[0] != null && builds.tree.children[0] != undefined)
|
||||
builds.tree.children[0].children.splice(1, builds.tree.children[0].children.length - 1)
|
||||
watch(() => props.builds, () => trimBuilds(props.builds))
|
||||
trimBuilds(props.builds)
|
||||
|
||||
function trimBuilds(builds : Builds) {
|
||||
builds.tree.children.splice(1, builds.tree.children.length - 1)
|
||||
if(builds.tree.children[0] != null && builds.tree.children[0] != undefined)
|
||||
builds.tree.children[0].children.splice(1, builds.tree.children[0].children.length - 1)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user