InputNumber.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * FormBuilder表单生成器
  4. * Author: xaboy
  5. * Github: https://github.com/xaboy/form-builder
  6. */
  7. /**
  8. * Input Input组件方法说明
  9. * 方法 返回值 方法名(参数) 注释
  10. * @method $this type(String $type) 输入框类型,可选值为 text、password、textarea、url、email、date;
  11. * @method $this size(String $size) 输入框尺寸,可选值为large、small、default或者不设置;
  12. * @method $this placeholder(String $placeholder) 占位文本
  13. * @method $this clearable(Boolean $bool) 是否显示清空按钮, 默认为false
  14. * @method $this disabled(Boolean $bool) 设置输入框为禁用状态, 默认为false
  15. * @method $this readonly(Boolean $bool) 设置输入框为只读, 默认为false
  16. * @method $this maxlength(int $length) 最大输入长度
  17. * @method $this icon(String $icon) 输入框尾部图标,仅在 text 类型下有效
  18. * @method $this rows(int $rows) 文本域默认行数,仅在 textarea 类型下有效, 默认为2
  19. * @method $this number(Boolean $bool) 将用户的输入转换为 Number 类型, 默认为false
  20. * @method $this autofocus(Boolean $bool) 自动获取焦点, 默认为false
  21. * @method $this autocomplete(Boolean $bool) 原生的自动完成功能, 默认为false
  22. * @method $this spellcheck(Boolean $bool) 原生的 spellcheck 属性, 默认为false
  23. * @method $this wrap(String $warp) 原生的 wrap 属性,可选值为 hard 和 soft, 默认为soft
  24. * @method $this autoSize(Number $minRows, Number $maxRows) 自适应内容高度,仅在 textarea 类型下有效
  25. * @method $this required($message = null, $trigger = 'blur') 组件的值为必填
  26. * @method $this value($value) 设置value
  27. */
  28. $text = \FormBuilder\Form::text('goods_name','商品名称');
  29. $password = \FormBuilder\Form::password('password','密码');
  30. $textarea = \FormBuilder\Form::textarea('textarea','简介');
  31. $url = \FormBuilder\Form::url('url','链接');
  32. $email = \FormBuilder\Form::email('email','邮箱');
  33. $idate = \FormBuilder\Form::idate('idate','日期');