0

I am working in Vue 3 using the Options API.

My data is initially setting properly. However, when I requery my data after axios fetch, and set it to the data property analytics, I see it updating in the console log and in vue extension, but not in the template. Could someone point me in the right direction?

<template>
{{analytics.analytics.daily_impression_data}}

</template>
export default {
    data() {
    return {
            analytics: {
                analytics: {
                    average: 0,
                    total: 0,
                    daily_impression_data: {},   
                },
            },
        }
    },
    async mounted() {
      
        await this.getAnalyticsData();
    },
    methods:
        async onSelectDate() {

            await this.getAnalyticsData();
        },
        async getAnalyticsData() { 
            Object.assign(this.options, this.parseQstring(this.$route.params.truck));
            const qstring = this.generateQstring();

            await Analytics.fetchAll(qstring).then((data) => {
                this.analytics = data;
            });
        },
        
    }
}
David Pell
  • 791
  • 1
  • 8
  • 16

0 Answers0