PR-CUSTOMER #186
|
@ -22,6 +22,7 @@ const props = defineProps({
|
|||
template: {
|
||||
type: String,
|
||||
required: false,
|
||||
jsegarra marked this conversation as resolved
|
||||
default: '',
|
||||
},
|
||||
locale: {
|
||||
type: String,
|
||||
|
|
Loading…
Reference in New Issue
Y si ponemos comillas simples como default reduciríamos la complejidad de usar ternario,no?
Sale un warning "Prop 'template' requires default value to be set." Lo digo por poner las comillas y nos evitamos un ternario
Apliqué un string vacío
''
como default de la proptemplate
, 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