Tree CheckBox demo fixed

This commit is contained in:
Bahadır Sofuoğlu 2023-03-09 11:58:11 +03:00
parent 1419e1a7d5
commit c8ac695f05

View file

@ -35,21 +35,22 @@ export default {
import { NodeService } from '@/service/NodeService'; import { NodeService } from '@/service/NodeService';
export default { export default {
data() { data() {
return { return {
nodes: null nodes: null
}; };
}, },
mounted() { mounted() {
NodeService.getTreeNodes().then((data) => (this.nodes = data)); NodeService.getTreeNodes().then((data) => (this.nodes = data));
}, },
methods: { methods: {
onNodeSelect(node) { onNodeSelect(node) {
this.$toast.add({ severity: 'success', summary: 'Node Selected', detail: node.label, life: 3000 }); this.$toast.add({ severity: 'success', summary: 'Node Selected', detail: node.label, life: 3000 });
}, },
onNodeUnselect(node) { onNodeUnselect(node) {
this.$toast.add({ severity: 'success', summary: 'Node Unselected', detail: node.label, life: 3000 }); this.$toast.add({ severity: 'success', summary: 'Node Unselected', detail: node.label, life: 3000 });
} }
}
} }
<\/script>`, <\/script>`,
composition: ` composition: `