提交 c343c477 编写于 作者: richard_1015's avatar richard_1015

fix: button icon style bug

上级 0e6c7d01
......@@ -98,6 +98,9 @@ export default createDemo({
}
.demo-button-row2 {
margin-bottom: 10px;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.nut-button {
margin-right: 15px;
......
.nut-button {
position: relative;
display: inline-block;
flex-shrink: 0;
height: $button-default-height;
box-sizing: border-box;
margin: 0;
......@@ -33,6 +34,13 @@
&:active::before {
opacity: 0.1;
}
&__warp {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
&--loading,
&--disabled {
......
<template>
<view :class="classes" :style="getStyle" @click="handleClick">
<nut-icon class="nut-icon-loading" v-if="loading"></nut-icon>
<nut-icon :class="icon" v-if="icon && !loading" :name="icon"></nut-icon>
<view :class="{ text: icon || loading }" v-if="$slots.default">
<slot></slot>
<view class="nut-button__warp">
<nut-icon class="nut-icon-loading" v-if="loading"></nut-icon>
<nut-icon :class="icon" v-if="icon && !loading" :name="icon"></nut-icon>
<view :class="{ text: icon || loading }" v-if="$slots.default">
<slot></slot>
</view>
</view>
</view>
</template>
......
......@@ -17,7 +17,7 @@ $white: #fff;
$black: #000;
// padding
$padding-xs: 8px 12px;
$padding-xs: 12px;
$font-family: PingFang SC, Microsoft YaHei, Helvetica, Hiragino Sans GB, SimSun,
sans-serif !default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册