primevue-mirror/service/NodeService.js

20 lines
523 B
JavaScript
Raw Normal View History

2019-07-31 15:35:23 +00:00
export default class NodeService {
constructor() {
const runtimeConfig = useRuntimeConfig();
2022-12-28 08:48:05 +00:00
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
}