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

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

parent 08e9d720
......@@ -57,6 +57,9 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass {
beforeMount(data: any): void {
this.updateTitle("");
const sv = this.scrollView.getComponent(cc.ScrollView);
sv.content.destroyAllChildren();
sv.content.removeAllChildren();
}
initUI() {
......@@ -107,7 +110,8 @@ export default class LibraryVideoPageClass extends PageComponentBaseClass {
const itemArr = this.getItemArr(this.data);
const sv = svNode.getComponent(cc.ScrollView);
sv.content.removeAllChildren()
sv.content.destroyAllChildren();
sv.content.removeAllChildren();
// sv.content.height=0
let _rowCnt = 3
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