CodeEditor

代码编辑器

Usage

<template>
  <CodeEditor v-model:value="value" :mode="modeValue" />
</template>
<script>
  import { defineComponent, ref } from 'vue';
  export default defineComponent({
    components: { CodeEditor },
    setup() {
      const modeValue = ref('application/json');
      return { value, modeValue };
    },
  });
</script>

Props

属性类型默认值可选值说明
value(v-model:value)any--绑定值
modestringapplication/json'application/json','htmlmixed','javascript'代码类型
readonlyboolean--是否只读