interface.js 2.4 KB

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