Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从插件vue设置属性值_Javascript_Vue.js_Vuejs2 - Fatal编程技术网

Javascript 从插件vue设置属性值

Javascript 从插件vue设置属性值,javascript,vue.js,vuejs2,Javascript,Vue.js,Vuejs2,我已经安装了这个插件: 我需要编辑道具:从app.js中的这个插件中启用 我的应用程序中有以下代码: import Affix from 'vue-affix'; var affix = Vue.use(Affix); const app = new Vue({ el: '#app', data() { }, mounted() { this.usePushStateForTabs('.spark-tabs'); this.c

我已经安装了这个插件:

我需要编辑道具:从app.js中的这个插件中启用

我的应用程序中有以下代码:

import Affix from 'vue-affix';

var affix = Vue.use(Affix);

const app = new Vue({
    el: '#app',

    data() {

    },

    mounted() {
       this.usePushStateForTabs('.spark-tabs');
       this.calcStickyWidth();
       this.$nextTick(function() {
          window.addEventListener('resize', this.calcStickyWidth);
       })
    },

    methods: {
     calcStickyWidth() {
        let width = $('.vue-affix').parent().width();

        $('.vue-affix').css('width', width + 'px');

        if(! this.isMobile) { affix.enabled = false; }
     },

     isMobile() {
        return $(window).width() > 768 ? true : false
     },
    }
 });
我需要将启用的道具设置为
false
。但我的解决方案不起作用。我没有定义。请帮忙修理一下