Commit 68ba91db authored by liujiangnan's avatar liujiangnan

debug

parent a7694f68
......@@ -285,10 +285,12 @@ export default class NewClass extends cc.Component {
itemClone.active = true;
cc.find("word", itemClone).getComponent(cc.Label).string = word.text;
if (word.pic_url) {
itemClone.height = 220;
getSpriteFrimeByUrl(word.pic_url, (spriteFrame) => {
cc.find("pic", itemClone).getComponent(cc.Sprite).spriteFrame = spriteFrame;
});
} else {
itemClone.height = 40;
cc.find("pic", itemClone).active = false;
}
}
......
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