girolando / componente-animal by girolando

Componentes Girolando - Animal
468
0
3
Package Data
Maintainer Username: girolando
Maintainer Contact: anderson.nuneseth@gmail.com (Anderson Nunes)
Package Create Date: 2016-04-12
Package Last Update: 2020-06-08
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:08:33
Package Statistics
Total Downloads: 468
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 1

Componente Animal

Utilização

  {!! ComponenteAnimal::init() !!} <!-- IMPORTANTE -->
  
  <button class="btnBuscaAnimal">Buscar Animal</button>
  <componente type="animal" name="codigoAnimal" dispatcher-button=".btnBuscaAnimal" />
  
  <script>
    const componente = Componente.AnimalFactory.get('codigoAnimal');
    componente.addEventListener(Componente.EVENTS.ON_FINISH, function(animal) {
      console.log('O animal selecionado foi: ', animal);
    });
  </script>

Método findBy

  const componente = Componente.AnimalFactory.get('nome-do-seu-componente');
  const animalEspecifico = await componente.findBy({registroAnimal: '1010-AX'});