提交 8f8e55b5 编写于 作者: KK's avatar KK

根据移动端尺寸动态栅格

上级 53a61597
......@@ -4,7 +4,7 @@
<ion-grid>
<ion-row>
<template v-for="item in items">
<ion-col size="3" :key="item.id">
<ion-col :size="size" :key="item.id">
<ion-tab-button @click="selectItem(item.name)" :class="item.textcls?item.textcls:''">
<template v-if="item.icon != ''">
<img :src="item.icon" />
......@@ -124,6 +124,18 @@ export default class AppMobMenuIonicView extends Vue {
this.counterdata = counterServide.counterData;
}
}
/**
* 动态栅格
*
* @memberof AppMobMenuIonicView
*/
get size() {
return document.body.scrollWidth > 365?3:4;
}
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册