Я создаю приложение для Android и iOS с Framework7-vue.Приложение 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>