Skip to content

Commit

Permalink
feat(presets): support hide presets
Browse files Browse the repository at this point in the history
  • Loading branch information
ly525 committed Feb 28, 2019
1 parent e1ac7e7 commit ee4d5c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/Picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
v-show="pickerVisible"
>
<calendar-ranges
v-if="showPresets && presets"
:canSelect="inRange"
:presets="presets"
@clickCancel="pickerVisible = false"
Expand Down Expand Up @@ -134,6 +135,10 @@ export default {
type: Boolean,
default: true,
},
showPresets: {
type: Boolean,
default: true,
},
},
data () {
const data = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Ranges.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="ranges">
<ul v-if="presets">
<ul>
<li
v-for="(item, index) in presets_"
:key="index"
Expand Down

0 comments on commit ee4d5c8

Please sign in to comment.