--- name: edit-submit-loading description: 编辑/新建等确定操作必须加 loading,成功后延时 0.5s 关闭 metadata: type: feedback --- 所有编辑、新建、删除等确定操作按钮必须添加 `:loading` 状态。 **Why:** 用户要求 -- 防止重复提交,给用户操作反馈。 **How to apply:** 1. 在 data 中加 `loading: false` 2. 确认按钮绑定 `:loading="loading"` 3. `onSubmit` 中调用 API 前 `this.loading = true` 4. 成功后 `setTimeout(() => { this.loading = false; ... }, 500)` 延时关闭 涉及状态变更的操作(如启用/停用开关)需要先弹 `this.$confirm` 确认框。