mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
avoid using obj as key
This commit is contained in:
parent
bb2b012ead
commit
c953fbf319
2 changed files with 10 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
|||
el-button.mr-1.bg-dark(type='text' round plain v-for='t in filters.tags' size='mini'
|
||||
:key='t' @click='removeTag(t)') {{t}}
|
||||
el-button.mr-1.bg-dark.text-warning(type='text' round plain v-for='p in selectedPlaces' size='mini'
|
||||
:key='p' @click='removePlace(p.id)') {{p.name}}
|
||||
:key='p.id' @click='removePlace(p.id)') {{p.name}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
client-only
|
||||
#picker.mx-auto
|
||||
v-date-picker.mb-2.mt-3(
|
||||
:mode='event.type === "multidate" ? "range" : "single"'
|
||||
:mode='datePickerMode'
|
||||
:attributes='attributes'
|
||||
v-model='date'
|
||||
:locale='$i18n.locale'
|
||||
|
@ -173,6 +173,14 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
...mapState(['tags', 'places', 'events', 'settings']),
|
||||
datePickerMode () {
|
||||
const modeMap = {
|
||||
multidate: 'range',
|
||||
normal: 'single',
|
||||
recurrent: 'multiple'
|
||||
}
|
||||
return modeMap[this.event.type]
|
||||
},
|
||||
whenPatterns () {
|
||||
const dates = this.date
|
||||
if (!dates || !dates.length) { return '' }
|
||||
|
|
Loading…
Reference in a new issue