debian-mirror-gitlab/app/assets/javascripts/related_merge_requests/index.js

25 lines
762 B
JavaScript
Raw Normal View History

2019-07-07 11:18:12 +05:30
import Vue from 'vue';
import RelatedMergeRequests from './components/related_merge_requests.vue';
import createStore from './store';
export default function initRelatedMergeRequests() {
const relatedMergeRequestsElement = document.querySelector('#js-related-merge-requests');
if (relatedMergeRequestsElement) {
const { endpoint, projectPath, projectNamespace } = relatedMergeRequestsElement.dataset;
// eslint-disable-next-line no-new
new Vue({
el: relatedMergeRequestsElement,
components: {
RelatedMergeRequests,
},
store: createStore(),
2021-03-08 18:12:59 +05:30
render: (createElement) =>
2019-07-07 11:18:12 +05:30
createElement('related-merge-requests', {
props: { endpoint, projectNamespace, projectPath },
}),
});
}
}