1
chenjingwu
2024-04-10 5d0b45a82e2452f9f88cfaa958d053405092265c
force-app/main/default/lwc/lexNewSolutionProgramma/lexNewSolutionProgramma.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-06-26 11:10:52
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:36:31
 * @LastEditTime: 2023-10-10 17:37:14
 */
import { api, wire,LightningElement } from 'lwc';
@@ -41,13 +41,22 @@
    }
  }
  showToast(msg,type) {
    const event = new ShowToastEvent({
        title: ' ',
        message: msg,
        variant: type,
        mode: 'sticky'
    });
    this.dispatchEvent(event);
    if(type == 'success'){
        const event = new ShowToastEvent({
            message: msg,
            variant: type,
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }else{
        const event = new ShowToastEvent({
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
  connectedCallback(){
    Promise.all([