<script>
    //在想这里调用 methods 里面的方法 因为这个不能写到里面
    $(document).on('refresh', '.pull-to-refresh-content', function (e) {
        vm && vm.getList();// 想在这里地调用里面的 getList  
        console.log('123');
    });
    
    var vm = null;//介质

    export default {
        name: "friends",
        data() {
            return {
                articles: []
            }
        },
        created: function() {//=====关键
            vm = this//=====关键
        },
        methods: {
            getList: function () {
                
            }
        },
    }
</script>
Logo

前往低代码交流专区

更多推荐