fix: on gere le chargement de vuejs dans un contexte spip ajax
This commit is contained in:
parent
31f596c435
commit
2137409c68
3 changed files with 32 additions and 25 deletions
File diff suppressed because one or more lines are too long
2
dist/manifest.json
vendored
2
dist/manifest.json
vendored
|
@ -3,7 +3,7 @@
|
||||||
"file": "assets/vendor-f73869ed.js"
|
"file": "assets/vendor-f73869ed.js"
|
||||||
},
|
},
|
||||||
"gamutable.js": {
|
"gamutable.js": {
|
||||||
"file": "assets/gamutable-371e82bf.js",
|
"file": "assets/gamutable-c8105312.js",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_vendor-f73869ed.js"
|
"_vendor-f73869ed.js"
|
||||||
],
|
],
|
||||||
|
|
|
@ -12,8 +12,12 @@ const components = {
|
||||||
GamuTable,
|
GamuTable,
|
||||||
};
|
};
|
||||||
|
|
||||||
let i = 1;
|
gamutable();
|
||||||
for (const el of document.getElementsByClassName('vue-gamutable')) {
|
onAjaxLoad(gamutable);
|
||||||
|
|
||||||
|
function gamutable() {
|
||||||
|
let i = 1;
|
||||||
|
for (const el of document.getElementsByClassName('vue-gamutable')) {
|
||||||
if (i === 1) {
|
if (i === 1) {
|
||||||
window.app = createApp({
|
window.app = createApp({
|
||||||
components,
|
components,
|
||||||
|
@ -36,8 +40,11 @@ for (const el of document.getElementsByClassName('vue-gamutable')) {
|
||||||
app_deux.mount(el);
|
app_deux.mount(el);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#vueGamutable').on('click', '.url_action, .url_action--ss_css', function (e) {
|
$('#vueGamutable').on('click', '.url_action, .url_action--ss_css', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
Loading…
Add table
Reference in a new issue