Skip to content

Commit

Permalink
fix(CodeEditor): add readonly prop (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikasa33 committed May 7, 2021
1 parent 2f8b218 commit 9cd293c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/CodeEditor/src/CodeEditor.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="h-full">
<CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" />
<CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" :readonly="readonly" />
</div>
</template>
<script lang="ts">
Expand All @@ -24,6 +24,10 @@
type: String,
default: MODE.JSON,
},
readonly: {
type: Boolean,
default: false,
},
},
emits: ['change'],
setup(props, { emit }) {
Expand Down

0 comments on commit 9cd293c

Please sign in to comment.