fix: 优化变量列表组件

This commit is contained in:
JiangQiming 2023-01-28 16:25:31 +08:00
parent 11fe52ce49
commit b45f6f087a
2 changed files with 3 additions and 4 deletions

View File

@ -113,14 +113,12 @@ const dataSource = computed({
watch(
() => dataSource.value,
(val) => {
console.log('dataSource.value : ', val);
emit('update:variableDefinitions', val)
emit('update:variableDefinitions', val);
},
{ deep: true },
);
const handleTypeChange = (record: IVariable) => {
console.log('record.type: ', record.type);
switch (record.type) {
case 'string':
record.format = '%s';

View File

@ -534,7 +534,7 @@ watch(
);
computed(() => {
console.log('formData.value.type: ', formData.value.type);
// console.log('formData.value.type: ', formData.value.type);
Object.assign(
formData.value.template,
TEMPLATE_FIELD_MAP[formData.value.type][formData.value.provider],
@ -576,6 +576,7 @@ const { resetFields, validate, validateInfos, clearValidate } = useForm(
watch(
() => formData.value.type,
() => {
formData.value.variableDefinitions = []
clearValidate();
},
{ deep: true },