Commit ca9812bd by 李伟康

```

fix(usedCar/tool): 调整弹窗按钮回调逻辑顺序

将弹窗的取消和确定按钮中的页面跳转及回调函数调用逻辑移到组件切换逻辑之后,
确保在用户点击确认后再执行页面导航和回调函数,避免逻辑执行顺序问题导致的异常。
```
1 parent 952ea7bd
......@@ -133,21 +133,21 @@ export default {
text: '取消',
type: 'default',
callback: () => {
if (selectedItem) {
// 点击确认后才切换组件
this.toolComponentName = selectedItem.name
this.transmissionOfData = null
}
this.$refs.notice.close()
if (back) uni.navigateBack()
if (callBack && typeof callBack === 'function') callBack()
}
},
{
text: '确定',
type: 'primary',
callback: () => {
if (selectedItem) {
// 点击确认后才切换组件
this.toolComponentName = selectedItem.name
this.transmissionOfData = null
}
this.$refs.notice.close()
if (back) uni.navigateBack()
if (callBack && typeof callBack === 'function') callBack()
}
}
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!