2021年5月3日星期一

Is there a way to set mixin data?

I'm working with vue-howler and for some reason, the data there is being passed using mixin, I don't see a way to access such mixin from the vue file script (much less do I find a way to change the data in it)

I want to show the progress of playing a music file in a vuetify slider, but due to being contained in a mixin, i get an error "Computed property was assigned to but it has no setter."

//MusicPlayerComponent.vue  <template>      <v-card flat width="500px" height="200px">        <v-flex class="info d-flex justify-center">            <v-btn icon large @click="togglePlayback">            <v-icon>                          </v-icon>          </v-btn>            <v-slider v-model="progress" min="0" max="100">                      </v-slider>      </v-card>  </template>  

I don't need to show the script section of my vue file because there is literally nothing there, the "progress, playing, togglePlayback" properties and functions in the above code all come from that "mixin"

//MusicPlayerComponent.vue    <script lang="ts">  import { Component, Vue, Watch} from "vue-property-decorator"  // @ts-ignore  import VueHowler from 'vue-howler'    @Component({    mixins: [VueHowler]  })      export default class AudioPlayerComponent extends Vue {    }    </script>    
https://stackoverflow.com/questions/67377781/is-there-a-way-to-set-mixin-data May 04, 2021 at 09:46AM

没有评论:

发表评论