白色主题
This commit is contained in:
@@ -13,7 +13,7 @@ const name = `${prefix}-icon`;
|
||||
let Icon = class Icon extends SuperComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.externalClasses = [`${prefix}-class`];
|
||||
this.externalClasses = ['class', `${prefix}-class`];
|
||||
this.properties = props;
|
||||
this.data = {
|
||||
componentPrefix: prefix,
|
||||
@@ -22,7 +22,7 @@ let Icon = class Icon extends SuperComponent {
|
||||
iconStyle: undefined,
|
||||
};
|
||||
this.observers = {
|
||||
'name, color, size, customStyle'() {
|
||||
'name, color, size, style'() {
|
||||
this.setIconStyle();
|
||||
},
|
||||
};
|
||||
@@ -31,7 +31,7 @@ let Icon = class Icon extends SuperComponent {
|
||||
this.triggerEvent('click', event.detail);
|
||||
},
|
||||
setIconStyle() {
|
||||
const { name, color, size, customStyle } = this.properties;
|
||||
const { name, color, size, style } = this.properties;
|
||||
const isImage = name.indexOf('/') !== -1;
|
||||
const sizeValue = addUnit(size);
|
||||
const sizeStyle = isImage ? { width: sizeValue, height: sizeValue } : {};
|
||||
@@ -39,7 +39,7 @@ let Icon = class Icon extends SuperComponent {
|
||||
const fontStyle = size ? { 'font-size': sizeValue } : {};
|
||||
this.setData({
|
||||
isImage,
|
||||
iconStyle: `${styles(Object.assign(Object.assign(Object.assign({}, colorStyle), fontStyle), sizeStyle))}${customStyle ? `;${customStyle}` : ''}`,
|
||||
iconStyle: `${styles(Object.assign(Object.assign(Object.assign({}, colorStyle), fontStyle), sizeStyle))}${style ? `;${style}` : ''}`,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user