diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-02-27 19:33:05 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2025-02-27 19:33:05 +0000 |
| commit | 56baad417748a52662c02f93a3916a1fb44f40e8 (patch) | |
| tree | 14677fe033114647a49bad259c0bf6c55b9b6523 /templates | |
| parent | 6a4f2423ce715f8c03334e113ea369ac3ee3b84a (diff) | |
adjust VueApp to support pinia as well and do not treat vuex as the primary store, fixes #5235
Closes #5235
Merge request studip/studip!3924
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/vue-app.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/vue-app.php b/templates/vue-app.php index 7f0841b..5977f71 100644 --- a/templates/vue-app.php +++ b/templates/vue-app.php @@ -4,12 +4,16 @@ * @var string $baseComponent * @var array $props * @var array $storeData + * @var array $vuexStoreData * @var array $slots */ ?> <? foreach ($storeData as $store => $data): ?> <script type="application/json" id="vue-store-data-<?= htmlReady($store) ?>"><?= json_encode($data) ?></script> <? endforeach; ?> +<? foreach ($vuexStoreData as $store => $data): ?> +<script type="application/json" id="vue-vuex-store-data-<?= htmlReady($store) ?>"><?= json_encode($data) ?></script> +<? endforeach; ?> <div <?= arrayToHtmlAttributes($attributes) ?>> <<?= strtokebabcase($baseComponent) ?> <?= arrayToHtmlAttributes($props) ?>> <? foreach ($slots as $slotname => $slot): ?> |
