瀏覽代碼

Merge branch 'master' of gitee.com:xiaopubao/aizuda-web-vue3

xlsea 11 月之前
父節點
當前提交
84a793c45b
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 1 1
      src/views/flow/test/business.vue
  2. 3 0
      src/views/flow/test/businessLaunch.vue

+ 1 - 1
src/views/flow/test/business.vue

@@ -65,7 +65,7 @@
 		/>
 
 		<!-- 设计表单 -->
-		<business-launch v-if="drawerVisible" v-model="drawerVisible" :record="record"></business-launch>
+		<business-launch v-if="drawerVisible" v-model="drawerVisible" :record="record" @refresh="refreshEv"></business-launch>
 	</div>
 </template>
 <script lang="tsx" setup>

+ 3 - 0
src/views/flow/test/businessLaunch.vue

@@ -54,10 +54,12 @@ type Props = {
 let cur_processForm_str = '{}'
 
 const updateModelValue = (bool: boolean) => emit('update:modelValue', bool)
+const refreshComponent = (bool: boolean) => emit('refreshEv', bool)
 const props = defineProps<Props>()
 const emit = defineEmits<{
 	'update:modelValue': [bool: boolean] // 具名元组语法
 	update: [value: string]
+	refreshEv: [value: boolean] // 告诉父组件刷新
 }>()
 const validateForm = ref({ loading: false })
 
@@ -138,6 +140,7 @@ const onSubmit = async () => {
 		.then(res => {
 			ElMessage.success('提交成功')
 			updateModelValue(false)
+			refreshComponent(true)
 		})
 		.finally(() => {
 			validateForm.value.loading = false