fix: 错误使用的defineModel
This commit is contained in:
		
							parent
							
								
									f70d061e2a
								
							
						
					
					
						commit
						ae847e9f87
					
				@ -46,9 +46,7 @@ const visible = defineModel<boolean>('visible', {
 | 
				
			|||||||
  default: false
 | 
					  default: false
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const options = defineModel<CommonType.Option<string | number>[]>('options', {
 | 
					const notifySceneOptions = ref<CommonType.Option<string | number>[]>(translateOptions(retryNotifySceneOptions));
 | 
				
			||||||
  default: translateOptions(retryNotifySceneOptions)
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const { formRef, validate, restoreValidation } = useNaiveForm();
 | 
					const { formRef, validate, restoreValidation } = useNaiveForm();
 | 
				
			||||||
const { defaultRequiredRule } = useFormRules();
 | 
					const { defaultRequiredRule } = useFormRules();
 | 
				
			||||||
@ -209,11 +207,11 @@ async function systemTaskTypeChange(value: number) {
 | 
				
			|||||||
  if (value === 1) {
 | 
					  if (value === 1) {
 | 
				
			||||||
    const res = await fetchGetRetrySceneList({ groupName: model.groupName });
 | 
					    const res = await fetchGetRetrySceneList({ groupName: model.groupName });
 | 
				
			||||||
    retryScenes.value = res.data as Api.RetryScene.Scene[];
 | 
					    retryScenes.value = res.data as Api.RetryScene.Scene[];
 | 
				
			||||||
    options.value = translateOptions(retryNotifySceneOptions);
 | 
					    notifySceneOptions.value = translateOptions(retryNotifySceneOptions);
 | 
				
			||||||
  } else if (value === 3) {
 | 
					  } else if (value === 3) {
 | 
				
			||||||
    const res = await fetchGetJobList({ groupName: model.groupName });
 | 
					    const res = await fetchGetJobList({ groupName: model.groupName });
 | 
				
			||||||
    jobs.value = res.data as Api.Job.Job[];
 | 
					    jobs.value = res.data as Api.Job.Job[];
 | 
				
			||||||
    options.value = translateOptions(jobNotifySceneOptions);
 | 
					    notifySceneOptions.value = translateOptions(jobNotifySceneOptions);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  model.businessId = '';
 | 
					  model.businessId = '';
 | 
				
			||||||
@ -288,7 +286,7 @@ watch(visible, () => {
 | 
				
			|||||||
        <NSelect
 | 
					        <NSelect
 | 
				
			||||||
          v-model:value="model.notifyScene"
 | 
					          v-model:value="model.notifyScene"
 | 
				
			||||||
          :placeholder="$t('page.notifyConfig.form.notifyScene')"
 | 
					          :placeholder="$t('page.notifyConfig.form.notifyScene')"
 | 
				
			||||||
          :options="options"
 | 
					          :options="notifySceneOptions"
 | 
				
			||||||
          clearable
 | 
					          clearable
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </NFormItem>
 | 
					      </NFormItem>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user