feat: tree 组件修改

This commit is contained in:
zude.hzd 2020-08-21 14:13:56 +08:00
parent c3e6b4b35f
commit 7efa52f434
3 changed files with 11 additions and 46 deletions

View File

@ -12032,38 +12032,14 @@
"subName": ""
},
"props": [
{
"name": "prefix",
"propType": "string",
"defaultValue": "next-"
},
{
"name": "rtl",
"propType": "bool",
"defaultValue": false
},
{
"name": "pure",
"propType": "bool",
"defaultValue": false
},
{
"name": "className",
"propType": "string"
},
{
"name": "children",
"propType": {
"type": "instanceOf",
"value": "node"
},
"description": "树节点"
},
{
"name": "dataSource",
"propType": {
"type": "instanceOf",
"value": "array"
"type": "Json"
},
"description": "数据源,该属性优先级高于 children"
},
@ -12187,22 +12163,22 @@
{
"name": "canDrop",
"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",
"propType": "func",
"description": "异步加载数据的函数\n@param {Object} node 被点击展开的节点"
"description": "异步加载数据的函数"
},
{
"name": "filterTreeNode",
"propType": "func",
"description": "按需筛选高亮节点\n@param {Object} node 待筛选的节点\n@return {Boolean} 是否被筛选中"
"description": "按需筛选高亮节点"
},
{
"name": "onRightClick",
"propType": "func",
"description": "右键点击节点时触发的回调函数\n@param {Object} info 信息对象\n@param {Object} info.event 事件对象\n@param {Object} info.node 点击的节点"
"description": "右键点击节点时触发的回调函数"
},
{
"name": "isLabelBlock",
@ -12212,13 +12188,7 @@
},
{
"name": "isNodeBlock",
"propType": {
"type": "oneOfType",
"value": [
"bool",
"object"
]
},
"propType": "bool",
"description": "设置节点是否占满一行",
"defaultValue": false
},
@ -12236,17 +12206,12 @@
{
"name": "renderChildNodes",
"propType": "func",
"description": "渲染子节点\n@param {Array<ReactNode>} nodes 所有的子节点\n@return {ReactNode} 返回节点"
"description": "渲染子节点"
},
{
"name": "focusable",
"name": "useVirtual",
"propType": "bool",
"defaultValue": true
},
{
"name": "autoFocus",
"propType": "bool",
"defaultValue": false
"description": "是否开启虚拟滚动"
},
{
"name": "onItemFocus",

View File

@ -72,7 +72,7 @@ export default class FunctionSetter extends PureComponent<FunctionSetterProps, {
* ()
*/
renderButton = () => {
return <Button type="primary" onClick={() => this.bindFunction()}></Button>
return <Button type="normal" onClick={() => this.bindFunction()}></Button>
}
focusFunctionName = (functionName) => {

View File

@ -217,7 +217,7 @@ class MonacoEditorDefaultView extends PureComponent {
width="100%"
height="300"
language={tarLanguage}
theme={theme || window.__monacoTheme || 'vs-dark'}
theme={theme || window.__monacoTheme}
options={isFullScreen ? this.fullScreenOptions : this.options}
onChange={this.onChange}
editorWillMount={editorWillMount}