vue method using jquery

+ Jq distal vue do today, with the jq ajax callback method of the request data vue, suggesting xxxis not a function
found through a crunching To use jq vue defined in need

const vue = new Vue({
    el: '#app',
    data: {
    },
    methods: {
        returnDemo() {},
        clickDemo() {
            $.get('', () => {
                // 需要这样调用才行
                vue.returnDemo()
            })
        }
    },
    created: function () {
    }
});

Guess you like

Origin www.cnblogs.com/mahoshojo/p/12210777.html