You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
655 B
JavaScript

const init = (params) => {
console.log('moduleB init');
return {
name: 'moduleB',
functionName: params.type,
otherParams: {
id: `xxxx${params.type}`,
age: `xxxx${params.type}`,
},
};
};
const getData = (params) => {
console.log('moduleB getData');
return {
name: 'moduleB',
functionName: params.type,
otherParams: {
id: `xxxx${params.type}`,
age: `xxxx${params.type}`,
},
};
};
export default function (params) {
// console.log('moduleB');
// console.log(params);
return eval(params.type + '(params)');
}