我无法完成挑战“亲身体验新警报、确认和提示模块和组件”。我很确定这个挑战有一个错误,我想知道我犯了一个错误,或者这个挑战有错误。
分配:
import { LightningElement, api } from "lwc";
export default
class recordCardQuickFiles extends LightningElement {
@api
recordId;
onDeleteAllFilesButtonClick() {
const confirmation = confirm("Are you sure you want to delete all files?");
if (confirmation) {
//... proceed with
//... Apex Logic to delete Files.
//... We will not check this comment.
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的解决方案:
import { LightningElement, api } from "lwc";
import LightningConfirm from "lightning/confirm";
export default …Run Code Online (Sandbox Code Playgroud)