(message)
| 1151 | } |
| 1152 | |
| 1153 | showError(message) { |
| 1154 | // 创建更好的错误显示 |
| 1155 | const errorDiv = document.createElement('div'); |
| 1156 | errorDiv.className = 'error-message'; |
| 1157 | errorDiv.style.cssText = ` |
| 1158 | position: fixed; |
| 1159 | top: 20px; |
| 1160 | right: 20px; |
| 1161 | background: #f44336; |
| 1162 | color: white; |
| 1163 | padding: 16px 24px; |
| 1164 | border-radius: 8px; |
| 1165 | box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3); |
| 1166 | z-index: 1000; |
| 1167 | max-width: 400px; |
| 1168 | font-size: 14px; |
| 1169 | line-height: 1.4; |
| 1170 | `; |
| 1171 | errorDiv.textContent = message; |
| 1172 | |
| 1173 | document.body.appendChild(errorDiv); |
| 1174 | |
| 1175 | // 3秒后自动消失 |
| 1176 | setTimeout(() => { |
| 1177 | if (errorDiv.parentNode) { |
| 1178 | errorDiv.parentNode.removeChild(errorDiv); |
| 1179 | } |
| 1180 | }, 3000); |
| 1181 | |
| 1182 | this.hideProgress(); |
| 1183 | } |
| 1184 | |
| 1185 | showSuccess(message) { |
| 1186 | // 创建成功提示 |
no test coverage detected