当元素排成一行时,我似乎无法将v-switch
组件放在v-flex
内部。
感觉好像我已经尝试了Grid system文档页面上所有已记录的v-container
,v-layout
和v-flex
道具一样,似乎没有什么能完成工作(即justify-center
,text-xs-center
等)。
我尝试了类似问题的解决方案,但无济于事。
new Vue({
el: '#app',
data () {
return {
enabled: false
}
}
})
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.min.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.js"></script>
<div id="app">
<v-app id="inspire">
<v-container grid-list-xl style="background: IndianRed;">
<v-layout text-xs-center row wrap align-center style="height: 100px;">
<v-flex xs4>
<v-card color="success">
Content
</v-card>
</v-flex>
<!–– This guy right here -->
<v-flex xs4>
<v-switch prepend-icon="cloud" v-model="enabled"></v-switch>
</v-flex>
<v-flex xs4>
<v-card color="success">
Content
</v-card>
</v-flex>
</v-layout>
</v-container>
</v-app>
</div>
答案 0 :(得分:0)
<v-flex xs4>
<v-layout justify-center align-center>
<v-switch prepend-icon="cloud" v-model="enabled"></v-switch>
</v-layout>
</v-flex>
使用带有对齐和居中对齐的嵌套布局,您将获得所需的效果。
答案 1 :(得分:0)
我要解决的解决方案是使用面向列的com.google.api.services.androidpublisher.AndroidPublisher.Builder ab = new com.google.api.services.androidpublisher.AndroidPublisher.Builder(cred.getTransport(), cred.getJsonFactory(), setHttpTimeout(cred));
和v-layout
包裹在align-center
组件周围。
v-switch
new Vue({
el: '#app',
data () {
return {
enabled: false
}
}
})