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5DM,CAHM,C","sourcesContent":["import './VTimePickerTitle.sass'\n\n// Mixins\nimport PickerButton from '../../mixins/picker-button'\n\n// Utils\nimport { pad } from '../VDatePicker/util'\nimport mixins from '../../util/mixins'\n\nimport { SelectingTimes } from './VTimePicker'\nimport { PropValidator } from 'vue/types/options'\nimport { VNode } from 'vue'\n\nexport default mixins(\n PickerButton\n/* @vue/component */\n).extend({\n name: 'v-time-picker-title',\n\n props: {\n ampm: Boolean,\n disabled: Boolean,\n hour: Number,\n minute: Number,\n second: Number,\n period: {\n type: String,\n validator: period => period === 'am' || period === 'pm',\n } as PropValidator<'am' | 'pm'>,\n readonly: Boolean,\n useSeconds: Boolean,\n selecting: Number,\n },\n\n methods: {\n genTime () {\n let hour = this.hour\n if (this.ampm) {\n hour = hour ? ((hour - 1) % 12 + 1) : 12\n }\n\n const displayedHour = this.hour == null ? '--' : this.ampm ? String(hour) : pad(hour)\n const displayedMinute = this.minute == null ? '--' : pad(this.minute)\n const titleContent = [\n this.genPickerButton('selecting', SelectingTimes.Hour, displayedHour, this.disabled),\n this.$createElement('span', ':'),\n this.genPickerButton('selecting', SelectingTimes.Minute, displayedMinute, this.disabled),\n ]\n\n if (this.useSeconds) {\n const displayedSecond = this.second == null ? '--' : pad(this.second)\n titleContent.push(this.$createElement('span', ':'))\n titleContent.push(this.genPickerButton('selecting', SelectingTimes.Second, displayedSecond, this.disabled))\n }\n return this.$createElement('div', {\n class: 'v-time-picker-title__time',\n }, titleContent)\n },\n genAmPm () {\n return this.$createElement('div', {\n staticClass: 'v-time-picker-title__ampm',\n }, [\n this.genPickerButton('period', 'am', 'am', this.disabled || this.readonly),\n this.genPickerButton('period', 'pm', 'pm', this.disabled || this.readonly),\n ])\n },\n },\n\n render (h): VNode {\n const children = [this.genTime()]\n\n this.ampm && children.push(this.genAmPm())\n\n return h('div', {\n staticClass: 'v-time-picker-title',\n }, children)\n },\n})\n"],"sourceRoot":"","file":"VTimePickerTitle.js"} |