feat: container-custom 也添加 bindings 参数

This commit is contained in:
AncTe committed 2026-11-12 21:27:24 +08:00
1 parent 49124fdc29
commit ca90a221a7
3 files changed
+11 -2

No files matched your search

+5
View File
@@ -188,6 +188,11 @@ export class CustomContainer extends Container {
this.setPropagateFn(nextValue);
return true;
}
case 'bindings': {
if (!this.assertType(nextValue, Array, key)) return false;
this.update();
return true;
}
}
return super.handleProps(key, prevValue, nextValue);
}
+4 -2
View File
@@ -32,14 +32,16 @@ export class CustomRenderItem extends RenderItem {
nextValue: any
): boolean {
switch (key) {
case 'render':
case 'render': {
if (!this.assertType(nextValue, 'function', key)) return false;
this.setRenderFn(nextValue);
return true;
case 'bindings':
}
case 'bindings': {
if (!this.assertType(nextValue, Array, key)) return false;
this.update();
return true;
}
}
return false;
}