iOS Framework7-vue 应用中的手风琴动画真的很慢

Accordion animation is really slow in iOS Framework7-vue app

我正在使用 Framework7-vue 构建 android 和 iOS 应用程序。 Android 应用程序完美运行,但 iOS 应用程序给我带来麻烦。

用户将获得查看弹出窗口的选项,该弹出窗口内将有一个手风琴。 iOS 中的动画非常慢而且看起来很糟糕。 我一直在尝试一些东西并用谷歌搜索了一下,但没有成功。

您将在下面找到我对 app.js 的实现和包含弹出窗口的片段。 我很乐意听到建议,谢谢。

app.js

const questions =  {
    questionOne:'Does the subject have a high CCA?',
    options: {
        yes:'Yes',
        no:'No'
    },
    selected:{
      yes: {
        questionTwo: 'High PTH and yes to high CCA',
        options: [
          'PTH > 80pmol/L',
          'PTH < 80pmol but > 50pmol/L and increasing',
          'PTH < 50 but higher than base line'
        ]
      },
      no: {
        questionTwo: 'PTH > 80pmol/L',
        options: [
          'Refer for surgical parathyroidectomy',
          'Start Cinacalcet if parathyroidectomy is'
        ]
      }
    }
}
//  this.$$ - this.Dom7;

Vue.use(Framework7Vue);

// Init Page Components
Vue.component('page-education', {
  template: '#page-education'
});
Vue.component('page-mbddef', {
  template: '#page-mbddef'
});
Vue.component('page-ckdmbdeffects', {
  template: '#page-ckdmbdeffects'
});
Vue.component('page-algorithms', {
  template: '#page-algorithms'
});
Vue.component('page-highpth', {
  template: '#page-highpth'
});
Vue.component('page-dietary', {
  template: '#page-dietary'
});



// Handle device ready event
// Note: You may want to check out the vue-cordova package on npm for cordova specific handling with vue - https://www.npmjs.com/package/vue-cordova
document.addEventListener('deviceready', () => {
  console.log("DEVICE IS READY!");    
}, false)

// Init App

// var $$ = dom7;
// console.log($$);
// var $$ = this.Dom7;
// console.log($$);
const mainApp = new Vue({
  el: '#app',
  data: {
    popupOpened: false,
    navBarShowing: true,
    showingGreenCard: false,
    currQuestion: questions.questionOne,
    currOptCount: 2,
    currOptions: questions.options,
    showing: false,
    isShowing: true,
    icon:       "<i class='far fa-file-alt'></i>",
    homeIcon:   "<i id='sidemenu-icon' class='fas fa-home'></i>",
    pencilIcon: "<i id='sidemenu-icon' class='fas fa-pencil-alt'></i>",
    healthIcon: "<i id='sidemenu-icon' class='fas fa-plus'></i>",
    algIcon:    "<i id='sidemenu-icon' class='fas fa-align-justify'></i>",
    dietIcon:   "<i id='sidemenu-icon' class='fas fa-utensils'></i>",
    clipIcon:   "<i id='sidemenu-icon' class='far fa-clipboard'></i>",
    linkIcon:   "<i id='sidemenu-icon' class='fas fa-link'></i>"
  },
  progress: {
    value: 10
  },
  on: {
    pageInit: function(){
      console.log('page');
    }
  },
  methods: {
    setInlineProgress: function(value) {
      this.value = value;
      const self = this;
      const app = self.$f7;
      app.setProgressbar('#demo-inline-progressbar', this.value);
    },
    toHomeScreen: function() {
      this.$f7.getCurrentView().router.back({ pageName: 'home-page', force: true, refreshPrevious: true});
      this.$f7.closePanel();
    },
    shouldShow: function() {
      this.showing = true;
    },
    generateQuestion: function(answer){
       this.currQuestion = questions.selected.yes.questionTwo;
       this.optionsOne = 'Yes';
       this.optionTwo = 'No';
       this.shouldShow();
    },
    showPopUp: function(e) {
     this.showingGreenCard = true;
    },
    closePopUp: function(){
      this.showingGreenCard = false;
    },
  },
  on:{

  },
  // Init Framework7 by passing parameters here
  framework7: {
    root: '#app',
    /* Uncomment to enable Material theme: */
    material: true,
    routes: [
      {
        path:'/',
        name: 'home'
      }
      ,
      {
        path: '/education/',
        component: 'page-education'
      },
      {
        path: '/ckdmbddef/',
        component: 'page-mbddef'
      },
      {
        path: '/ckdmbdeffects/',
        component: 'page-ckdmbdeffects'
      },
      {
        path: '/algorithms/',
        component: 'page-algorithms',
      },
      {
        path: '/highpth/',
        component: 'page-highpth'
      },
      {
        path: '/dietary/',
        component: 'page-dietary'
      },
      {
        path: '/form/',
        component: 'page-form'
      },
      {
        path: '/dynamic-route/blog/:blogId/post/:postId/',
        component: 'page-dynamic-routing'
      }
    ],
  }
});

弹出窗口片段如下:

 <div class="popup-card-four" v-if="mainApp.showingGreenCard">
                <p class="popup-text">Suitable low phosphate foods</p>
                <i id="close-icon" @click="mainApp.closePopUp()" class="far fa-times-circle"></i>
                <f7-list class="main-acc-list" accordion-list>
                    <f7-list-item id="acc-one-title" accordion-item title="Lower phosphate diary">
                      <f7-accordion-content class="table-wrapper">
                        <f7-block >
                            <table class="main-table">
                                <tr class="table-underline">
                                  <td class="popup-inner">Milk</td>
                                  <td class="popup-inner">Rice or milk</td>
                                </tr>
                                <tr>
                                  <td class="popup-inner">Cheese</td>
                                  <td class="popup-inner">Cottage Cheese</td>
                                </tr>
                                <tr>
                                  <td></td>
                                  <td class="popup-inner">Cream cheese</td>
                                </tr>
                                <tr>
                                  <td></td>
                                  <td class="popup-inner">Quark</td>
                                </tr>
                                <tr class="table-underline">
                                  <td></td>
                                  <td class="popup-inner">Ricotta</td>
                                </tr>
                                <tr>
                                  <td class="popup-inner">Cream</td>
                                  <td class="popup-inner">Single, double, whipping,</td>
                                </tr>
                                <tr>
                                  <td></td>
                                  <td class="popup-inner">pouring, clotted,</td>
                                </tr>
                                <tr>
                                  <td></td>
                                  <td class="popup-inner">Marscapone</td>
                                </tr>
                              </table>
                        </f7-block>
                      </f7-accordion-content>
                    </f7-list-item>
                    <f7-list-item id="acc-one-title" accordion-item title="Lower phosphate diary">
                      <f7-accordion-content>
                        <f7-list>
                          <f7-list-item title="Item 1"></f7-list-item>
                          <f7-list-item title="Item 2"></f7-list-item>
                          <f7-list-item title="Item 3"></f7-list-item>
                          <f7-list-item title="Item 4"></f7-list-item>
                        </f7-list>
                      </f7-accordion-content>
                    </f7-list-item>
                    <f7-list-item id="acc-one-title" accordion-item title="Lower phosphate diary">
                      <f7-accordion-content>
                        <f7-block>
                          <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean elementum id neque nec commodo. Sed vel justo at turpis laoreet pellentesque quis sed lorem. Integer semper arcu nibh, non mollis arcu tempor vel. Sed pharetra tortor vitae est rhoncus, vel congue dui sollicitudin. Donec eu arcu dignissim felis viverra blandit suscipit eget ipsum.
                          </p>
                        </f7-block>
                      </f7-accordion-content>
                    </f7-list-item>
                  </f7-list>
              </div>

通过删除手风琴的 framework7-vue 组件并将其替换为标准 framework7 html 手风琴组件解决了这个问题。

看来iOS不喜欢framework7-vue组件。 希望这对某人有帮助。 干杯。