You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<template>
|
|
|
|
|
<div class="row grass-border" id="field">
|
|
|
|
|
<div :class="'crop-field '+(!field.data ? 'empty' : '')"
|
|
|
|
|
v-on:click="plant(field.id)"
|
|
|
|
|
v-for="field in fields"
|
|
|
|
|
v-bind:key="field.id">
|
|
|
|
|
{{ field.id }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "CropField",
|
|
|
|
|
computed: {
|
|
|
|
|
fields() {
|
|
|
|
|
return this.$store.state.cropField;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
plant(id) {
|
|
|
|
|
id;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
#field {
|
|
|
|
|
margin: 1em 0.5em 6em 0.5em;
|
|
|
|
|
padding-bottom: 0;
|
|
|
|
|
background-color: #5A3C28;
|
|
|
|
|
align-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.crop-field {
|
|
|
|
|
width: 3.7em;
|
|
|
|
|
height: 3.7em;
|
|
|
|
|
border-radius: 14px;
|
|
|
|
|
background-image: url('@/assets/field/tile057.png');
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
margin: 3px auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty:hover {
|
|
|
|
|
cursor: url('@/assets/items/plant.png')
|
|
|
|
|
}
|
|
|
|
|
</style>
|