Commit 358bae43 authored by 李维's avatar 李维

修正看动画页面缓存上个页面内容的问题

parent 08e9d720
...@@ -57,6 +57,9 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass { ...@@ -57,6 +57,9 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass {
beforeMount(data: any): void { beforeMount(data: any): void {
this.updateTitle(""); this.updateTitle("");
const sv = this.scrollView.getComponent(cc.ScrollView);
sv.content.destroyAllChildren();
sv.content.removeAllChildren();
} }
initUI() { initUI() {
...@@ -107,7 +110,8 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass { ...@@ -107,7 +110,8 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass {
const itemArr = this.getItemArr(this.data); const itemArr = this.getItemArr(this.data);
const sv = svNode.getComponent(cc.ScrollView); const sv = svNode.getComponent(cc.ScrollView);
sv.content.removeAllChildren() sv.content.destroyAllChildren();
sv.content.removeAllChildren();
// sv.content.height=0 // sv.content.height=0
let _rowCnt = 3 let _rowCnt = 3
for (let i = 0; i < Math.ceil(itemArr.length / _rowCnt); i++) { for (let i = 0; i < Math.ceil(itemArr.length / _rowCnt); i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment