一个confirm方法组件,显示一个确认对话框,调用并返回一个promise,通过resolve的参数获取用户是否点击了确定按钮。This component will display a popup with a confirm button. This function will return a Promise where you can get the click result.