使用的地方
import { Lang } from '../../lib/en';
console.log(new Lang('1')['en'])
// '1'是传参
en.ts
export class Lang {
public en = {
"HOME": "Homeen",
"ABOUT": "About Us",
"CONTACT": "Contact Us",
};
constructor(obj?) {
}
}
使用的地方
import { Lang } from '../../lib/en';
console.log(new Lang('1')['en'])
// '1'是传参
en.ts
export class Lang {
public en = {
"HOME": "Homeen",
"ABOUT": "About Us",
"CONTACT": "Contact Us",
};
constructor(obj?) {
}
}