blob: ca631502745a2deee23071371a5894c87c0ec2c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import pushEvents from './components/push_events.vue';
export function initPushEventsEditForm() {
const el = document.querySelector('.js-vue-push-events');
if (!el) return false;
const provide = {
isNewHook: parseBoolean(el.dataset.isNewHook),
pushEvents: parseBoolean(el.dataset.pushEvents),
strategy: el.dataset.strategy,
pushEventsBranchFilter: el.dataset.pushEventsBranchFilter,
};
return new Vue({
el,
provide,
render(createElement) {
return createElement(pushEvents);
},
});
}
|