Commit c953fbf3 authored by les's avatar les
Browse files

avoid using obj as key

parent bb2b012e
......@@ -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 '' }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment