PR-CUSTOMER #186

Merged
jsegarra merged 105 commits from :PR-CUSTOMER into dev 2024-04-19 15:55:53 +00:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit bafb938e23 - Show all commits

View File

@ -22,6 +22,7 @@ const props = defineProps({
template: {
type: String,
required: false,
jsegarra marked this conversation as resolved
Review

Y si ponemos comillas simples como default reduciríamos la complejidad de usar ternario,no?

Y si ponemos comillas simples como default reduciríamos la complejidad de usar ternario,no?
Review

Sale un warning "Prop 'template' requires default value to be set." Lo digo por poner las comillas y nos evitamos un ternario

Sale un warning "Prop 'template' requires default value to be set." Lo digo por poner las comillas y nos evitamos un ternario
Review

Apliqué un string vacío '' como default de la prop template, pero sinceramente no se me ocurre como mejorar el ternary operator ese.

Pensé algo como: const key = props.template ? templates['${props.template}'] : props.template;.

Pero no se si tiene mucho sentido la verdad.

Commit: bafb938e23

Apliqué un string vacío `''` como default de la prop `template`, pero sinceramente no se me ocurre como mejorar el ternary operator ese. Pensé algo como: `const key = props.template ? `templates['${props.template}']` : props.template;`. Pero no se si tiene mucho sentido la verdad. Commit: https://gitea.verdnatura.es/verdnatura/salix-front/commit/bafb938e231cbcd55236edf06b6c254f547d7ecb
default: '',
},
locale: {
type: String,