We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue自定义节点获取不到data参数
graph.addNode({ id: nodeData.id, shape: "CatalogNode", width: flexWidth - 30, height: 40, x: 30, y: 50 + index * 60, data: { // 这里是入参值 test: "aa", id: nodeData.id, name: nodeData.name, tableCount: nodeData.tableCount, columnCount: nodeData.columnCount }, });
接收不到。
<script setup lang="ts"> import { defineProps, PropType } from "vue"; const props = defineProps({ data: { type: Object as PropType<{ test: string; id: string | number; name: string; tableCount: number; columnCount: number; }>, required: true } }); setTimeout(() => { console.log(23, props.data); // 这里是undefind }, 800); </script>
"@antv/layout": "^0.3.25", "@antv/x6": "^2.18.1", "@antv/x6-vue-shape": "^2.1.2",
No response
The text was updated successfully, but these errors were encountered:
const getNode = inject("getNode") as Function; // 当前node参数 const node = getNode(); const nodeData: NodeDataType = node.getData();
Sorry, something went wrong.
No branches or pull requests
Describe the bug
vue自定义节点获取不到data参数
Your Example Website or App
Steps to Reproduce the Bug or Issue
创建节点
自定义节点接收参数
Expected behavior
Screenshots or Videos
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: