Line data Source code
1 : // @ts-check 2 : 3 : import Vue from "vue"; 4 : import BadgeButton from "../BadgeButton.vue"; 5 : import RelationMixin from "./RelationMixin"; 6 : import { getAttribute } from "../../utils/element"; 7 : 8 : export default /** @type {V.Constructor<any, any>} */ (Vue).extend({ 9 : name: "Relation", 10 : components: { BadgeButton }, 11 : mixins: [ RelationMixin ], 12 : computed: { 13 : badges() { 14 17 : return { 15 : selector: getAttribute(this.relation, "query-selector"), 16 : target: getAttribute(this.relation, "attribute-name") 17 : }; 18 : } 19 : } 20 : });