@aloudata/aloudata-design 0.4.0-beta.1 → 0.4.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/es/Avatar/component/Avatar/index.d.ts +84 -0
  2. package/es/Avatar/component/Avatar/index.js +42 -0
  3. package/es/Avatar/index.d.ts +1 -13
  4. package/es/Avatar/index.js +1 -30
  5. package/es/Avatar/style/index.less +1 -1
  6. package/es/Breadcrumb/index.d.ts +5 -2
  7. package/es/Breadcrumb/index.js +17 -7
  8. package/es/Button/index.d.ts +1 -1
  9. package/es/Button/index.js +3 -8
  10. package/es/Button/style/index.less +7 -1
  11. package/es/Button/style/variables.less +26 -26
  12. package/es/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
  13. package/es/Checkbox/component/CheckboxGroup/index.js +27 -0
  14. package/es/Checkbox/index.d.ts +4 -5
  15. package/es/Checkbox/index.js +3 -12
  16. package/es/Checkbox/style/index.less +36 -16
  17. package/es/Checkbox/type.d.ts +94 -0
  18. package/es/Checkbox/type.js +6 -0
  19. package/es/Divider/index.d.ts +40 -2
  20. package/es/Divider/index.js +10 -1
  21. package/es/Divider/style/index.less +4 -0
  22. package/es/Divider/style/index.less.d.ts +183 -0
  23. package/es/Dropdown/Button.d.ts +4 -4
  24. package/es/Dropdown/Button.js +5 -5
  25. package/es/Dropdown/index.d.ts +5 -5
  26. package/es/Dropdown/index.js +5 -5
  27. package/es/Icon/icons.d.ts +9 -0
  28. package/es/Icon/icons.js +1590 -0
  29. package/es/Input/components/Input/index.d.ts +13 -1
  30. package/es/Input/components/Input/index.js +1 -3
  31. package/es/Input/components/Password/index.d.ts +6 -1
  32. package/es/Input/components/Password/index.js +11 -3
  33. package/es/Input/components/TextArea/index.d.ts +1 -1
  34. package/es/Input/style/index.less +139 -59
  35. package/es/InputNumber/index.d.ts +3 -3
  36. package/es/InputNumber/style/index.less +66 -26
  37. package/es/InputNumber/type.d.ts +161 -0
  38. package/es/InputNumber/type.js +1 -0
  39. package/es/Menu/index.d.ts +2 -0
  40. package/es/Popconfirm/index.d.ts +3 -0
  41. package/es/Popconfirm/index.js +2 -0
  42. package/es/Popconfirm/style/index.d.ts +2 -0
  43. package/es/Popconfirm/style/index.js +2 -0
  44. package/es/Popconfirm/style/index.less +1 -0
  45. package/es/Progress/index.d.ts +3 -0
  46. package/es/Progress/index.js +2 -0
  47. package/es/Progress/style/index.d.ts +2 -0
  48. package/es/Progress/style/index.js +2 -0
  49. package/es/Progress/style/index.less +1 -0
  50. package/es/Select/style/variables.less.d.ts +6 -0
  51. package/es/Steps/style/index.less +10 -4
  52. package/es/Table/Table.js +51 -29
  53. package/es/Table/components/TableHead/index.d.ts +0 -1
  54. package/es/Table/components/TableHead/index.js +1 -2
  55. package/es/Table/interface.d.ts +2 -0
  56. package/es/Table/style/index.less +6 -1
  57. package/es/Table/style/variable.less +0 -5
  58. package/es/Table/style/variable.less.d.ts +1 -1
  59. package/es/Table/utils.js +16 -9
  60. package/es/Tabs/index.js +2 -2
  61. package/es/Tabs/style/index.less +1 -1
  62. package/es/Tooltip/index.d.ts +2 -2
  63. package/es/Tooltip/index.js +4 -4
  64. package/es/index.d.ts +7 -3
  65. package/es/index.js +3 -1
  66. package/es/style/themes/default/scrollBar.less +10 -7
  67. package/es/style/themes/default/themeColor.module.less +176 -166
  68. package/es/style/themes/default/themeColor.module.less.d.ts +6 -0
  69. package/lib/Avatar/component/Avatar/index.d.ts +84 -0
  70. package/lib/Avatar/component/Avatar/index.js +61 -0
  71. package/lib/Avatar/index.d.ts +1 -13
  72. package/lib/Avatar/index.js +3 -44
  73. package/lib/Avatar/style/index.less +1 -1
  74. package/lib/Breadcrumb/index.d.ts +5 -2
  75. package/lib/Breadcrumb/index.js +17 -8
  76. package/lib/Button/index.d.ts +1 -1
  77. package/lib/Button/index.js +3 -8
  78. package/lib/Button/style/index.less +7 -1
  79. package/lib/Button/style/variables.less +26 -26
  80. package/lib/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
  81. package/lib/Checkbox/component/CheckboxGroup/index.js +42 -0
  82. package/lib/Checkbox/index.d.ts +4 -5
  83. package/lib/Checkbox/index.js +4 -13
  84. package/lib/Checkbox/style/index.less +36 -16
  85. package/lib/Checkbox/type.d.ts +94 -0
  86. package/lib/Checkbox/type.js +13 -0
  87. package/lib/Divider/index.d.ts +40 -2
  88. package/lib/Divider/index.js +11 -1
  89. package/lib/Divider/style/index.less +4 -0
  90. package/lib/Divider/style/index.less.d.ts +183 -0
  91. package/lib/Dropdown/Button.d.ts +4 -4
  92. package/lib/Dropdown/Button.js +5 -5
  93. package/lib/Dropdown/index.d.ts +5 -5
  94. package/lib/Dropdown/index.js +5 -5
  95. package/lib/Icon/icons.d.ts +9 -0
  96. package/lib/Icon/icons.js +1597 -0
  97. package/lib/Input/components/Input/index.d.ts +13 -1
  98. package/lib/Input/components/Input/index.js +1 -3
  99. package/lib/Input/components/Password/index.d.ts +6 -1
  100. package/lib/Input/components/Password/index.js +14 -4
  101. package/lib/Input/components/TextArea/index.d.ts +1 -1
  102. package/lib/Input/style/index.less +139 -59
  103. package/lib/InputNumber/index.d.ts +3 -3
  104. package/lib/InputNumber/style/index.less +66 -26
  105. package/lib/InputNumber/type.d.ts +161 -0
  106. package/lib/InputNumber/type.js +5 -0
  107. package/lib/Menu/index.d.ts +2 -0
  108. package/lib/Popconfirm/index.d.ts +3 -0
  109. package/lib/Popconfirm/index.js +13 -0
  110. package/lib/Popconfirm/style/index.d.ts +2 -0
  111. package/lib/Popconfirm/style/index.js +5 -0
  112. package/lib/Popconfirm/style/index.less +1 -0
  113. package/lib/Progress/index.d.ts +3 -0
  114. package/lib/Progress/index.js +13 -0
  115. package/lib/Progress/style/index.d.ts +2 -0
  116. package/lib/Progress/style/index.js +5 -0
  117. package/lib/Progress/style/index.less +1 -0
  118. package/lib/Select/style/variables.less.d.ts +6 -0
  119. package/lib/Steps/style/index.less +10 -4
  120. package/lib/Table/Table.js +51 -30
  121. package/lib/Table/components/TableHead/index.d.ts +0 -1
  122. package/lib/Table/components/TableHead/index.js +1 -2
  123. package/lib/Table/interface.d.ts +2 -0
  124. package/lib/Table/style/index.less +6 -1
  125. package/lib/Table/style/variable.less +0 -5
  126. package/lib/Table/style/variable.less.d.ts +1 -1
  127. package/lib/Table/utils.js +16 -9
  128. package/lib/Tabs/index.js +2 -2
  129. package/lib/Tabs/style/index.less +1 -1
  130. package/lib/Tooltip/index.d.ts +2 -2
  131. package/lib/Tooltip/index.js +4 -4
  132. package/lib/index.d.ts +7 -3
  133. package/lib/index.js +16 -0
  134. package/lib/style/themes/default/scrollBar.less +10 -7
  135. package/lib/style/themes/default/themeColor.module.less +176 -166
  136. package/lib/style/themes/default/themeColor.module.less.d.ts +6 -0
  137. package/package.json +3 -3
  138. package/es/Icon/icons.json +0 -418
  139. package/es/Table/hooks/useTableColumn.d.ts +0 -28
  140. package/es/Table/hooks/useTableColumn.js +0 -53
  141. package/es/Table/style/index.less.d.ts +0 -126
  142. package/lib/Icon/icons.json +0 -418
  143. package/lib/Table/hooks/useTableColumn.d.ts +0 -28
  144. package/lib/Table/hooks/useTableColumn.js +0 -66
  145. package/lib/Table/style/index.less.d.ts +0 -126
@@ -0,0 +1,94 @@
1
+ import { CheckboxChangeEvent, CheckboxGroupProps, CheckboxProps } from 'antd/lib/checkbox';
2
+ import { CheckboxOptionType, CheckboxValueType } from 'antd/lib/checkbox/Group';
3
+ export declare enum EDirection {
4
+ VERTICAL = "vertical",
5
+ HORIZONTAL = "horizontal"
6
+ }
7
+ export interface ICheckboxProps extends CheckboxProps {
8
+ /**
9
+ * @description 自动获取焦点
10
+ * @type boolean
11
+ * @default false
12
+ */
13
+ autoFocus?: boolean;
14
+ /**
15
+ * @description 指定当前是否选中
16
+ * @type boolean
17
+ * @default false
18
+ */
19
+ checked?: boolean;
20
+ /**
21
+ * @description 初始是否选中
22
+ * @type boolean
23
+ * @default false
24
+ */
25
+ defaultChecked?: boolean;
26
+ /**
27
+ * @description 失效状态
28
+ * @type boolean
29
+ * @default false
30
+ */
31
+ disabled?: boolean;
32
+ /**
33
+ * @description 设置 indeterminate 状态,只负责样式控制
34
+ * @type boolean
35
+ * @default false
36
+ */
37
+ indeterminate?: false;
38
+ /**
39
+ * @description 变化时的回调函数
40
+ * @type function(e:Event)
41
+ * @default -
42
+ */
43
+ onChange?: (e: CheckboxChangeEvent) => void;
44
+ }
45
+ export interface ICheckboxGroupProps extends CheckboxGroupProps {
46
+ /**
47
+ * @description 默认选中的选项
48
+ * @type string[]
49
+ * @default []
50
+ */
51
+ defaultValue?: Array<CheckboxValueType>;
52
+ /**
53
+ * @description 整组失效
54
+ * @type boolean
55
+ * @default false
56
+ */
57
+ disabled?: boolean;
58
+ /**
59
+ * @description CheckboxGroup 下所有 input[type="checkbox"] 的 name 属性
60
+ * @type string
61
+ * @default -
62
+ */
63
+ name?: string;
64
+ /**
65
+ * @description 指定可选项
66
+ * @type string[] | number[] | Option[]
67
+ * @default []
68
+ */
69
+ options?: Array<CheckboxOptionType | string | number>;
70
+ /**
71
+ * @description 指定选中的选项
72
+ * @type string[]
73
+ * @default []
74
+ */
75
+ value?: Array<CheckboxValueType>;
76
+ /**
77
+ * @description 变化时毁掉函数
78
+ * @type function(checkedValue)
79
+ * @default -
80
+ */
81
+ onChange?: (checkedValue: Array<CheckboxValueType>) => void;
82
+ /**
83
+ * @description 复选按钮组的方向
84
+ * @type 'vertical' | 'horizontal'
85
+ * @default -
86
+ */
87
+ direction: EDirection.VERTICAL;
88
+ /**
89
+ * @description className
90
+ * @type string
91
+ * @default -
92
+ */
93
+ className?: string;
94
+ }
@@ -0,0 +1,6 @@
1
+ export var EDirection;
2
+
3
+ (function (EDirection) {
4
+ EDirection["VERTICAL"] = "vertical";
5
+ EDirection["HORIZONTAL"] = "horizontal";
6
+ })(EDirection || (EDirection = {}));
@@ -1,3 +1,41 @@
1
- import { Divider, DividerProps } from 'antd';
2
- export type { DividerProps };
1
+ import React from 'react';
2
+ export interface IDividerProps {
3
+ /**
4
+ * @description 水平或竖直
5
+ * @type 'horizontal' | 'vertical'
6
+ * @default 'horizontal'
7
+ */
8
+ type?: 'horizontal' | 'vertical';
9
+ /**
10
+ * @description 类名
11
+ * @type string
12
+ * @default --
13
+ */
14
+ className?: string;
15
+ /**
16
+ * @description 嵌套的标题
17
+ * @type ReactNode
18
+ * @default --
19
+ */
20
+ children?: React.ReactNode;
21
+ /**
22
+ * @description 分割线标题的位置
23
+ * @type 'left' | 'right' | 'center'
24
+ * @default 'center'
25
+ */
26
+ orientation?: 'left' | 'right' | 'center';
27
+ /**
28
+ * @description 是否是虚线
29
+ * @type boolean
30
+ * @default false
31
+ */
32
+ dashed?: boolean;
33
+ /**
34
+ * @description 分割线样式对象
35
+ * @type CSSProperties
36
+ * @default --
37
+ */
38
+ style?: React.CSSProperties;
39
+ }
40
+ declare const Divider: (props: IDividerProps) => JSX.Element;
3
41
  export default Divider;
@@ -1,3 +1,12 @@
1
1
  import "antd/es/divider/style";
2
2
  import _Divider from "antd/es/divider";
3
- export default _Divider;
3
+ import classNames from 'classnames';
4
+ import React from 'react';
5
+
6
+ var Divider = function Divider(props) {
7
+ return /*#__PURE__*/React.createElement(_Divider, Object.assign({}, props, {
8
+ className: classNames('ald-divider', props.className)
9
+ }));
10
+ };
11
+
12
+ export default Divider;
@@ -1 +1,5 @@
1
1
  @import '../../style/index.less';
2
+
3
+ .ald-divider {
4
+ border-color: @BG70;
5
+ }
@@ -0,0 +1,183 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ 'B10': string;
5
+ 'B20': string;
6
+ 'B30': string;
7
+ 'B40': string;
8
+ 'B50': string;
9
+ 'B60': string;
10
+ 'B70': string;
11
+ 'B80': string;
12
+ 'B90': string;
13
+ 'B95': string;
14
+ 'B98': string;
15
+ 'BG0': string;
16
+ 'BG10': string;
17
+ 'BG100': string;
18
+ 'BG20': string;
19
+ 'BG30': string;
20
+ 'BG40': string;
21
+ 'BG50': string;
22
+ 'BG60': string;
23
+ 'BG70': string;
24
+ 'BG80': string;
25
+ 'BG90': string;
26
+ 'BG95': string;
27
+ 'BG97': string;
28
+ 'ND0': string;
29
+ 'ND10': string;
30
+ 'ND20': string;
31
+ 'ND30': string;
32
+ 'ND40': string;
33
+ 'ND50': string;
34
+ 'ND60': string;
35
+ 'ND70': string;
36
+ 'ND80': string;
37
+ 'ND90': string;
38
+ 'ND95': string;
39
+ 'ND97': string;
40
+ 'NL0': string;
41
+ 'NL10': string;
42
+ 'NL20': string;
43
+ 'NL30': string;
44
+ 'NL40': string;
45
+ 'NL50': string;
46
+ 'NL60': string;
47
+ 'NL70': string;
48
+ 'NL80': string;
49
+ 'NL90': string;
50
+ 'NL95': string;
51
+ 'NL97': string;
52
+ 'SA10': string;
53
+ 'SA20': string;
54
+ 'SA30': string;
55
+ 'SA40': string;
56
+ 'SA50': string;
57
+ 'SA60': string;
58
+ 'SA70': string;
59
+ 'SA80': string;
60
+ 'SA90': string;
61
+ 'SA95': string;
62
+ 'SA98': string;
63
+ 'SB10': string;
64
+ 'SB20': string;
65
+ 'SB30': string;
66
+ 'SB40': string;
67
+ 'SB50': string;
68
+ 'SB60': string;
69
+ 'SB70': string;
70
+ 'SB80': string;
71
+ 'SB90': string;
72
+ 'SB95': string;
73
+ 'SB98': string;
74
+ 'SC10': string;
75
+ 'SC20': string;
76
+ 'SC30': string;
77
+ 'SC40': string;
78
+ 'SC50': string;
79
+ 'SC60': string;
80
+ 'SC70': string;
81
+ 'SC80': string;
82
+ 'SC90': string;
83
+ 'SC95': string;
84
+ 'SC98': string;
85
+ 'SHADOW_BODY_TOP_LEFT': string;
86
+ 'SHADOW_L': string;
87
+ 'SHADOW_LG': string;
88
+ 'SHADOW_MD': string;
89
+ 'SHADOW_SM': string;
90
+ 'SHADOW_XL': string;
91
+ 'SHADOW_XS': string;
92
+ 'TA10': string;
93
+ 'TA20': string;
94
+ 'TA30': string;
95
+ 'TA40': string;
96
+ 'TA50': string;
97
+ 'TA60': string;
98
+ 'TA70': string;
99
+ 'TA80': string;
100
+ 'TA90': string;
101
+ 'TA95': string;
102
+ 'TA98': string;
103
+ 'TB10': string;
104
+ 'TB20': string;
105
+ 'TB30': string;
106
+ 'TB40': string;
107
+ 'TB50': string;
108
+ 'TB60': string;
109
+ 'TB70': string;
110
+ 'TB80': string;
111
+ 'TB90': string;
112
+ 'TB95': string;
113
+ 'TB98': string;
114
+ 'TC10': string;
115
+ 'TC20': string;
116
+ 'TC30': string;
117
+ 'TC40': string;
118
+ 'TC50': string;
119
+ 'TC60': string;
120
+ 'TC70': string;
121
+ 'TC80': string;
122
+ 'TC90': string;
123
+ 'TC95': string;
124
+ 'TC98': string;
125
+ 'TD10': string;
126
+ 'TD20': string;
127
+ 'TD30': string;
128
+ 'TD40': string;
129
+ 'TD50': string;
130
+ 'TD60': string;
131
+ 'TD70': string;
132
+ 'TD80': string;
133
+ 'TD90': string;
134
+ 'TD95': string;
135
+ 'TD98': string;
136
+ 'TE10': string;
137
+ 'TE20': string;
138
+ 'TE30': string;
139
+ 'TE40': string;
140
+ 'TE50': string;
141
+ 'TE60': string;
142
+ 'TE70': string;
143
+ 'TE80': string;
144
+ 'TE90': string;
145
+ 'TE95': string;
146
+ 'TE98': string;
147
+ 'TF10': string;
148
+ 'TF20': string;
149
+ 'TF30': string;
150
+ 'TF40': string;
151
+ 'TF50': string;
152
+ 'TF60': string;
153
+ 'TF70': string;
154
+ 'TF80': string;
155
+ 'TF90': string;
156
+ 'TF95': string;
157
+ 'TF98': string;
158
+ 'TG10': string;
159
+ 'TG20': string;
160
+ 'TG30': string;
161
+ 'TG40': string;
162
+ 'TG50': string;
163
+ 'TG60': string;
164
+ 'TG70': string;
165
+ 'TG80': string;
166
+ 'TG90': string;
167
+ 'TG95': string;
168
+ 'TG98': string;
169
+ 'TH10': string;
170
+ 'TH20': string;
171
+ 'TH30': string;
172
+ 'TH40': string;
173
+ 'TH50': string;
174
+ 'TH60': string;
175
+ 'TH70': string;
176
+ 'TH80': string;
177
+ 'TH90': string;
178
+ 'TH95': string;
179
+ 'TH98': string;
180
+ 'ald-divider': string;
181
+ }
182
+ export const cssExports: CssExports;
183
+ export default cssExports;
@@ -41,7 +41,7 @@ export interface IDropdownButton {
41
41
  * @description 菜单弹出位置
42
42
  * @default bottomLeft
43
43
  */
44
- placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
44
+ placement?: 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
45
45
  /**
46
46
  * @description 触发下拉的行为
47
47
  * @type ActionType[], 其中 ActionType 为 'hover' | 'click' | 'contextMenu';
@@ -52,12 +52,12 @@ export interface IDropdownButton {
52
52
  * @description 菜单是否显示
53
53
  * @default -
54
54
  */
55
- visible?: boolean;
55
+ open?: boolean;
56
56
  /**
57
- * @description 菜单显示状态改变时调用,参数为 visible,点击菜单按钮导致的消失不会触发
57
+ * @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
58
58
  * @default -
59
59
  */
60
- onVisibleChange?: (visible: boolean) => void;
60
+ onOpenChange?: (open: boolean) => void;
61
61
  /**
62
62
  * @description 点击按钮时的回调
63
63
  * FIXME: onClick和trigger冲突,antd按钮和下拉菜单触发区域不同,需要和视觉确认
@@ -1,6 +1,6 @@
1
1
  import "@aloudata/icons-react/styles/index.less";
2
2
  import _ArrowsDownLine from "@aloudata/icons-react/es/icons/ArrowsDownLine";
3
- var _excluded = ["children", "overlay", "placement", "trigger", "visible", "disabled", "onVisibleChange"];
3
+ var _excluded = ["children", "overlay", "placement", "trigger", "open", "disabled", "onOpenChange"];
4
4
 
5
5
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
6
 
@@ -16,18 +16,18 @@ export default function DropdownButton(props) {
16
16
  overlay = props.overlay,
17
17
  placement = props.placement,
18
18
  trigger = props.trigger,
19
- visible = props.visible,
19
+ open = props.open,
20
20
  disabled = props.disabled,
21
- onVisibleChange = props.onVisibleChange,
21
+ onOpenChange = props.onOpenChange,
22
22
  buttonProps = _objectWithoutProperties(props, _excluded);
23
23
 
24
24
  return /*#__PURE__*/React.createElement(Dropdown, {
25
25
  overlay: overlay,
26
26
  placement: placement,
27
27
  trigger: trigger,
28
- visible: visible,
28
+ open: open,
29
29
  disabled: disabled,
30
- onVisibleChange: onVisibleChange
30
+ onOpenChange: onOpenChange
31
31
  }, /*#__PURE__*/React.createElement(Button, Object.assign({}, buttonProps), children, /*#__PURE__*/React.createElement(_ArrowsDownLine, {
32
32
  fill: "currentColor"
33
33
  })));
@@ -13,7 +13,7 @@ declare type Align = {
13
13
  useCssTransform?: boolean;
14
14
  };
15
15
  export declare type ActionType = 'hover' | 'click' | 'contextMenu';
16
- export declare type PlacementType = 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
16
+ export declare type PlacementType = 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
17
17
  export interface IDropdownProps {
18
18
  /**
19
19
  * @description 位置状态
@@ -45,7 +45,7 @@ export interface IDropdownProps {
45
45
  * @description 菜单弹出位置
46
46
  * @default bottomLeft
47
47
  */
48
- placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
48
+ placement?: 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
49
49
  /**
50
50
  * @description 触发下拉的行为
51
51
  * @type ActionType[], 其中 ActionType 为 'hover' | 'click' | 'contextMenu';
@@ -56,12 +56,12 @@ export interface IDropdownProps {
56
56
  * @description 菜单是否显示
57
57
  * @default -
58
58
  */
59
- visible?: boolean;
59
+ open?: boolean;
60
60
  /**
61
- * @description 菜单显示状态改变时调用,参数为 visible,点击菜单按钮导致的消失不会触发
61
+ * @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
62
62
  * @default -
63
63
  */
64
- onVisibleChange?: (visible: boolean) => void;
64
+ onOpenChange?: (open: boolean) => void;
65
65
  /**
66
66
  * @description 下拉框的属性
67
67
  * @default -
@@ -1,6 +1,6 @@
1
1
  import "antd/es/dropdown/style";
2
2
  import _Dropdown from "antd/es/dropdown";
3
- var _excluded = ["children", "visible"];
3
+ var _excluded = ["children", "open"];
4
4
 
5
5
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
6
 
@@ -11,14 +11,14 @@ import React from 'react';
11
11
  import DropdownButton from './Button';
12
12
  export default function Dropdown(props) {
13
13
  var children = props.children,
14
- visible = props.visible,
15
- otherProps = _objectWithoutProperties(props, _excluded); // antd根据visible字段是否存在来判断visible是否是可控模式
14
+ open = props.open,
15
+ otherProps = _objectWithoutProperties(props, _excluded); // antd 根据 open 字段是否存在来判断 open 是否是可控模式
16
16
 
17
17
 
18
18
  var antdDropdownProps = otherProps;
19
19
 
20
- if (visible !== undefined) {
21
- antdDropdownProps.visible = visible;
20
+ if (open !== undefined) {
21
+ antdDropdownProps.open = open;
22
22
  }
23
23
 
24
24
  return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({}, antdDropdownProps), children);
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ id: number;
3
+ title: string;
4
+ name: string;
5
+ category: string;
6
+ categoryCN: string;
7
+ author: string;
8
+ }[];
9
+ export default _default;