mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Update to new data format.
This commit is contained in:
parent
ae431d31c2
commit
73c4106f51
@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<span class="tags">
|
||||
<season-tag v-for="season in seasons" :key="SeasonOrder(season)" :season="season"/>
|
||||
<span class='tags'>
|
||||
<season-tag v-for='season in seasons' :key='season.order' :season='season'/>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SeasonTag from './SeasonTag'
|
||||
import SeasonData from '@/assets/game_data/seasons.json'
|
||||
|
||||
export default {
|
||||
components: {SeasonTag},
|
||||
@ -14,12 +13,31 @@ export default {
|
||||
props: {
|
||||
seasons: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
SeasonOrder: function (value) {
|
||||
return SeasonData[value].id
|
||||
required: true,
|
||||
default: function () {
|
||||
return [
|
||||
{
|
||||
id: 'spring',
|
||||
order: 0,
|
||||
name: 'Spring'
|
||||
},
|
||||
{
|
||||
id: 'summer',
|
||||
order: 1,
|
||||
name: 'Summer'
|
||||
},
|
||||
{
|
||||
id: 'fall',
|
||||
order: 2,
|
||||
name: 'Fall'
|
||||
},
|
||||
{
|
||||
id: 'winter',
|
||||
order: 3,
|
||||
name: 'Winter'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,22 @@
|
||||
<template>
|
||||
|
||||
<span class="tags">
|
||||
<skill-tag v-for="skill in skills" :key="skill.order" :skill="skill"/>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "skill-list"
|
||||
import SkillTag from './SkillTag'
|
||||
|
||||
export default {
|
||||
components: {SkillTag},
|
||||
name: 'skill-list',
|
||||
props: {
|
||||
skills: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user