Commit 9cd293c283ede7391ccd36e2208ae68cbad66453

Authored by Mikasa33
Committed by GitHub
1 parent 2f8b2183

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

src/components/CodeEditor/src/CodeEditor.vue
1 1 <template>
2 2 <div class="h-full">
3   - <CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" />
  3 + <CodeMirrorEditor :value="getValue" @change="handleValueChange" :mode="mode" :readonly="readonly" />
4 4 </div>
5 5 </template>
6 6 <script lang="ts">
... ... @@ -24,6 +24,10 @@
24 24 type: String,
25 25 default: MODE.JSON,
26 26 },
  27 + readonly: {
  28 + type: Boolean,
  29 + default: false,
  30 + },
27 31 },
28 32 emits: ['change'],
29 33 setup(props, { emit }) {
... ...