tiny-engine-monaco-editor
v0.0.13
Published
可以在tiny-engine中使用的monaco-editor组件
Readme
内置组件
可以在tiny-engine中使用的组件中使用的 monaco-editor
物料协议
{
"data": {
"framework": "Vue",
"materials": {
"components": [
{
"version": "0.0.1",
"name": {
"zh_CN": "代码编辑器"
},
"component": "TinyEngineMonacoEditor",
"icon": "json",
"description": "代码编辑器",
"docUrl": "",
"screenshot": "",
"tags": "",
"keywords": "",
"devMode": "proCode",
"npm": {
"package": "tiny-engine-monaco-editor",
"exportName": "TinyEngineMonacoEditor",
"destructuring": true
},
"group": "basic",
"category": "基础元素",
"priority": 2,
"schema": {
"properties": [
{
"label": {
"zh_CN": "基础信息"
},
"description": {
"zh_CN": "基础信息"
},
"content": [
{
"property": "value",
"type": "string",
"defaultValue": "",
"bindState": true,
"label": {
"text": {
"zh_CN": "代码内容"
}
},
"cols": 12,
"rules": [],
"widget": {
"component": "CodeConfigurator",
"props": {
"language": "text"
}
},
"description": {
"zh_CN": "编辑器代码内容"
}
},
{
"property": "original",
"type": "string",
"defaultValue": "",
"bindState": true,
"label": {
"text": {
"zh_CN": "原始代码内容"
}
},
"cols": 12,
"rules": [],
"widget": {
"component": "CodeConfigurator",
"props": {
"language": "text"
}
},
"description": {
"zh_CN": "编辑器原始代码内容,只有开启了diff(差异)功能时才会生效"
}
} ,
{
"property": "placeholder",
"type": "string",
"defaultValue": "",
"bindState": true,
"label": {
"text": {
"zh_CN": "占位代码"
}
},
"cols": 12,
"rules": [],
"widget": {
"component": "CodeConfigurator",
"props": {
"language": "text"
}
},
"description": {
"zh_CN": "代码编辑器为空时显示的占位代码"
}
},
{
"property": "options",
"type": "string",
"defaultValue": "",
"bindState": true,
"label": {
"text": {
"zh_CN": "编辑器选项"
}
},
"cols": 12,
"rules": [],
"widget": {
"component": "CodeConfigurator",
"props": {
"language": "json"
}
},
"description": {
"zh_CN": "编辑器选项"
}
},
{
"property": "language",
"label": {
"text": {
"zh_CN": "语言"
}
},
"description": {
"zh_CN": "编辑器当前语言"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"defaultValue": "",
"widget": {
"component": "SelectConfigurator",
"props": {
"options": [
{
"label": "JavaScript",
"value": "javascript"
},
{
"label": "TypeScript",
"value": "typescript"
},
{
"label": "CSS",
"value": "css"
},
{
"label": "HTML",
"value": "html"
},
{
"label": "JSON",
"value": "json"
},
{
"label": "Markdown",
"value": "markdown"
},
{
"label": "Java",
"value": "java"
},
{
"label": "SQL",
"value": "sql"
},
{
"label": "Python",
"value": "python"
}
]
}
}
},
{
"property": "theme",
"label": {
"text": {
"zh_CN": "主题"
}
},
"description": {
"zh_CN": "编辑器当前主题"
},
"required": false,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"defaultValue": "",
"widget": {
"component": "SelectConfigurator",
"props": {
"options": [
{
"label": "浅色",
"value": "vs"
},
{
"label": "深色",
"value": "vs-dark"
},
{
"label": "高对比度浅色",
"value": "hc-light"
},
{
"label": "高对比度深色",
"value": "hc-black"
}
]
}
}
},
{
"property": "diffEditor",
"label": {
"text": {
"zh_CN": "启用差异"
}
},
"description": {
"zh_CN": "是否启用差异编辑器"
},
"required": false,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "left",
"defaultValue": false,
"type": "boolean",
"widget": {
"component": "CheckBoxConfigurator",
"props": {}
},
"device": []
}
]
}
],
"events": {
"onChange": {
"label": {
"zh_CN": "代码改变时触发"
},
"description": {
"zh_CN": "代码改变时触发"
}
},
"onEditorWillMount": {
"label": {
"zh_CN": "代码编辑器挂载时触发"
},
"description": {
"zh_CN": "代码编辑器挂载时触发"
}
},
"onEditorDidMount": {
"label": {
"zh_CN": "代码编辑器卸载时触发"
},
"description": {
"zh_CN": "代码编辑器卸载时触发"
}
},
"onShortcutSave": {
"label": {
"zh_CN": "代码保存时触发"
},
"description": {
"zh_CN": "代码保存时触发"
}
}
}
},
"configure": {
"loop": true,
"condition": true,
"styles": true,
"isContainer": false,
"isModal": false,
"nestingRule": {
"childWhitelist": [],
"parentWhitelist": "",
"descendantBlacklist": "",
"ancestorWhitelist": ""
},
"isNullNode": false,
"isLayout": false,
"rootSelector": "",
"shortcuts": {
"properties": [
"disabled",
"size"
]
},
"contextMenu": {
"actions": [
"create symbol"
],
"disable": [
"copy",
"remove"
]
}
}
}
],
"blocks": [],
"snippets": [
{
"group": "basic",
"label": {
"zh_CN": "基础元素"
},
"children": [
{
"name": {
"zh_CN": "代码编辑器"
},
"icon": "json",
"screenshot": "",
"snippetName": "TinyEngineMonacoEditor",
"schema": {
"props": {
"language": "javascript"
}
}
}
]
}
],
"packages": [
{
"name": "Huqs",
"package": "tiny-engine-monaco-editor",
"version": "1.0.0",
"destructuring": true,
"script": "https://registry.npmmirror.com/[email protected]/dist/index.mjs",
"css": ""
}
]
}
}
}
