Lines Matching refs:childList

777   childList: ChildList;
778 constructor(childList: ChildList) {
779 this.childList = childList;
783 this.childList = tempList;
787 this.childList = []
792 @Link childList: ChildList;
808 let index = this.childList.findIndex((item) => {
812 this.childList.splice(index, 1);
832 @ObjectLink@Watch('changeChildList') childList: ChildList;
846 ForEach(this.childList, (item: Child, index) => {
849 childList: this.childList,
867 CompList({ childList: this.ancestor.childList })
887 …@State childList: ChildList = [new Child(1), new Child(2), new Child(3), new Child(4),new Child(5)…
888 @State ancestor: Ancestor = new Ancestor(this.childList)
904 代码中对数据源childList重新赋值时,是通过Ancestor对象的方法loadData。
909 this.childList = tempList;
913childList指向了tempList。但是这里创建的Child[]类型的数组tempList其实并没有能被观测的能力(也就说它的变化无法主动触发UI刷新)。当它被赋值给childList之后,…
915 有些开发者会注意到,在Page中初始化定义childList的时候,也是以这样一种方法去进行初始化的。
918 @State childList: ChildList = [new Child(1), new Child(2), new Child(3), new Child(4),new Child(5)];
919 @State ancestor: Ancestor = new Ancestor(this.childList)
922 但是由于这里的childList实际上是被@State装饰了,根据当前状态管理的观测能力,尽管右边赋值的是一个Child[]类型的数据,它并没有被@Observed装饰,这里的childList却依…
939 childList: ChildList;
940 constructor(childList: ChildList) {
941 this.childList = childList;
948 this.childList = tempList;
952 this.childList = []
957 @Link childList: ChildList;
973 let index = this.childList.findIndex((item) => {
977 this.childList.splice(index, 1);
997 @ObjectLink@Watch('changeChildList') childList: ChildList;
1011 ForEach(this.childList, (item: Child, index) => {
1014 childList: this.childList,
1032 CompList({ childList: this.ancestor.childList })
1052 …@State childList: ChildList = [new Child(1), new Child(2), new Child(3), new Child(4),new Child(5)…
1053 @State ancestor: Ancestor = new Ancestor(this.childList)
1075 this.childList = tempList;
1079 ChildList类型在定义的时候使用了@Observed进行装饰,所以用new创建的对象tempList具有被观测的能力,因此在点击“X”按钮删除其中一条内容时,变量childList就能够观测到…