#3402
This commit is contained in:
梁灏 2018-06-21 09:15:00 +08:00
parent 9c52988555
commit 7737645142
10 changed files with 467 additions and 156 deletions

View file

@ -7,13 +7,26 @@
export default {
name: 'Icon',
props: {
type: String,
type: {
type: String,
default: ''
},
size: [Number, String],
color: String
color: String,
custom: {
type: String,
default: ''
}
},
computed: {
classes () {
return `${prefixCls} ${prefixCls}-${this.type}`;
return [
`${prefixCls}`,
{
[`${prefixCls}-${this.type}`]: this.type !== '',
[`${this.custom}`]: this.custom !== '',
}
];
},
styles () {
let style = {};