build
This commit is contained in:
parent
8a5596e860
commit
57325f6744
100 changed files with 16153 additions and 4623 deletions
|
|
@ -43,14 +43,14 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, PropType, ref } from "vue";
|
||||
import type { tipoEliTabelaAcao } from "./types-eli-tabela";
|
||||
import { computed, defineComponent, type PropType, ref } from "vue"
|
||||
import type { tipoEliTabelaAcao } from "./types-eli-tabela"
|
||||
|
||||
type ItemAcao<T> = {
|
||||
acao: tipoEliTabelaAcao<T>;
|
||||
indice: number;
|
||||
visivel: boolean;
|
||||
};
|
||||
acao: tipoEliTabelaAcao<T>
|
||||
indice: number
|
||||
visivel: boolean
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: "EliTabelaMenuAcoes",
|
||||
|
|
@ -64,6 +64,7 @@ export default defineComponent({
|
|||
required: true,
|
||||
},
|
||||
acoes: {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: dynamic typing needed
|
||||
type: Array as PropType<Array<ItemAcao<any>>>,
|
||||
required: true,
|
||||
},
|
||||
|
|
@ -74,22 +75,24 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
emits: {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: dynamic typing needed
|
||||
executar(payload: { acao: tipoEliTabelaAcao<any>; linha: unknown }) {
|
||||
return payload !== null && typeof payload === "object";
|
||||
return payload !== null && typeof payload === "object"
|
||||
},
|
||||
},
|
||||
setup(props, { emit, expose }) {
|
||||
const menuEl = ref<HTMLElement | null>(null);
|
||||
expose({ menuEl });
|
||||
const menuEl = ref<HTMLElement | null>(null)
|
||||
expose({ menuEl })
|
||||
|
||||
const possuiAcoes = computed(() => props.acoes.length > 0);
|
||||
const possuiAcoes = computed(() => props.acoes.length > 0)
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: dynamic typing needed
|
||||
function emitExecutar(item: { acao: tipoEliTabelaAcao<any> }) {
|
||||
if (!props.linha) return;
|
||||
emit("executar", { acao: item.acao, linha: props.linha });
|
||||
if (!props.linha) return
|
||||
emit("executar", { acao: item.acao, linha: props.linha })
|
||||
}
|
||||
|
||||
return { menuEl, possuiAcoes, emitExecutar };
|
||||
return { menuEl, possuiAcoes, emitExecutar }
|
||||
},
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue