[Vuejs]-How can i put data in label , value(Vue JS)

0👍

Using the directives, you can use string interpolation.

:data="[
        { label: `${data.label}`, value: 60 },
        { label: 'B', value: 40 },
        { label: 'C', value: 20 },
        { label: 'D', value: 10 }
      ]"

You will need to store the Axios response.data in data in the component.

Leave a comment