This commit is contained in:
2024-01-23 11:05:18 +08:00
parent d5cadf954f
commit 434c4497a9

View File

@@ -56,9 +56,8 @@ function onChange(v: string) {
} }
</script> </script>
<template> <template>
<div class="container"> <n-flex align="center" class="header">
<n-flex align="center" class="title"> <span class="title">{{ label }}</span>
<span>{{ label }}</span>
<slot name="actions"></slot> <slot name="actions"></slot>
</n-flex> </n-flex>
<Codemirror <Codemirror
@@ -68,21 +67,20 @@ function onChange(v: string) {
:disabled="props.readonly" :disabled="props.readonly"
:tabSize="4" :tabSize="4"
:placeholder="props.placeholder" :placeholder="props.placeholder"
:style="{ height: '100%', fontSize: props.fontSize + 'px' }" :style="{
height: 'calc(100% - 60px)',
fontSize: props.fontSize + 'px',
}"
@change="onChange" @change="onChange"
/> />
</div>
</template> </template>
<style scoped> <style scoped>
.container { .header {
height: 100%;
}
.title {
padding: 12px 20px; padding: 12px 20px;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
} }
.title > span { .title {
font-size: 16px; font-size: 16px;
} }
</style> </style>