Javascript Onsen UI Vue swipeable选项卡不起作用

Javascript Onsen UI Vue swipeable选项卡不起作用,javascript,cordova,vue.js,vuejs2,onsen-ui,Javascript,Cordova,Vue.js,Vuejs2,Onsen Ui,我用这个模板开始 然后我添加了一个tabbar,虽然可以,但是swipeable属性不起作用 当我运行代码时,我可以单击tabs和它的工作方式,但滑动不起作用 我可以在onsen ui演示中滑动,这样我的浏览器就可以了 这是我的Tabbar组件 <template> <v-ons-page> <v-ons-toolbar> <div class="center">{{ title }}</div> <

我用这个模板开始

然后我添加了一个tabbar,虽然可以,但是swipeable属性不起作用 当我运行代码时,我可以单击tabs和它的工作方式,但滑动不起作用

我可以在onsen ui演示中滑动,这样我的浏览器就可以了

这是我的Tabbar组件

<template>
  <v-ons-page>
    <v-ons-toolbar>
      <div class="center">{{ title }}</div>
    </v-ons-toolbar>

    <v-ons-tabbar
      swipeable position="auto"
      :tabs="tabs"
      :visible="true"
      :index.sync="activeIndex"
    >
    </v-ons-tabbar>
  </v-ons-page>
</template>


<script>
import Dashboard from './components/dashboard.vue';
import Diary from './components/diary.vue';

export default {
  data () {
    return {
      activeIndex: 0,
      tabs: [
        {
          label: 'dash',
          page: Dashboard,
          icon: this.md() ? null : 'ion-ios-settings',
          key: "Dashboard"
        },
        {
          label: 'diar',
          page: Diary,
          icon: this.md() ? null : 'ion-ios-settings',
          key: "Diary"
        }
      ]
    };
  },
  methods: {
    md() {
      return this.$ons.platform.isAndroid();
    }
  },
  computed: {
    title() {
      return this.tabs[this.activeIndex].label;
    }
  }
};
</script>

确保您至少使用了onsenui@2.6.0和vue-onsenui@2.2.0. 变更日志。如果可能,只需更新到最新版本即可。检查package.json文件并更改版本号,或者,如果您正在使用,在tabbar对象上放置attr动画时,只需运行Thread upgrade onsenui vue onsenui。

它解决了这个问题

 <v-ons-tabbar
   position="auto"
   animation="fade"
   swipeable 
  :tabs="tabs"
  :visible="true"
  :index.sync="activeIndex"
>
</v-ons-tabbar>
其他社区的Fran Dios帮助我做到这一点,所以我给予奖励