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.
|
|
|
import { ref } from 'vue';
|
|
|
|
import { axios, Environment, Tools } from 'platform-core';
|
|
|
|
|
|
|
|
class UserDefinedFunctionsManager {
|
|
|
|
#functions: any;
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.#functions = ref([]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public userDefinedFunctions(): any {
|
|
|
|
return this.#functions;
|
|
|
|
}
|
|
|
|
|
|
|
|
public load() {
|
|
|
|
// 获取自定义函数库中的函数
|
|
|
|
axios.get(Environment.apiContextPath('/api/re/function?pageable=false')).then((response) => {
|
|
|
|
this.#functions.value = Tools.objects2Objects(response.data?.content, null, (obj: any) => {
|
|
|
|
return obj.enable;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { UserDefinedFunctionsManager };
|