Skip to content

Commit

Permalink
fix(Button): icon style add float fixed height
Browse files Browse the repository at this point in the history
Closes #106
  • Loading branch information
vvpvvp committed Apr 26, 2019
1 parent 3e9b0d5 commit b85b882
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/components/demos/plugins/dropdownmenu2.vue
Expand Up @@ -9,7 +9,7 @@
</ButtonGroup>
<ButtonGroup>
<Button color="primary" icon="h-icon-inbox">Create</Button>
<DropdownMenu class="h-btn-primary" button @click="trigger" :datas="param"></DropdownMenu>
<DropdownMenu class="h-btn-primary" button @click="trigger" placement="bottom-end" :datas="param"></DropdownMenu>
</ButtonGroup>
<DropdownMenu button class="h-btn-primary" @click="trigger" :datas="param">开始</DropdownMenu>
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/components_en/demos/plugins/dropdownmenu2.vue
Expand Up @@ -9,7 +9,7 @@
</ButtonGroup>
<ButtonGroup>
<Button color="primary" icon="h-icon-inbox">Create</Button>
<DropdownMenu class="h-btn-primary" button @click="trigger" :datas="param"></DropdownMenu>
<DropdownMenu class="h-btn-primary" button @click="trigger" placement="bottom-end" :datas="param"></DropdownMenu>
</ButtonGroup>
<DropdownMenu button class="h-btn-primary" @click="trigger" :datas="param">Start</DropdownMenu>
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/native/button.less
Expand Up @@ -47,7 +47,7 @@
background-color: #FFF;
.btn-text-color(@primary-color, false);
>i{
// font-size: 90%;
float: left;
+span {
margin-left: 5px;
}
Expand Down

7 comments on commit b85b882

@btboys
Copy link

@btboys btboys commented on b85b882 Apr 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥要把,按钮的图标都浮动到左边啊。。。。block 的时候,文字在中间,图标却在左边,看起来真的怪。

@vvpvvp
Copy link
Member Author

@vvpvvp vvpvvp commented on b85b882 Apr 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,因为图标影响了button的高度,不知道你是否有其他的方案?

@btboys
Copy link

@btboys btboys commented on b85b882 Apr 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,因为图标影响了button的高度,不知道你是否有其他的方案?

什么场景下会影响button高度?

@vvpvvp
Copy link
Member Author

@vvpvvp vvpvvp commented on b85b882 Apr 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

之前是由于这个不对齐的问题修改的。

@btboys
Copy link

@btboys btboys commented on b85b882 Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样改还是有点欠考虑,你看 demo 里面的效果。不符合预期了。本来结构里面图标是在后面的,现在不论怎么摆都在前面。margin 也没有了
QQ20190430-093448
QQ20190430-093439
1

@btboys
Copy link

@btboys btboys commented on b85b882 Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ20190430-094219
我现在去除这个 float 貌似也没出现没对齐呗

@vvpvvp
Copy link
Member Author

@vvpvvp vvpvvp commented on b85b882 Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我已经修正方案了,请更新至1.19.2

Please sign in to comment.