mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
code refactor
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export default function ({i18n}, value, fieldName, translate) {
|
||||
let content = '';
|
||||
|
||||
if (fieldName) {
|
||||
content = value[fieldName];
|
||||
} else {
|
||||
content = value;
|
||||
}
|
||||
|
||||
if (translate) {
|
||||
content = i18n.t(content);
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
Reference in New Issue
Block a user