Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x 3x 3x | // @ts-check import { indexOf } from "lodash"; import Vue from "vue"; const modes = [ "top-left", "top-right", "bottom-left", "bottom-right" ]; const component = /** @type {V.Constructor<any, any>} */(Vue).extend({ name: "BaseRibbon", props: { value: { type: String, default: "" }, position: { type: String, validator: function(value) { // The value must match one of these strings return indexOf(modes, value) !== -1; }, default: "top-right" } }, data() { return { positionClass: "b-ribbon-" + this.position }; } }); export default component; |