mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
WIP improving notenimport with punktefeature
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
export function capitalize(string) {
|
||||
if (!string) return '';
|
||||
return string[0].toUpperCase() + string.slice(1);
|
||||
|
||||
if (Vue.isRef(string)) {
|
||||
console.log('Vue.isRef(string)', string)
|
||||
|
||||
return Vue.computed(() => {
|
||||
const val = Vue.unref(string);
|
||||
return (val && typeof val === 'string') ? val.charAt(0).toUpperCase() + val.slice(1) : '';
|
||||
});
|
||||
}
|
||||
|
||||
// just a plain string, return a plain string
|
||||
if (typeof string === 'string') {
|
||||
console.log('if (typeof string === \'string\') {', string)
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user