Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Commit

Permalink
再优化一下materials #909
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Sep 15, 2022
1 parent 9f2842e commit f9b7be1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/views/genshin-material.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
.then((res) => res.json())
.then((data) => {
const filteredData = {};
data.items
.filter((item) => materials.includes(item.name))
.forEach((item) => {
filteredData[item.name] = item.rarity;
});
materials.forEach((material) => {
filteredData[material] = data.items.find((el) => el.name === material).rarity;
});
app.provide("materialMap", filteredData).mount("#app");
});
</script>
Expand Down

0 comments on commit f9b7be1

Please sign in to comment.