Comments (7)
目前是支持自兴义的,看下自定义表单,xflow 里面用法一样。
from xflow.
目前是支持自兴义的,看下自定义表单,xflow 里面用法一样。
谢谢您的解答,但我的项目需要嵌入Formily表单设计器的设计成果,现有的功能未能满足我的需求,还请亲帮忙开放一下这个功能,再次对您表示感谢!
from xflow.
目前 getCustomRenderComponent 也是支持的(但会有类型错误提示),你可以试下是否满足需求,类型错误随后会解掉。
const getCustomRenderComponent = (targetType, targetData) => {
if (targetType === 'node') {
return () => (
<div className="custom-form-component"> node: {targetData?.label} custom componnet </div>
)
}
if (targetType === 'canvas') {
return () => <div className="custom-form-component"> canvas custom componnet </div>
}
return null
}
<FlowchartFormPanel
show={true}
position={{ width: 200, top: 40, bottom: 0, right: 0 }}
getCustomRenderComponent={getCustomRenderComponent}
/>
from xflow.
目前 getCustomRenderComponent 也是支持的(但会有类型错误提示),你可以试下是否满足需求,类型错误随后会解掉。
const getCustomRenderComponent = (targetType, targetData) => { if (targetType === 'node') { return () => ( <div className="custom-form-component"> node: {targetData?.label} custom componnet </div> ) } if (targetType === 'canvas') { return () => <div className="custom-form-component"> canvas custom componnet </div> } return null } <FlowchartFormPanel show={true} position={{ width: 200, top: 40, bottom: 0, right: 0 }} getCustomRenderComponent={getCustomRenderComponent} />
非常感谢亲能帮助我解决难题。这已经可以满足我的需求。示例代码如下:
// #region getCustomRenderComponent定义 export const getCustomRenderComponent: NsJsonSchemaForm.ICustomRender = ( targetType, targetData, // commandService // 暂时不支持此参数,如果以后能支持就更好了 ) => { const commandService = useXFlowApp(); const updateNode = (node: NsGraph.INodeConfig) => { return commandService.executeCommand<NsNodeCmd.UpdateNode.IArgs>( XFlowNodeCommands.UPDATE_NODE.id, { nodeConfig: node }, ) } ...... // #endregion // 我期望FlowchartFormPanel 能够像 JsonSchemaForm 一样使用。 // #region 使用方式 <FlowchartFormPanel show={true} position={{ width: 400, top: 40, bottom: 0, right: 0 }} getCustomRenderComponent={NsJsonForm.getCustomRenderComponent} /> // #endregion更多使用细节请参考:
CustomPanel
自定义渲染getCustomRenderComponent
from xflow.
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the AntV community! 💪💯
from xflow.
Hey again!
It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY
. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the AntV community! 💪💯
from xflow.
This thread has been automatically locked because it has not had recent activity.
Please open a new issue for related bugs and link to relevant comments in this thread.
from xflow.
Related Issues (20)
- 在连线上渲染React组件,自定义连线的相关信息展示。这部分可以提供demo吗 HOT 3
- Add React 18 HOT 2
- 支持新版的 x6 HOT 8
- FlowchartNodePanel中自定义节点的renderComponent属性无效以及快捷键问题 HOT 2
- 支持 Ant Design v5 HOT 3
- support nextjs HOT 1
- CanvasToolbar中toolbarConfig.setCustomToolbarRender自定义渲染如何使用IGraphCommandService HOT 4
- NodeTreePanel 怎样设置 expandedKeys HOT 2
- 渲染网格时,在setX6Config中配置grid为true或者相应的对象后,网格仍然无法渲染。 HOT 2
- 左右布局水平连接线不直 HOT 5
- 请问这框架还有人维护么? HOT 6
- 能否支持vue框架? HOT 6
- XFlow 2.x Dnd 支持自定义 getDragNode、getDropNode HOT 3
- XFlow 2.x Cannot read properties of null (reading 'hasOwnProperty') HOT 1
- XFlow 2.0 会增加右键菜单组件吗?目前示列中看到的右键菜单是基于react节点 HOT 3
- 请问 2.0 版本的 ER 建模示例什么时候更新呢? HOT 3
- Lazy loading node relations. HOT 3
- xflow1版本中的NodeCollapsePanel组件,也就是左侧折叠面板,自定义组件时,click事件无法触发,怎么解决 HOT 3
- [xflow2.0] 更新画布时( update(id,data) ),data中含有 undefined,报错:Unexpected token u in JSON at position 0 HOT 2
- 动态创建边时不指定 id,更新时找不到边导致更新失败 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xflow.