mirror of
https://github.com/motajs/template.git
synced 2026-11-21 04:04:30 +08:00
feat: container-custom 也添加 bindings 参数
This commit is contained in:
1 parent
49124fdc29
commit
ca90a221a7
3 files changed
+11
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user