close #3402
This commit is contained in:
parent
7737645142
commit
3d1f3cf661
2 changed files with 14 additions and 4 deletions
|
@ -15,7 +15,6 @@
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
.i-icon-accessory:before { content: "\e6dd"; }
|
.i-icon-accessory:before { content: "\e6dd"; }
|
||||||
|
|
||||||
|
@ -297,6 +296,10 @@
|
||||||
<Icon custom="i-icon i-icon-video" size="24" color="#ff6600" />
|
<Icon custom="i-icon i-icon-video" size="24" color="#ff6600" />
|
||||||
<Icon custom="i-icon i-icon-time" />
|
<Icon custom="i-icon i-icon-time" />
|
||||||
<Icon type="ionic" />
|
<Icon type="ionic" />
|
||||||
|
<Button icon="ionic">Default</Button>
|
||||||
|
<Button custom-icon="i-icon i-icon-search">Default</Button>
|
||||||
|
<Button icon="ionic" shape="circle"></Button>
|
||||||
|
<Button custom-icon="i-icon i-icon-video" shape="circle"></Button>
|
||||||
<hr>
|
<hr>
|
||||||
<Button>Default</Button>
|
<Button>Default</Button>
|
||||||
<Button type="primary">Primary</Button>
|
<Button type="primary">Primary</Button>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@click="handleClick">
|
@click="handleClick">
|
||||||
<Icon class="ivu-load-loop" type="load-c" v-if="loading"></Icon>
|
<Icon class="ivu-load-loop" type="load-c" v-if="loading"></Icon>
|
||||||
<Icon :type="icon" v-if="icon && !loading"></Icon>
|
<Icon :type="icon" :custom="customIcon" v-if="(icon || customIcon) && !loading"></Icon>
|
||||||
<span v-if="showSlot" ref="slot"><slot></slot></span>
|
<span v-if="showSlot" ref="slot"><slot></slot></span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -42,7 +42,14 @@
|
||||||
return oneOf(value, ['button', 'submit', 'reset']);
|
return oneOf(value, ['button', 'submit', 'reset']);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: String,
|
icon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
customIcon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
long: {
|
long: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
@ -63,7 +70,7 @@
|
||||||
[`${prefixCls}-${this.shape}`]: !!this.shape,
|
[`${prefixCls}-${this.shape}`]: !!this.shape,
|
||||||
[`${prefixCls}-${this.size}`]: !!this.size,
|
[`${prefixCls}-${this.size}`]: !!this.size,
|
||||||
[`${prefixCls}-loading`]: this.loading != null && this.loading,
|
[`${prefixCls}-loading`]: this.loading != null && this.loading,
|
||||||
[`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || this.loading)
|
[`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || !!this.customIcon || this.loading)
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue