fix: 优化变量列表组件
This commit is contained in:
parent
11fe52ce49
commit
b45f6f087a
|
@ -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';
|
||||
|
|
|
@ -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 },
|
||||
|
|
Loading…
Reference in New Issue