feat(editor): code组件新增height配置

This commit is contained in:
roymondchen 2022-09-26 17:44:41 +08:00 committed by jia000
parent 6cf1f8636c
commit c87e3b2164

View File

@ -19,12 +19,13 @@ const props = defineProps<{
config: {
language?: string;
options?: Object;
height?: string;
};
prop: string;
}>();
const language = computed(() => props.config.language || 'javascript');
const height = computed(() => `${document.body.clientHeight - 168}px`);
const height = computed(() => props.config.height || `${document.body.clientHeight - 168}px`);
const save = (v: string) => {
props.model[props.name] = v;