WIP improving notenimport with punktefeature

This commit is contained in:
Johann Hoffmann
2026-02-09 09:50:22 +01:00
parent 6cf7093293
commit decd514b22
4 changed files with 141 additions and 50 deletions
+18 -1
View File
@@ -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 '';
}