Checkbox.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * FormBuilder表单生成器
  4. * Author: xaboy
  5. * Github: https://github.com/xaboy/form-builder
  6. */
  7. /**
  8. * Cascader 多级联动组件方法说明
  9. * 方法 返回值 方法名(参数) 注释
  10. * @method $this type(String $type) 数据类型, 支持 city_area(省市区三级联动), city (省市二级联动), other (自定义)
  11. * @method $this data(Array $data) 可选项的数据源,
  12. * 三级数据结构示例:{
  13. * "value":"陕西省", "label":"陕西省", "children":[{
  14. * "value":"西安市", "label":"西安市", "children":[{
  15. * "value":"高新区", "label":"高新区"
  16. * }]
  17. * }]
  18. * }
  19. * @method $this disabled(Boolean $bool) 是否禁用选择器
  20. * @method $this clearable(Boolean $bool) 是否支持清除
  21. * @method $this placeholder(String $placeholder)
  22. * @method $this trigger(String $trigger) 次级菜单展开方式,可选值为 click 或 hover
  23. * @method $this changeOnSelect(Boolean $bool) 当此项为 true 时,点选每级菜单选项值都会发生变化, 默认为 false
  24. * @method $this size(String $size) 输入框大小,可选值为large和small或者不填
  25. * @method $this filterable(Boolean $bool) 是否支持搜索
  26. * @method $this notFoundText(String $text)
  27. * @method $this transfer(Boolean $bool) /是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table 列内使用时,建议添加此属性,它将不受父级样式影响,从而达到更好的效果
  28. * @method $this required($message = null, $trigger = 'change') 设置为必选项
  29. * @method $this value($value) 设置value
  30. * @method string getType() 获取组件类型 city省市二级联动,city_area省市区三级联动,other其他(默认)
  31. */
  32. $cascader = \FormBuilder\Form::cityArea('address','省市区三级联动','陕西省','西安市','新城区')->clearable(true);