Vue.component('side-menu', { template: '' + '' + '' + '' + 'Description' + '' + '' + 'Additional Information' + '' + '' + 'Rationale' + '' + '' + 'FAQs' + '' + '' + '', props: { measure: '', color: String, current: '', include: { type: Object, default: function () { return { rationale: true, faqs: true }; } } }, methods: { _getLink: function (section) { if (section == 'description') { return '#' + this.measure; } else { return '#' + this.measure + '-' + section; } }, _getStyle: function(section) { if (this.current == (this.measure + '-' + section)) { return { 'color': 'white', } } else { return { 'text-decoration': 'none' } } } }, computed: { getLink: function () { return { description: this._getLink('description'), add_info: this._getLink('add-info'), rationale: this._getLink('rationale'), faqs: this._getLink('faqs') }; }, getStyle: function () { return { description: this._getStyle('description'), add_info: this._getStyle('add-info'), rationale: this._getStyle('rationale'), faqs: this._getStyle('faqs') }; } } });