按钮状态显示
This commit is contained in:
@@ -59,18 +59,26 @@ const rules = reactive({
|
||||
});
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = () => {
|
||||
proxy.$refs.modalFormRef.validate((valid) => {
|
||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||
if (!valid) {
|
||||
api.value(id.value,form).then(response => {
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
if(response.code==200){
|
||||
Message.success("取消成功");
|
||||
const {code}= await api.value(id.value,form);
|
||||
if(code==200){
|
||||
Message.success("取消成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChange',true);
|
||||
})
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChange',true);
|
||||
// api.value(id.value,form).then(response => {
|
||||
// // Akiraka 20230210 关闭弹窗
|
||||
// if(response.code==200){
|
||||
// Message.success("取消成功");
|
||||
// proxy.$refs.modalFormRef.resetFields();
|
||||
// }else{
|
||||
// proxy.$notification.error(response.message);
|
||||
// }
|
||||
// emits('closeChange',true);
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, toRefs, getCurrentInstance } from 'vue';
|
||||
import {toRefs, getCurrentInstance } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
@@ -44,16 +44,24 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = () => {
|
||||
api.value(id.value).then(response => {
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
if(response.code==200){
|
||||
Message.success("成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChangeOk',true);
|
||||
})
|
||||
const handleConfirm = async () => {
|
||||
const {code}=api.value(id.value);
|
||||
if(code==200){
|
||||
Message.success("成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChangeOk',true);
|
||||
// api.value(id.value).then(response => {
|
||||
// // Akiraka 20230210 关闭弹窗
|
||||
// if(response.code==200){
|
||||
// Message.success("成功");
|
||||
// proxy.$refs.modalFormRef.resetFields();
|
||||
// }else{
|
||||
// proxy.$notification.error(response.message);
|
||||
// }
|
||||
// emits('closeChangeOk',true);
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user