1.0.1 • Published 5 months ago
monaco-file-tree v1.0.1
Monaco 结合文件树做成简易的Web IDE
安装
npm install monaco-file-tree
pnpm install monaco-file-tree
使用方式
import MonacoFileTree from 'monaco-file-tree'
import "monaco-file-tree/style.css"
<MonacoTree
height="500px"
width="100%"
:readOnly="false"
:allowCheckTs ="true"
/>
说明
目前只支持typescript/javascript的相关功能
参数
export interface IMonacoProps{
/**
* 高度
* @default 100% 默认父元素100%
* @example 500px
* */
height?:string;
/**
* 宽度
* @default 100% 默认父元素100%
* @example 500px
* */
width?:string;
/**
* 主题
* @value 'vs'|'vs-dark'|'hc-black'|'hc-light'
* @default 'vs-dark'
* @example 'vs-dark'
* */
theme?:themeType;
/**
* 是否允许typescript检测和提示
* @default true
* */
allowCheckTs?:boolean;
/**
* 是否可编辑
* @default true
* */
readOnly?:boolean
}