Answer the question
In order to leave comments, you need to log in
How to use Vue.set in mixins?
Hello, I decided to move the update method to the mixin and connect it to different components.
The mixin code is:
const $ = require('jquery');
const _ = require('lodash');
const config = require('@/config');
const Vue = require('vue');
module.exports = {
manageMixin: {
data: function () {
return {
}
},
methods: {
update: function() {
//some code
Vue.set(this.data, 'links', result.data.links);
}
}
},
};
import {manageMixin} from '@/mixins/manage'
export default {
...
mixins: [manageMixin],
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question