bkp
This commit is contained in:
parent
a693081023
commit
63d943d0df
8 changed files with 12603 additions and 376 deletions
|
|
@ -8,6 +8,7 @@
|
|||
item-value="chave"
|
||||
:loading="carregando"
|
||||
:disabled="carregando"
|
||||
:menu-props="{ maxHeight: 320 }"
|
||||
:clearable="Boolean(opcoes?.limpavel)"
|
||||
:error="Boolean(opcoes?.erro)"
|
||||
:error-messages="opcoes?.mensagensErro"
|
||||
|
|
@ -67,7 +68,11 @@ export default defineComponent({
|
|||
carregando.value = true;
|
||||
try {
|
||||
const resultado = await props.opcoes.itens();
|
||||
itens.value = Array.isArray(resultado) ? resultado : [];
|
||||
const lista = Array.isArray(resultado) ? resultado : [];
|
||||
|
||||
// Força reatividade mesmo quando Vuetify mantém cache interno.
|
||||
// (garante que `items` mude de referência)
|
||||
itens.value = [...lista];
|
||||
} finally {
|
||||
carregando.value = false;
|
||||
}
|
||||
|
|
@ -85,6 +90,16 @@ export default defineComponent({
|
|||
void carregarItens();
|
||||
});
|
||||
|
||||
// Debug (playground): ajuda a identificar se os itens chegaram.
|
||||
watch(
|
||||
itens,
|
||||
(v) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.debug("[EliEntradaSelecao] itens:", v);
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
return { attrs, emit, localValue, opcoes: props.opcoes, itens, carregando };
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue