attributes_delete.ts 619 B

12345678910111213141516171819202122232425
  1. import { _decorator, Component, Node } from 'cc';
  2. import { tools } from '../../tools';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('attributes_delete')
  5. export class attributes_delete extends Component {
  6. private call_back = null;
  7. @property(Node) btn_delete:Node = null;
  8. start() {
  9. this.btn_delete.on(Node.EventType.TOUCH_END,()=>{
  10. if(this.call_back!=null){
  11. tools.show_dialog("是否删除当前控件",()=>{
  12. this.call_back()
  13. })
  14. }
  15. })
  16. }
  17. public initView(call){
  18. this.call_back = call;
  19. }
  20. }