Skip to content

Commit cecc136

Browse files
authored
Vue 3 upgrade fixes (#1075)
1 parent c96b396 commit cecc136

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

resources/js/package.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import './callbacks'
2323
import './vue-components'
2424
import './instantsearch'
2525
import { fetchCount } from './stores/useFetches.js'
26-
import { computed, createApp } from 'vue'
26+
import { computed, createApp, watch } from 'vue'
2727
;(() => import('./turbolinks'))()
2828

2929
if (import.meta.env.VITE_DEBUG === 'true') {
@@ -134,11 +134,6 @@ function init() {
134134
}
135135
},
136136
},
137-
watch: {
138-
loadingCount: function (count) {
139-
app.config.globalProperties.loading = count > 0
140-
},
141-
},
142137
mounted() {
143138
setTimeout(() => {
144139
const event = new CustomEvent('vue:mounted', { detail: { vue: window.app } })
@@ -183,6 +178,10 @@ function init() {
183178
window.app.config.globalProperties.window = window
184179
window.app.config.globalProperties.config = window.config
185180

181+
watch(fetchCount, function (count) {
182+
app.config.globalProperties.loading = count > 0
183+
})
184+
186185
setTimeout(() => {
187186
booting = false
188187
const event = new CustomEvent('vue:loaded', { detail: { vue: window.app } })

resources/views/cart/sidebar.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<div class="border-t pt-3 mt-3 font-bold">
4343
<dt>@lang('Total')</dt>
4444
<dd v-if="showTax">@{{ window.price(cart.value.prices.grand_total.value) }}</dd>
45-
<dd v-else>@{{ window.price(cart.value.prices.grand_total.value - cart.value.taxTotal.value) }}</dd>
45+
<dd v-else>@{{ window.price(cart.value.prices.grand_total.value - cart.value.taxTotal) }}</dd>
4646
</div>
4747
</x-rapidez::summary>
4848

resources/views/layouts/partials/header/account.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div v-on-click-away="close">
44
<button data-testid="account-menu" class="flex my-1" v-on:click="toggle">
55
<x-heroicon-o-user class="size-6"/>
6-
@{{ $root.user.firstname }}
6+
@{{ user.value?.firstname }}
77
</button>
88
<div v-if="isOpen" class="absolute bg-white border shadow rounded mr-1 z-header-dropdown">
99
@if (App::providerIsLoaded('Rapidez\Account\AccountServiceProvider'))

0 commit comments

Comments
 (0)