mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-04 09:15:16 +00:00
feat: tree 组件修改
This commit is contained in:
parent
c3e6b4b35f
commit
7efa52f434
@ -12032,38 +12032,14 @@
|
|||||||
"subName": ""
|
"subName": ""
|
||||||
},
|
},
|
||||||
"props": [
|
"props": [
|
||||||
{
|
|
||||||
"name": "prefix",
|
|
||||||
"propType": "string",
|
|
||||||
"defaultValue": "next-"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "rtl",
|
|
||||||
"propType": "bool",
|
|
||||||
"defaultValue": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pure",
|
|
||||||
"propType": "bool",
|
|
||||||
"defaultValue": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "className",
|
"name": "className",
|
||||||
"propType": "string"
|
"propType": "string"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "children",
|
|
||||||
"propType": {
|
|
||||||
"type": "instanceOf",
|
|
||||||
"value": "node"
|
|
||||||
},
|
|
||||||
"description": "树节点"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "dataSource",
|
"name": "dataSource",
|
||||||
"propType": {
|
"propType": {
|
||||||
"type": "instanceOf",
|
"type": "Json"
|
||||||
"value": "array"
|
|
||||||
},
|
},
|
||||||
"description": "数据源,该属性优先级高于 children"
|
"description": "数据源,该属性优先级高于 children"
|
||||||
},
|
},
|
||||||
@ -12187,22 +12163,22 @@
|
|||||||
{
|
{
|
||||||
"name": "canDrop",
|
"name": "canDrop",
|
||||||
"propType": "func",
|
"propType": "func",
|
||||||
"description": "节点是否可被作为拖拽的目标节点\n@param {Object} info 拖拽信息\n@param {Object} info.node 目标节点\n@param {Object} info.dragNode 拖拽的节点\n@param {Array} info.dragNodesKeys 拖拽的节点和其子节点 key 的数组\n@param {Number} info.dropPosition 放置位置,-1代表当前节点前,0代表当前节点里,1代表当前节点后\n@return {Boolean} 是否可以被当作目标节点"
|
"description": "节点是否可被作为拖拽的目标节点"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "loadData",
|
"name": "loadData",
|
||||||
"propType": "func",
|
"propType": "func",
|
||||||
"description": "异步加载数据的函数\n@param {Object} node 被点击展开的节点"
|
"description": "异步加载数据的函数"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "filterTreeNode",
|
"name": "filterTreeNode",
|
||||||
"propType": "func",
|
"propType": "func",
|
||||||
"description": "按需筛选高亮节点\n@param {Object} node 待筛选的节点\n@return {Boolean} 是否被筛选中"
|
"description": "按需筛选高亮节点"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "onRightClick",
|
"name": "onRightClick",
|
||||||
"propType": "func",
|
"propType": "func",
|
||||||
"description": "右键点击节点时触发的回调函数\n@param {Object} info 信息对象\n@param {Object} info.event 事件对象\n@param {Object} info.node 点击的节点"
|
"description": "右键点击节点时触发的回调函数"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "isLabelBlock",
|
"name": "isLabelBlock",
|
||||||
@ -12212,13 +12188,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "isNodeBlock",
|
"name": "isNodeBlock",
|
||||||
"propType": {
|
"propType": "bool",
|
||||||
"type": "oneOfType",
|
|
||||||
"value": [
|
|
||||||
"bool",
|
|
||||||
"object"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "设置节点是否占满一行",
|
"description": "设置节点是否占满一行",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
@ -12236,17 +12206,12 @@
|
|||||||
{
|
{
|
||||||
"name": "renderChildNodes",
|
"name": "renderChildNodes",
|
||||||
"propType": "func",
|
"propType": "func",
|
||||||
"description": "渲染子节点\n@param {Array<ReactNode>} nodes 所有的子节点\n@return {ReactNode} 返回节点"
|
"description": "渲染子节点"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "focusable",
|
"name": "useVirtual",
|
||||||
"propType": "bool",
|
"propType": "bool",
|
||||||
"defaultValue": true
|
"description": "是否开启虚拟滚动"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "autoFocus",
|
|
||||||
"propType": "bool",
|
|
||||||
"defaultValue": false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "onItemFocus",
|
"name": "onItemFocus",
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export default class FunctionSetter extends PureComponent<FunctionSetterProps, {
|
|||||||
* 渲染按钮(初始状态)
|
* 渲染按钮(初始状态)
|
||||||
*/
|
*/
|
||||||
renderButton = () => {
|
renderButton = () => {
|
||||||
return <Button type="primary" onClick={() => this.bindFunction()}>绑定函数</Button>
|
return <Button type="normal" onClick={() => this.bindFunction()}>绑定函数</Button>
|
||||||
}
|
}
|
||||||
|
|
||||||
focusFunctionName = (functionName) => {
|
focusFunctionName = (functionName) => {
|
||||||
|
|||||||
@ -217,7 +217,7 @@ class MonacoEditorDefaultView extends PureComponent {
|
|||||||
width="100%"
|
width="100%"
|
||||||
height="300"
|
height="300"
|
||||||
language={tarLanguage}
|
language={tarLanguage}
|
||||||
theme={theme || window.__monacoTheme || 'vs-dark'}
|
theme={theme || window.__monacoTheme}
|
||||||
options={isFullScreen ? this.fullScreenOptions : this.options}
|
options={isFullScreen ? this.fullScreenOptions : this.options}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
editorWillMount={editorWillMount}
|
editorWillMount={editorWillMount}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user