trs-code-editor
v0.0.13
Published
## 安装
Downloads
51
Readme
trs-code-editor
安装
$ npm i -S trs-code-editor@latest
使用
<script lang="ts" setup>
import { TrsCodeEditor } from 'trs-code-editor'; // 引入资源
import 'trs-code-editor/dist/style.css'; // 引入样式资源
const jsonStr = ref('');
const update = newCode => {
// newCode 为编辑器中最新的代码字符串
}
</script>
<template>
<TrsCodeEditor
:code-str="jsonStr"
:default-value="jsonStr"
@update="update">
</TrsCodeEditor>
</template>