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ACD,KAAK,aADJ,EAED,KAAK,UAAL,EAFC,CAJK,CAAR;AAQD;;AA3CsC,CAA1B,CAAf","sourcesContent":["import './VResponsive.sass'\n\n// Mixins\nimport Measurable, { NumberOrNumberString } from '../../mixins/measurable'\n\n// Types\nimport { VNode } from 'vue'\n\n// Utils\nimport mixins from '../../util/mixins'\n\n/* @vue/component */\nexport default mixins(Measurable).extend({\n name: 'v-responsive',\n\n props: {\n aspectRatio: [String, Number] as NumberOrNumberString,\n },\n\n computed: {\n computedAspectRatio (): number {\n return Number(this.aspectRatio)\n },\n aspectStyle (): object | undefined {\n return this.computedAspectRatio\n ? { paddingBottom: (1 / this.computedAspectRatio) * 100 + '%' }\n : undefined\n },\n __cachedSizer (): VNode | [] {\n if (!this.aspectStyle) return []\n\n return this.$createElement('div', {\n style: this.aspectStyle,\n staticClass: 'v-responsive__sizer',\n })\n },\n },\n\n methods: {\n genContent (): VNode {\n return this.$createElement('div', {\n staticClass: 'v-responsive__content',\n }, this.$slots.default)\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-responsive',\n style: this.measurableStyles,\n on: this.$listeners,\n }, [\n this.__cachedSizer,\n this.genContent(),\n ])\n },\n})\n"],"sourceRoot":"","file":"VResponsive.js"}
|