blob: 9914ce05a95bc9c203f87a984e04ca278a6211e1 (
plain)
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
|
import Vue from 'vue';
import SortDropdown from './components/sort_dropdown.vue';
const mountDropdownApp = (el) => {
const { mode, projectBranchesFilteredPath, sortOptions } = el.dataset;
return new Vue({
el,
name: 'SortBranchesDropdownApp',
components: {
SortDropdown,
},
provide: {
mode,
projectBranchesFilteredPath,
sortOptions: JSON.parse(sortOptions),
},
render: (createElement) => createElement(SortDropdown),
});
};
export default () => {
const el = document.getElementById('js-branches-sort-dropdown');
return el ? mountDropdownApp(el) : null;
};
|