mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
fix(动态表单): 移除保存后 $parent.getList 调用避免误报错误
This commit is contained in:
parent
eadf47ba59
commit
51a23926f8
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, getCurrentInstance } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import formCreateFactory from '@form-create/element-ui';
|
||||
import request from '@/libs/request';
|
||||
@ -36,8 +36,6 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['submitFail']);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const modals = ref(false);
|
||||
const loading = ref(false);
|
||||
const fapi = ref(null);
|
||||
@ -86,7 +84,8 @@ function onSubmit(formData) {
|
||||
data: datas,
|
||||
})
|
||||
.then((res) => {
|
||||
if (props.update) proxy.$parent.getList();
|
||||
// 列表刷新走 submitFail 事件(各页面已绑定);Vue3 下 <script setup> 的绑定不经实例代理暴露,
|
||||
// 旧版 proxy.$parent.getList() 必然 TypeError,会把成功的保存误报为错误且弹窗无法关闭
|
||||
ElMessage.success(res.msg);
|
||||
modals.value = false;
|
||||
setTimeout(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user