|
@@ -1,4 +1,4 @@
|
|
|
-import { _decorator, Component, Node } from 'cc';
|
|
|
+import { _decorator, Component, Node, Sprite, SpriteFrame } from 'cc';
|
|
|
import { view_ui_att_item } from './view_ui_att_item';
|
|
|
import { not_have_interact_data } from '../../../data/data';
|
|
|
const { ccclass, property } = _decorator;
|
|
@@ -6,6 +6,7 @@ const { ccclass, property } = _decorator;
|
|
|
@ccclass('view_not_have_interact')
|
|
|
export class view_not_have_interact extends Component {
|
|
|
@property(Node) bg:Node = null;
|
|
|
+ @property(SpriteFrame) sf_bg_default:SpriteFrame = null;
|
|
|
private m_data:not_have_interact_data = null;
|
|
|
public updateView(data:not_have_interact_data){
|
|
|
if(data===null){
|
|
@@ -14,6 +15,9 @@ export class view_not_have_interact extends Component {
|
|
|
this.m_data = data;
|
|
|
this.bg.getComponent(view_ui_att_item).updateAtt(data.bg)
|
|
|
data.bg = this.bg.getComponent(view_ui_att_item).getData()
|
|
|
+ if(this.m_data.bg.res.length==0||this.m_data.bg.res_name.length==0) {
|
|
|
+ this.bg.getComponent(view_ui_att_item).getComponent(Sprite).spriteFrame = this.sf_bg_default
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public getData(){
|