PG
Size: a a a
PG
А
А
MK
PG
/test
на /test/test?asds=asd
в родительском компоненте отрабатывает asyncData.
/test/test
это nuxt-child
PG
⚜
V💊
⚜
mounted() {
if (
process.browser) {
const payload = {
st: this.$vuetify.breakpoint.smAndDown ? '
test1’ : '
test2’,
cp: this.$vuetify.breakpoint.smAndDown
? '
test 1’
: '
test 2’,
sv: this.$vuetify.breakpoint.smAndDown ? '
test1’ : '
test 2’,
sc: 'yes'
}
scriptMethod(payload, 1)
}
}
YS
⚜
head() {
let head = {
script: [
{
src: 'https://script.
com/
script.js'
}
]
}V💊
head() {
let head = {
script: [
{
src: 'https://script.
com/
script.js'
}
]
}⚜
YS
⚜
YS
YS
<template>
<div>
<SomeComponentDependingOnStripe v-if="isStripeLoaded"/>
</div>
</template>
<script>
// /pages/payment-page.vue
export default {
data () {
return {
isStripeLoaded: false
}
},
head () {
return {
title: 'Payment Page - My awesome project',
script: [
{
hid: 'stripe',
src: '<https://js.stripe.com/v3/>',
defer: true,
// Changed after script load
callback: () => { this.isStripeLoaded = true }
}
]
}
}
}
</script>
⚜
S
V💊