首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >验证-底部对齐文本字段

验证-底部对齐文本字段
EN

Stack Overflow用户
提问于 2019-03-20 22:31:39
回答 1查看 5K关注 0票数 0

我尝试将search文本字段的底部与浮动操作按钮的底部对齐。I've created a code pen which you can see here:

我已经尝试了我知道的所有方法,包括:设置负边距,垂直对齐baselinebottom都没有效果。您可以在代码中看到我的代码,但我也将其附加在下面:

代码语言:javascript
复制
<template id="app">
    <v-container>

      <v-layout row wrap align-center class="text-xs-center">
        <v-flex xs12 align-center>

        <v-flex>
          <h1 class="display-1 sans_pro_medium fix-title-height pb-3">Failed Order Report</h1>              
        </v-flex>

        <v-layout row>
          <v-flex xs12>
            <side_drawer v-show="side_drawer_show"></side_drawer>
          </v-flex>
        </v-layout>

        <!--<v-flex xs12>-->
          <!--<v-spacer></v-spacer>-->
          <v-layout row>
              <v-flex xs1>
                <v-btn fab large color="purple darken-4" align-left>
                  <v-icon x-large color="white">refresh</v-icon>
                </v-btn>
              </v-flex>

              <v-flex xs4 offset-xs7>
                <v-text-field
                  align-right
                  v-model="search"
                  append-icon="search"
                  label="Search"
                  single-line
                  hide-details
                >
                </v-text-field>
              </v-flex>
          </v-layout>
            <!--</v-flex>-->

          <v-data-table
            :headers="headers"
            :items="desserts"
            :search="search"
            class="elevation-11"
          >
            <template v-slot:no-data>
              <v-alert :value="true" type="success">
                Your orders are looking great! No orders have failed.
              </v-alert>
            </template>
            <template slot="items" slot-scope="props">
              <td>{{ props.item.name }}</td>
              <td class="text-xs-center">{{ props.item.calories }}</td>
              <td class="text-xs-center">{{ props.item.fat }}</td>
              <!--<td class="text-xs-right">{{ props.item.carbs }}</td>-->
              <!--<td class="text-xs-right">{{ props.item.protein }}</td>-->
              <!--<td class="text-xs-right">{{ props.item.iron }}</td>-->
            </template>
          </v-data-table>
        </v-flex>
      </v-layout>
    </v-container>
</template>

<script>
/*global localStorage*/
// import side_drawer from '../components/side_drawer.vue';
// import {dataShare} from '../packs/application.js';
import axios from 'axios';

export default {
    components: {
    side_drawer
    },
    data () {
      return {
        search: '',
        side_drawer_show: true,
        headers: [
          {
            text: 'Shopify Store URL',
            align: 'center',
            sortable: true,
            value: 'url'
          },
          { text: 'Shopify Order Number', value: 'shopify_order_number', align: 'center', sortable: true},
          { text: 'Amazon Order Id', value: 'amazon_order_id', align: 'center', sortable: true },
          { text: 'Shopify Order Status', value: 'shopify_order_status', align: 'center', sortable: true },
          { text: 'Amazon Order Status', value: 'amazon_order_status', align: 'center', sortable: true },
          { text: 'Action Needed', value: 'action' , sortable: true}
        ],
        desserts: [
          {
            name: 'Frozen Yogurt',
            calories: 159,
            fat: 6.0,
            carbs: 24,
            protein: 4.0,
            iron: '1%'
          },
          {
            name: 'Ice cream sandwich',
            calories: 237,
            fat: 9.0,
            carbs: 37,
            protein: 4.3,
            iron: '1%'
          },
          {
            name: 'Eclair',
            calories: 262,
            fat: 16.0,
            carbs: 23,
            protein: 6.0,
            iron: '7%'
          },
          {
            name: 'Cupcake',
            calories: 305,
            fat: 3.7,
            carbs: 67,
            protein: 4.3,
            iron: '8%'
          }
        ]
      }
    }
  }

</script>


<style>

.nudge_up {
  padding-bottom: 10px !important;
}  
</style>
EN

回答 1

Stack Overflow用户

发布于 2019-03-20 23:04:44

您只需将align-center添加到您的v-layout中即可:

代码语言:javascript
复制
<v-layout row align-center>
          <v-flex xs1>
            <v-btn fab large color="purple darken-4" align-left>
              <v-icon x-large color="white">refresh</v-icon>
            </v-btn>
          </v-flex>

          <v-flex xs4 offset-xs7>
            <v-text-field
              align-right
              v-model="search"
              append-icon="search"
              label="Search"
              single-line
              hide-details
            >
            </v-text-field>
          </v-flex>
</v-layout>

你可以阅读更多关于它的here

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55263238

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档