Moved functions to Helper.js
This commit is contained in:
parent
2c07bd1a33
commit
e6a9663cce
1 changed files with 0 additions and 31 deletions
|
@ -89,36 +89,5 @@ export default {
|
|||
|
||||
return { generic, colors, penis };
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getClientLocale() {
|
||||
if (navigator.language) {
|
||||
return navigator.languages[0];
|
||||
} else if (navigator.userLanguage) {
|
||||
return navigator.userLanguage; // IE < 11
|
||||
} else if (navigator.browserLanguage) {
|
||||
return navigator.userLanguage;
|
||||
} else if (navigator.systemLanguage) {
|
||||
return navigator.systemLanguage;
|
||||
}
|
||||
// return navigator.language ? navigator.languages[0] : navigator.language;
|
||||
},
|
||||
toImperial(cm) {
|
||||
const realFeet = (cm * 0.3937) / 12;
|
||||
const feet = Math.floor(realFeet);
|
||||
const inches = Math.round((realFeet - feet) * 12);
|
||||
|
||||
return `${feet}'${inches}"`;
|
||||
},
|
||||
toInch(cm) {
|
||||
return `${Math.round(cm / 2.45)} in`;
|
||||
},
|
||||
toLbs(kg) {
|
||||
const nearExact = kg / 0.45359237;
|
||||
const lbs = Math.floor(nearExact);
|
||||
|
||||
return lbs;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue