primevue-mirror/service/NodeService.js

19 lines
522 B
JavaScript
Raw Normal View History

2019-07-31 15:35:23 +00:00
export default class NodeService {
constructor() {
const runtimeConfig = useRuntimeConfig();
this.contextPath = runtimeConfig.public.contextPath;
}
2019-07-31 15:35:23 +00:00
getTreeTableNodes() {
return fetch(this.contextPath + 'demo/data/treetablenodes.json')
2022-09-14 14:26:41 +00:00
.then((res) => res.json())
.then((d) => d.root);
2019-07-31 15:35:23 +00:00
}
getTreeNodes() {
return fetch(this.contextPath + 'demo/data/treenodes.json')
2022-09-14 14:26:41 +00:00
.then((res) => res.json())
.then((d) => d.root);
2019-07-31 15:35:23 +00:00
}
2021-10-05 07:41:07 +00:00
}