From bb59f50840dfc8d6ab4a8aa21c8b7457194a9368 Mon Sep 17 00:00:00 2001 From: Oleksandr Bystrikov Date: Mon, 13 Jan 2025 02:07:27 +0100 Subject: [PATCH] refactor(examples): add important comment about vue 3.5 --- examples/CardElement.vue | 1 + examples/ExpressCheckoutElement.vue | 1 + examples/PaymentElementDeferred.vue | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/CardElement.vue b/examples/CardElement.vue index b9fbcdd..75119d1 100644 --- a/examples/CardElement.vue +++ b/examples/CardElement.vue @@ -51,6 +51,7 @@ const cardOptions = ref({ }) const stripeLoaded = ref(false) +// Vue 3.5 and newer, for older vue versions use ref() const elementsComponent = useTemplateRef("elementsComponent") const cardComponent = useTemplateRef("cardComponent") const stripe = ref(null) diff --git a/examples/ExpressCheckoutElement.vue b/examples/ExpressCheckoutElement.vue index 4a780e0..e574762 100644 --- a/examples/ExpressCheckoutElement.vue +++ b/examples/ExpressCheckoutElement.vue @@ -47,6 +47,7 @@ onBeforeMount(() => { }) }) +// Vue 3.5 and newer, for older vue versions use ref() const elementsComponent = useTemplateRef("elementsComponent") const expressCheckoutComponent = useTemplateRef("expressCheckoutComponent") diff --git a/examples/PaymentElementDeferred.vue b/examples/PaymentElementDeferred.vue index 306bb09..1aa9c28 100644 --- a/examples/PaymentElementDeferred.vue +++ b/examples/PaymentElementDeferred.vue @@ -57,7 +57,7 @@ const paymentElementOptions = ref({ const stripeLoaded = ref(false) const clientSecret = ref("") -// Define component refs +// Vue 3.5 and newer, for older vue versions use ref() const elementsComponent = useTemplateRef("elementsComponent") const paymentComponent = useTemplateRef("paymentComponent")