Skip to content

代码片段

基本使用

参考案例

vue
<script setup lang="ts">
    import { CodeMirror } from 'vue-hkp-ui'
    import { ref } from 'vue'
    const code = ref(
        `<script setup lang="ts">
            import { dateFormat, requestAnimationFrame, cancelAnimationFrame, rafTimeout, cancelRaf } from 'vue-hkp-ui'
        <\/script>`
    )
</script>
<template>
  <CodeMirror code="666" dark :codeStyle="{ width: '100%', height: '200px', fontSize: '13px' }"/>
</template>

Released under the MIT License.