mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
feat(editor): code组件新增height配置
This commit is contained in:
parent
6cf1f8636c
commit
c87e3b2164
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user