admin管理员组文章数量:1345030
In google material framework, I have this code
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_date_from.type" :label="page.text_input_date_from.label" box autofocus :append-icon="page.text_input_date_from.icon" v-model="page.text_input_date_from.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_date_to.type" :label="page.text_input_date_to.label" box autofocus :append-icon="page.text_input_date_to.icon" v-model="page.text_input_date_to.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_person_name.type" :label="page.text_input_person_name.label" box autofocus :append-icon="page.text_input_person_name.icon" v-model="page.text_input_person_name.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_pany_name.type" :label="page.text_input_pany_name.label" box autofocus :append-icon="page.text_input_pany_name.icon" v-model="page.text_input_pany_name.value"></v-text-field>
</div>
Basically there is classes like this
mdc-layout-grid__cell--span-3
mdc-layout-grid__cell--span-3-desktop
mdc-layout-grid__cell--span-3-tablet
mdc-layout-grid__cell--span-3-phone
How can I replicate the same thing using vuetify?
I can't see any examples of responsive.
Thanks
In google material framework, I have this code
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_date_from.type" :label="page.text_input_date_from.label" box autofocus :append-icon="page.text_input_date_from.icon" v-model="page.text_input_date_from.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_date_to.type" :label="page.text_input_date_to.label" box autofocus :append-icon="page.text_input_date_to.icon" v-model="page.text_input_date_to.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_person_name.type" :label="page.text_input_person_name.label" box autofocus :append-icon="page.text_input_person_name.icon" v-model="page.text_input_person_name.value"></v-text-field>
</div>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-3-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
<v-text-field :type="page.text_input_pany_name.type" :label="page.text_input_pany_name.label" box autofocus :append-icon="page.text_input_pany_name.icon" v-model="page.text_input_pany_name.value"></v-text-field>
</div>
Basically there is classes like this
mdc-layout-grid__cell--span-3
mdc-layout-grid__cell--span-3-desktop
mdc-layout-grid__cell--span-3-tablet
mdc-layout-grid__cell--span-3-phone
How can I replicate the same thing using vuetify?
https://vuetifyjs./en/layout/grid
I can't see any examples of responsive.
Thanks
Share Improve this question asked Nov 8, 2018 at 16:16 omegaomega 44k90 gold badges286 silver badges523 bronze badges1 Answer
Reset to default 9From Vuetify Grid documentation page:
It contains 5 types of media breakpoints that are used for targeting specific screen sizes or orientations. The props for grid ponents are actually classes that are derived from their defined properties.
Which means that props that are passed to v-col
ponent define responsive classes for the grid element.
If you go to #API
section on the same page and select v-col
from ponent's select, the first available prop: {size}="{1-12}
lists possible values to specify layout for each breakpoint:
xs: extra small,
sm: small,
md: medium,
lg: large,
xl: extra large
And they are used with values of 1 through 12
.
Usage example:
<v-col
xs="12"
sm="5"
md="3"
>
<v-card dark color="primary">
...
</v-card>
</v-col>
Make sure to check v-col
documentation for required layout structure for grid to work.
本文标签: javascriptHow to create a responsive layout in vuetifyStack Overflow
版权声明:本文标题:javascript - How to create a responsive layout in vuetify? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743763606a2534834.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论