feat: fix typo

This commit is contained in:
pengfei.zhou
2021-11-25 12:00:58 +08:00
committed by osborn
parent 3b901cae90
commit 62a8357d77
13 changed files with 257 additions and 8 deletions

View File

@@ -18,4 +18,17 @@ export declare class BlurEffect extends Stack {
*/
radius?: number;
}
export declare class AeroEffect extends Stack {
/**
* Specify the effective rectangle.
* If not set, the default is the entire area.
*/
effectiveRect?: {
x: number;
y: number;
width: number;
height: number;
};
}
export declare function blurEffect(views: View | View[], config?: Partial<BlurEffect>): BlurEffect;
export declare function aeroEffect(views: View | View[], config?: Partial<AeroEffect>): AeroEffect;

View File

@@ -35,6 +35,12 @@ __decorate([
Property,
__metadata("design:type", Number)
], BlurEffect.prototype, "radius", void 0);
export class AeroEffect extends Stack {
}
__decorate([
Property,
__metadata("design:type", Object)
], AeroEffect.prototype, "effectiveRect", void 0);
export function blurEffect(views, config) {
const ret = new BlurEffect;
ret.layoutConfig = layoutConfig().fit();
@@ -51,3 +57,19 @@ export function blurEffect(views, config) {
}
return ret;
}
export function aeroEffect(views, config) {
const ret = new AeroEffect;
ret.layoutConfig = layoutConfig().fit();
if (views instanceof View) {
ret.addChild(views);
}
else {
views.forEach(e => {
ret.addChild(e);
});
}
if (config) {
ret.apply(config);
}
return ret;
}