fix(editor): 修复从dsl初始化时代码块绑定关系未同步的问题,修复一些warning,优化语法报错时保存并关闭的交互逻辑
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineEmits, defineProps, inject, ref, watch, watchEffect } from 'vue';
|
||||
import { computed, defineEmits, defineProps, inject, ref, watchEffect } from 'vue';
|
||||
import { View } from '@element-plus/icons-vue';
|
||||
import { isEmpty, map } from 'lodash-es';
|
||||
import { map } from 'lodash-es';
|
||||
|
||||
import { SelectConfig } from '@tmagic/form';
|
||||
|
||||
@@ -34,7 +34,7 @@ const emit = defineEmits(['change']);
|
||||
|
||||
const props = defineProps<{
|
||||
config: {
|
||||
selectConfig: SelectConfig;
|
||||
selectConfig?: SelectConfig;
|
||||
};
|
||||
model: any;
|
||||
prop: string;
|
||||
@@ -101,15 +101,4 @@ const viewHandler = async () => {
|
||||
await services?.codeBlockService.setMode(EditorMode.LIST);
|
||||
services?.codeBlockService.setCodeEditorContent(true, combineIds.value[0]);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.model[props.name],
|
||||
async (value) => {
|
||||
if (isEmpty(value)) return;
|
||||
await setCombineRelation(value);
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user