You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
996 B
38 lines
996 B
Component({
|
|
externalClasses: ['wux-class'],
|
|
relations: {
|
|
'../cell/index': {
|
|
type: 'child',
|
|
linked() {
|
|
this.updateIsLastElement('../cell/index')
|
|
},
|
|
linkChanged() {
|
|
this.updateIsLastElement('../cell/index')
|
|
},
|
|
unlinked() {
|
|
this.updateIsLastElement('../cell/index')
|
|
},
|
|
},
|
|
},
|
|
properties: {
|
|
title: {
|
|
type: String,
|
|
value: '',
|
|
},
|
|
label: {
|
|
type: String,
|
|
value: '',
|
|
},
|
|
},
|
|
methods: {
|
|
updateIsLastElement() {
|
|
const elements = this.getRelationNodes('../cell/index')
|
|
if (elements.length > 0) {
|
|
const lastIndex = elements.length - 1
|
|
elements.forEach((element, index) => {
|
|
element.updateIsLastElement(index === lastIndex)
|
|
})
|
|
}
|
|
},
|
|
},
|
|
})
|