test-cancel-dialog.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>测试取消原因对话框</title>
  5. <style>
  6. body { font-family: Arial, sans-serif; padding: 20px; }
  7. button { padding: 10px 20px; margin: 10px; cursor: pointer; }
  8. .debug { background: #f0f0f0; padding: 10px; margin: 10px 0; border-radius: 5px; }
  9. </style>
  10. </head>
  11. <body>
  12. <h1>测试取消原因对话框</h1>
  13. <button onclick="openDialog()">打开取消原因对话框</button>
  14. <div class="debug">
  15. <h3>调试信息:</h3>
  16. <div id="debug-info"></div>
  17. </div>
  18. <script>
  19. function openDialog() {
  20. // 模拟打开对话框
  21. const debugInfo = document.getElementById('debug-info');
  22. debugInfo.innerHTML = '对话框已打开,请检查浏览器控制台查看详细调试信息';
  23. // 这里无法直接测试React组件,但可以检查是否有其他问题
  24. console.log('测试:请在实际应用中测试取消原因对话框');
  25. console.log('检查:1. 点击原因选项是否有选中状态');
  26. console.log('检查:2. 点击确认按钮是否调用onConfirm');
  27. console.log('检查:3. 选中状态是否正确显示');
  28. }
  29. </script>
  30. </body>
  31. </html>