mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
105 worflow
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { createApp } from 'vue';
|
||||
import OpenWopiLink from 'ChillMainAssets/vuejs/_components/OpenWopiLink';
|
||||
import {_createI18n} from "ChillMainAssets/vuejs/_js/i18n";
|
||||
|
||||
const i18n = _createI18n({});
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function (e) {
|
||||
document.querySelectorAll('span[data-module="wopi-link"]')
|
||||
.forEach(function (el) {
|
||||
createApp({
|
||||
template: '<open-wopi-link :wopiUrl="wopiUrl" :title="title" :type="type" :button="button"></open-wopi-link>',
|
||||
components: {
|
||||
OpenWopiLink
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
wopiUrl: el.dataset.wopiUrl,
|
||||
title: el.dataset.docTitle,
|
||||
type: el.dataset.docType,
|
||||
button: el.dataset.button ? JSON.parse(el.dataset.button) : {}
|
||||
}
|
||||
}
|
||||
})
|
||||
.use(i18n)
|
||||
.mount(el)
|
||||
;
|
||||
})
|
||||
;
|
||||
});
|
Reference in New Issue
Block a user