Refactor #3965 - Update for Carousel-OrgChart

This commit is contained in:
Bahadır Sofuoğlu 2023-06-09 11:45:51 +03:00
parent d7272b8caa
commit 8467dd2a0d
4 changed files with 21 additions and 33 deletions

View file

@ -66,8 +66,8 @@ const classes = {
lines: 'p-organizationchart-lines',
lineDown: 'p-organizationchart-line-down',
lines: 'p-organizationchart-lines',
lineLeft: ({ context }) => ['p-organizationchart-line-left', { 'p-organizationchart-line-top': !(context.i === 0) }],
lineRight: ({ context, props }) => ['p-organizationchart-line-right', { 'p-organizationchart-line-top': !(context.i === props.node.children.length - 1) }],
lineLeft: ({ i }) => ['p-organizationchart-line-left', { 'p-organizationchart-line-top': !(i === 0) }],
lineRight: ({ props, i }) => ['p-organizationchart-line-right', { 'p-organizationchart-line-top': !(i === props.node.children.length - 1) }],
nodes: 'p-organizationchart-nodes'
};

View file

@ -28,9 +28,7 @@
<td
:class="
cx('lineLeft', {
context: {
i
}
i
})
"
v-bind="getNodeOptions(!(i === 0), 'lineLeft')"
@ -40,9 +38,7 @@
<td
:class="
cx('lineRight', {
context: {
i
}
i
})
"
v-bind="getNodeOptions(!(i === node.children.length - 1), 'lineRight')"