简体   繁体   English

验证:将扩展面板的头部向右对齐

[英]Vuetify: align the head of an expansion panel to the right

I want to use the Vuetify expansion panel and align part of the content inside the <div slote="head"></div> to the right in order to get this: 我想使用Vuetify扩展面板并将<div slote="head"></div>内的部分内容向右对齐,以实现以下目的:

https://imgur.com/wraVVsR https://imgur.com/wraVVsR

https://imgur.com/flrvUw6 https://imgur.com/flrvUw6

but i get this instead: 但是我得到了这个:

https://imgur.com/BukqnBC https://imgur.com/BukqnBC

https://imgur.com/NLgdKWa https://imgur.com/NLgdKWa

I tried 我试过了

float:right , text-align:right

even negative margins without success. 甚至没有成功的负利润。

Important: It seems like your expansion panel is not getting full width 重要提示:您的扩展面板似乎没有达到全宽

This is what you are looking for: 这是您要寻找的:

<div slot="header">
  <v-layout row>
    <v-flex xs8>
      Item
    </v-flex>
    <v-flex xs4 text-xs-right>
      Item
    </v-flex>
  </v-layout>
</div>

Working example: https://codepen.io/anon/pen/vbVxaa 工作示例: https//codepen.io/anon/pen/vbVxaa

There was this line of CSS somewhere overriding my own CSS. 这行CSS覆盖了我自己的CSS。

.v-expansion-panel__header > .v-expansion-panel__header__icon {
  flex: 1 1 auto !important;
}

Deleting it solved the problem. 删除它可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM