白色主题
This commit is contained in:
@@ -15,8 +15,10 @@ let Avatar = class Avatar extends SuperComponent {
|
||||
super(...arguments);
|
||||
this.options = {
|
||||
multipleSlots: true,
|
||||
styleIsolation: 'apply-shared',
|
||||
};
|
||||
this.externalClasses = [
|
||||
'class',
|
||||
`${prefix}-class`,
|
||||
`${prefix}-class-image`,
|
||||
`${prefix}-class-icon`,
|
||||
@@ -29,13 +31,16 @@ let Avatar = class Avatar extends SuperComponent {
|
||||
classPrefix: name,
|
||||
isShow: true,
|
||||
zIndex: 0,
|
||||
isChild: false,
|
||||
};
|
||||
this.relations = {
|
||||
'./avatar-group': {
|
||||
'../avatar-group/avatar-group': {
|
||||
type: 'ancestor',
|
||||
linked(target) {
|
||||
this.parent = target;
|
||||
linked(parent) {
|
||||
var _a;
|
||||
this.parent = parent;
|
||||
this.setData({
|
||||
size: (_a = this.data.size) !== null && _a !== void 0 ? _a : parent.data.size,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -46,34 +51,24 @@ let Avatar = class Avatar extends SuperComponent {
|
||||
},
|
||||
};
|
||||
this.methods = {
|
||||
updateIsChild(isChild) {
|
||||
this.setData({
|
||||
isChild,
|
||||
});
|
||||
},
|
||||
updateShow() {
|
||||
hide() {
|
||||
this.setData({
|
||||
isShow: false,
|
||||
});
|
||||
},
|
||||
updateSize(size) {
|
||||
if (this.properties.size)
|
||||
return;
|
||||
this.setData({ size });
|
||||
},
|
||||
updateCascading(zIndex) {
|
||||
this.setData({ zIndex });
|
||||
},
|
||||
onLoadError(e) {
|
||||
if (this.properties.hideOnLoadFailed) {
|
||||
this.setData({
|
||||
isShow: false,
|
||||
});
|
||||
}
|
||||
this.triggerEvent('error', e.detail);
|
||||
},
|
||||
};
|
||||
}
|
||||
onLoadError(e) {
|
||||
if (this.properties.hideOnLoadFailed) {
|
||||
this.setData({
|
||||
isShow: false,
|
||||
});
|
||||
}
|
||||
this.triggerEvent('error', e.detail);
|
||||
}
|
||||
};
|
||||
Avatar = __decorate([
|
||||
wxComponent()
|
||||
|
||||
Reference in New Issue
Block a user