selectRule.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. const selectRule = [
  2. { type: 'switch', field: 'multiple', title: '是否多选' },
  3. {
  4. type: 'switch',
  5. field: 'disabled',
  6. title: '是否禁用'
  7. },
  8. { type: 'switch', field: 'clearable', title: '是否可以清空选项' },
  9. {
  10. type: 'switch',
  11. field: 'collapseTags',
  12. title: '多选时是否将选中值按文字的形式展示'
  13. },
  14. {
  15. type: 'inputNumber',
  16. field: 'multipleLimit',
  17. title: '多选时用户最多可以选择的项目数,为 0 则不限制',
  18. props: { min: 0 }
  19. },
  20. {
  21. type: 'input',
  22. field: 'autocomplete',
  23. title: 'autocomplete 属性'
  24. },
  25. { type: 'input', field: 'placeholder', title: '占位符' },
  26. {
  27. type: 'switch',
  28. field: 'filterable',
  29. title: '是否可搜索'
  30. },
  31. { type: 'switch', field: 'allowCreate', title: '是否允许用户创建新条目' },
  32. {
  33. type: 'input',
  34. field: 'noMatchText',
  35. title: '搜索条件无匹配时显示的文字'
  36. },
  37. {
  38. type: 'switch',
  39. field: 'remote',
  40. title: '其中的选项是否从服务器远程加载'
  41. },
  42. {
  43. type: 'Struct',
  44. field: 'remoteMethod',
  45. title: '自定义远程搜索方法'
  46. },
  47. { type: 'input', field: 'noDataText', title: '选项为空时显示的文字' },
  48. {
  49. type: 'switch',
  50. field: 'reserveKeyword',
  51. title: '多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词'
  52. },
  53. {
  54. type: 'switch',
  55. field: 'defaultFirstOption',
  56. title: '在输入框按下回车,选择第一个匹配项'
  57. },
  58. {
  59. type: 'switch',
  60. field: 'popperAppendToBody',
  61. title: '是否将弹出框插入至 body 元素',
  62. value: true
  63. },
  64. {
  65. type: 'switch',
  66. field: 'automaticDropdown',
  67. title: '对于不可搜索的 Select,是否在输入框获得焦点后自动弹出选项菜单'
  68. }
  69. ]
  70. export default selectRule