interface.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
  2. import PropTypes from '../_util/vue-types';
  3. export var abstractCheckboxGroupProps = function abstractCheckboxGroupProps() {
  4. return {
  5. name: String,
  6. prefixCls: String,
  7. options: {
  8. type: Array,
  9. default: function _default() {
  10. return [];
  11. }
  12. },
  13. disabled: Boolean,
  14. id: String
  15. };
  16. };
  17. export var checkboxGroupProps = function checkboxGroupProps() {
  18. return _objectSpread(_objectSpread({}, abstractCheckboxGroupProps()), {}, {
  19. defaultValue: {
  20. type: Array
  21. },
  22. value: {
  23. type: Array
  24. },
  25. onChange: {
  26. type: Function
  27. },
  28. 'onUpdate:value': {
  29. type: Function
  30. }
  31. });
  32. };
  33. export var abstractCheckboxProps = function abstractCheckboxProps() {
  34. return {
  35. prefixCls: String,
  36. defaultChecked: {
  37. type: Boolean,
  38. default: undefined
  39. },
  40. checked: {
  41. type: Boolean,
  42. default: undefined
  43. },
  44. disabled: {
  45. type: Boolean,
  46. default: undefined
  47. },
  48. isGroup: {
  49. type: Boolean,
  50. default: undefined
  51. },
  52. value: PropTypes.any,
  53. name: String,
  54. id: String,
  55. indeterminate: {
  56. type: Boolean,
  57. default: undefined
  58. },
  59. type: {
  60. type: String,
  61. default: 'checkbox'
  62. },
  63. autofocus: {
  64. type: Boolean,
  65. default: undefined
  66. },
  67. onChange: Function,
  68. 'onUpdate:checked': Function,
  69. onClick: Function,
  70. skipGroup: {
  71. type: Boolean,
  72. default: false
  73. }
  74. };
  75. };
  76. export var checkboxProps = function checkboxProps() {
  77. return _objectSpread(_objectSpread({}, abstractCheckboxProps()), {}, {
  78. indeterminate: {
  79. type: Boolean,
  80. default: false
  81. }
  82. });
  83. };
  84. export var CheckboxGroupContextKey = Symbol('CheckboxGroupContext');