dipu-bd/vue-skycons

Bind to condition prop doesn't update when value changes

denskiz opened this issue · 2 comments

The icon doesn't update when the prop value changes. Inspection confirms that the value being passed to the condition prop does change, but the icon doesn't update.

Here is my code:
I'm having the same issue. Here is my code:

<template>
  <skycon :condition="weather" width="400" height="400"></skycon>
</template>
export default {
components: {
    Skycon,
  },
  data() {
    return {
      weather: '',
    },
     mounted(){
this.weather = 'clear-day'
  },


you code should not be working. you are declaring mounted function inside data().

No I'm not declaring a mounted function in data. I just forgot a closing parenthesis for data in the code above.