import Vue, { CreateElement, VNode } from 'vue'; import { Component, Emit, Inject, Model, Prop, Provide, Watch, } from 'vue-property-decorator'; import { ClassName, Theme, ThemeComponent, LinkLikeComponent } from '../../base'; /** * Component: List */ @Component export class VdList extends Vue implements ThemeComponent { @Prop({ type: String }) public readonly theme?: Theme; public get themeValue(): Theme { return this.theme || this.$vd_theme.theme; } @Prop({ type: [Boolean, Number], default: false }) public readonly raise!: boolean | number; @Prop({ type: Boolean, default: false }) public readonly gap!: boolean; @Prop({ type: Boolean, default: false }) public readonly divided!: boolean; public get classes(): ClassName { return [ `vdp-theme_${this.themeValue}`, { 'is-raise': this.raise && typeof this.raise === 'boolean', [`vdp-raise_${this.raise}`]: this.raise && typeof this.raise === 'number', 'is-gap': this.gap, 'is-divided': this.divided, }, ]; } private render(h: CreateElement): VNode { return (