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) => { const options: any[] = []; const items: any[] = response.data?.content; if (items && items.length > 0) { items.forEach((item) => { if (item.enable) { options.push(item); } }); } this.#functions.value = options; }); } } export { UserDefinedFunctionsManager };