Pr/code editor boardered (#3142)

* feat: 为CodeEditor添加bordered属性

* fix: 去除重复的ant-inputclass

---------

Co-authored-by: wuzhican <3245076860@qq.com>
This commit is contained in:
wuzhican 2023-10-12 17:16:54 +08:00 committed by GitHub
parent f87e078402
commit 4b46be4a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,7 @@
@change="handleValueChange"
:mode="mode"
:readonly="readonly"
:bordered="bordered"
/>
</div>
</template>
@ -26,6 +27,7 @@
},
readonly: { type: Boolean },
autoFormat: { type: Boolean, default: true },
bordered: { type: Boolean, default: false },
});
const emit = defineEmits(['change', 'update:value', 'format-error']);

View File

@ -1,5 +1,9 @@
<template>
<div class="relative !h-full w-full overflow-hidden" ref="el"></div>
<div
class="relative !h-full w-full overflow-hidden"
:class="{ 'ant-input': props.bordered, 'css-dev-only-do-not-override-kqecok': props.bordered }"
ref="el"
></div>
</template>
<script lang="ts" setup>
@ -39,6 +43,7 @@
},
value: { type: String, default: '' },
readonly: { type: Boolean, default: false },
bordered: { type: Boolean, default: false },
});
const emit = defineEmits(['change']);