登录
This commit is contained in:
@@ -82,22 +82,22 @@
|
||||
onMounted(() => {
|
||||
window.vueFlow = vueFlow
|
||||
window.nodes = nodes
|
||||
window.addaaaaa = () => {
|
||||
const lastNode = vueFlow.value.getNode(nodes.value[nodes.value.length - 1].id)
|
||||
const width = lastNode.dimensions.width
|
||||
const x = lastNode.position.x
|
||||
const y = lastNode.position.y
|
||||
nodes.value.push({
|
||||
id: nodes.value.length + 1 + '',
|
||||
type: 'SecondaryNode',
|
||||
class: 'custom-node',
|
||||
data: { component: card, type_: 'to-3d-model' },
|
||||
position: {
|
||||
x: width + x + 50,
|
||||
y: y
|
||||
}
|
||||
})
|
||||
}
|
||||
// window.addaaaaa = () => {
|
||||
// const lastNode = vueFlow.value.getNode(nodes.value[nodes.value.length - 1].id)
|
||||
// const width = lastNode.dimensions.width
|
||||
// const x = lastNode.position.x
|
||||
// const y = lastNode.position.y
|
||||
// nodes.value.push({
|
||||
// id: nodes.value.length + 1 + '',
|
||||
// type: 'SecondaryNode',
|
||||
// class: 'custom-node',
|
||||
// data: { component: card, type_: 'to-3d-model' },
|
||||
// position: {
|
||||
// x: width + x + 50,
|
||||
// y: y
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
})
|
||||
</script>
|
||||
<style lang="less">
|
||||
|
||||
Reference in New Issue
Block a user