Mobile.php 519 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Dcat\Admin\Form\Field;
  3. class Mobile extends Text
  4. {
  5. public static $js = '@jquery.inputmask';
  6. public static $css = '@jquery.inputmask';
  7. /**
  8. * @see https://github.com/RobinHerbots/Inputmask#options
  9. *
  10. * @var array
  11. */
  12. protected $options = [
  13. 'mask' => '99999999999',
  14. ];
  15. public function render()
  16. {
  17. $this->inputmask($this->options);
  18. $this->prepend('<i class="feather icon-smartphone"></i>');
  19. return parent::render();
  20. }
  21. }