mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-23 09:52:51 +08:00
feat(editor): code组件新增height配置
This commit is contained in:
parent
6cf1f8636c
commit
c87e3b2164
@ -19,12 +19,13 @@ const props = defineProps<{
|
|||||||
config: {
|
config: {
|
||||||
language?: string;
|
language?: string;
|
||||||
options?: Object;
|
options?: Object;
|
||||||
|
height?: string;
|
||||||
};
|
};
|
||||||
prop: string;
|
prop: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const language = computed(() => props.config.language || 'javascript');
|
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) => {
|
const save = (v: string) => {
|
||||||
props.model[props.name] = v;
|
props.model[props.name] = v;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user