Unverified Commit 9cd293c2 authored by Mikasa33's avatar Mikasa33 Committed by GitHub

fix(CodeEditor): add readonly prop (#572)

parent 2f8b2183
<template> <template>
<div class="h-full"> <div class="h-full">
<CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" /> <CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" :readonly="readonly" />
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
type: String, type: String,
default: MODE.JSON, default: MODE.JSON,
}, },
readonly: {
type: Boolean,
default: false,
},
}, },
emits: ['change'], emits: ['change'],
setup(props, { emit }) { setup(props, { emit }) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment