tntd 1.3.53 → 1.3.54

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.
@@ -4,7 +4,7 @@ import { addUnitForValue } from './utils';
4
4
 
5
5
  const Box = ({
6
6
  inLayout,
7
- clsPrefix,
7
+ clsPrefix = 'tnt-page',
8
8
  children,
9
9
  noPadding = false,
10
10
  headerHeight,
@@ -46,8 +46,8 @@ const Box = ({
46
46
  bordered={bordered}
47
47
  bodyStyle={{
48
48
  ...bodyStyle,
49
- overflow: 'auto',
50
- height: inLayout ? 'auto' : cardBodyHeight
49
+ // overflow: 'auto',
50
+ height: inLayout ? `calc(100% - ${headerHeight})` : cardBodyHeight
51
51
  }}
52
52
  size={size}
53
53
  headStyle={headStyle}
@@ -67,8 +67,8 @@ const Demo = (props) => {
67
67
  <h3>第三种场景, 无标题栏</h3>
68
68
 
69
69
  <Page height="400px">
70
- <Box title='分组列表' extra={<Button type="primary" size="small">添加</Button>}>第一列</Box>
71
- <Box mode="white" title='菜单列表' extra={<Button type="primary" size="small">添加</Button>}>第二列</Box>
70
+ <Box title='分组列表' extra={<Button type="primary" size='small'>添加</Button>}>第一列</Box>
71
+ <Box mode="white" title='菜单列表' extra={<Button type="primary" size='small'>添加</Button>}>第二列</Box>
72
72
  <Box title="系统列表">第三列</Box>
73
73
  <Box title="功能注册">第四列</Box>
74
74
  </Page>
@@ -86,7 +86,13 @@ const Demo = (props) => {
86
86
  // extra={right}
87
87
  inLayout
88
88
  >
89
- <Box title="系统列表" width={320}>第三列</Box>
89
+ <Box
90
+ title="系统列表"
91
+ width={320}
92
+ mode='white'
93
+ >
94
+ 第三列
95
+ </Box>
90
96
  <Box title="功能注册">
91
97
  第四列<br/>
92
98
  第四列<br/>
@@ -114,7 +120,14 @@ const Demo = (props) => {
114
120
  第四列<br/>
115
121
  第四列<br/>
116
122
  第四列<br/>
117
- 第四列<br/>
123
+ 第四列end
124
+ </Box>
125
+ <Box
126
+ title="系统列表"
127
+ width={200}
128
+ mode='white'
129
+ >
130
+ 第三列
118
131
  </Box>
119
132
  </Page>
120
133
  </Layout>
@@ -154,7 +167,6 @@ ReactDOM.render(<Demo />, document.getElementById('root'))
154
167
 
155
168
 
156
169
 
157
-
158
170
  #### Page.Box
159
171
 
160
172
  描述:Page.Box包裹了antd库中的Card组件,Box属性都会透传到Card组件。
@@ -62,9 +62,9 @@ const PageLayout = ({
62
62
  console.log(boxCount);
63
63
 
64
64
  whiteCols = childrenToArray?.filter(({ props }) => props?.mode === 'white')?.length;
65
- const total = childrenToArray?.length;
65
+ const total = childrenToArray?.length + 5;
66
66
  let startIndex = total - whiteCols - 1;
67
- let endIndex = total - 1;
67
+ let endIndex = total - 2;
68
68
  const headerStyle = {
69
69
  height: computedHeaderHeight,
70
70
  padding: `${size === 'small' ? 20 : 24}px`,
@@ -140,7 +140,7 @@ const PageLayout = ({
140
140
  const style = {
141
141
  flex: computeWidth(width),
142
142
  // 设置cols层级关系
143
- zIndex: mode === 'gray' ? startIndex-- : endIndex--
143
+ zIndex: mode === 'gray' ? endIndex-- : startIndex++
144
144
  };
145
145
 
146
146
  const className = cn(`${clsPrefix}-box ${clsPrefix}-box-${mode}`);
@@ -1,26 +1,46 @@
1
+ .large-size > .ant-layout-content {
2
+ .tnt-page.in-layout {
3
+ height: calc(100vh - 60px);
4
+ }
5
+ }
1
6
  .tnt-page {
2
7
  position: relative;
3
8
  width: 100%;
4
9
  height: 100%;
5
10
  overflow-y: hidden;
6
11
 
12
+ &.in-layout {
13
+ box-shadow: none;
14
+ height: calc(100vh - 50px);
15
+ .tnt-page-box,
16
+ .tnt-page-box > .ant-card {
17
+ height: 100%;
18
+ }
19
+ .tnt-page-content .tnt-page-box .ant-card .ant-card-body {
20
+ overflow-x: hidden;
21
+ overflow-y: auto;
22
+ }
23
+ }
24
+
7
25
  &-box-white {
8
26
  z-index: 1;
9
27
  background: #f3f5f6;
10
28
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1), 0 10px 12px 2px rgba(170, 182, 206, 0.2);
11
- .inLayout & {
12
- background: #fbfcfe;
13
- box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1), 0 6px 10px 2px rgba(170, 182, 206, 0.2);
29
+
30
+ .in-layout & {
31
+ background: #fafbfc;
14
32
  }
15
33
  }
16
34
 
35
+
17
36
  &-box-gray {
18
37
  background: #e8ebed;
19
38
  box-shadow: 0 10px 12px 2px rgba(0, 0, 0, 0.1);
20
39
 
21
- .inLayout & {
40
+ .in-layout & {
22
41
  background: #f8f9fa;
23
- box-shadow: 0 5px 5px 2px rgba(0, 0, 0, 0.1);
42
+ // box-shadow: 0 5px 5px 2px rgba(0, 0, 0, 0.1);
43
+ box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.1);
24
44
  }
25
45
  }
26
46
 
@@ -36,7 +56,7 @@
36
56
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1),
37
57
  0 10px 6px 0 rgba(170, 182, 206, 0.2);
38
58
 
39
- .inLayout & {
59
+ .in-layout & {
40
60
  background: #ffffff;
41
61
  box-shadow: none;
42
62
  }
@@ -76,9 +96,13 @@
76
96
  .ant-card-head {
77
97
  border-bottom: 1px solid #e0e0e0;
78
98
  margin-bottom: 0;
79
- height: 60px;
99
+ // height: 60px;
80
100
  .small & {
81
101
  height: 40px;
102
+ line-height: 40px;
103
+ }
104
+ .ant-card-head-title {
105
+ font-weight: normal;
82
106
  }
83
107
  }
84
108
  .ant-card-body {
package/lib/Page/Box.js CHANGED
@@ -29,7 +29,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
29
29
 
30
30
  var Box = function Box(_ref) {
31
31
  var inLayout = _ref.inLayout,
32
- clsPrefix = _ref.clsPrefix,
32
+ _ref$clsPrefix = _ref.clsPrefix,
33
+ clsPrefix = _ref$clsPrefix === void 0 ? 'tnt-page' : _ref$clsPrefix,
33
34
  children = _ref.children,
34
35
  _ref$noPadding = _ref.noPadding,
35
36
  noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
@@ -73,8 +74,8 @@ var Box = function Box(_ref) {
73
74
  className: "".concat(clsPrefix, "-box-card"),
74
75
  bordered: bordered,
75
76
  bodyStyle: _objectSpread({}, bodyStyle, {
76
- overflow: 'auto',
77
- height: inLayout ? 'auto' : cardBodyHeight
77
+ // overflow: 'auto',
78
+ height: inLayout ? "calc(100% - ".concat(headerHeight, ")") : cardBodyHeight
78
79
  }),
79
80
  size: size,
80
81
  headStyle: headStyle
@@ -67,8 +67,8 @@ const Demo = (props) => {
67
67
  <h3>第三种场景, 无标题栏</h3>
68
68
 
69
69
  <Page height="400px">
70
- <Box title='分组列表' extra={<Button type="primary" size="small">添加</Button>}>第一列</Box>
71
- <Box mode="white" title='菜单列表' extra={<Button type="primary" size="small">添加</Button>}>第二列</Box>
70
+ <Box title='分组列表' extra={<Button type="primary" size='small'>添加</Button>}>第一列</Box>
71
+ <Box mode="white" title='菜单列表' extra={<Button type="primary" size='small'>添加</Button>}>第二列</Box>
72
72
  <Box title="系统列表">第三列</Box>
73
73
  <Box title="功能注册">第四列</Box>
74
74
  </Page>
@@ -86,7 +86,13 @@ const Demo = (props) => {
86
86
  // extra={right}
87
87
  inLayout
88
88
  >
89
- <Box title="系统列表" width={320}>第三列</Box>
89
+ <Box
90
+ title="系统列表"
91
+ width={320}
92
+ mode='white'
93
+ >
94
+ 第三列
95
+ </Box>
90
96
  <Box title="功能注册">
91
97
  第四列<br/>
92
98
  第四列<br/>
@@ -114,7 +120,14 @@ const Demo = (props) => {
114
120
  第四列<br/>
115
121
  第四列<br/>
116
122
  第四列<br/>
117
- 第四列<br/>
123
+ 第四列end
124
+ </Box>
125
+ <Box
126
+ title="系统列表"
127
+ width={200}
128
+ mode='white'
129
+ >
130
+ 第三列
118
131
  </Box>
119
132
  </Page>
120
133
  </Layout>
@@ -154,7 +167,6 @@ ReactDOM.render(<Demo />, document.getElementById('root'))
154
167
 
155
168
 
156
169
 
157
-
158
170
  #### Page.Box
159
171
 
160
172
  描述:Page.Box包裹了antd库中的Card组件,Box属性都会透传到Card组件。
@@ -0,0 +1,302 @@
1
+ import React from 'react';
2
+ import cn from 'classnames';
3
+ <<<<<<< HEAD
4
+ import styled from 'styled-components';
5
+ import { Icon } from "antd";
6
+ =======
7
+ >>>>>>> b0d5e9811a677a0f26474e1b615ccac1683b6dec
8
+ import { computeWidth, addUnitForValue } from './utils';
9
+ import Box from './Box';
10
+ import './index.less';
11
+
12
+ <<<<<<< HEAD
13
+ const PageWrapper = styled.div`
14
+ position: relative;
15
+ width: 100%;
16
+ overflow-y: hidden;
17
+ .box-white {
18
+ z-index: 1;
19
+ background: ${(props) => `${props.inLayout ? '#fbfcfe' : '#f3f5f6'}`};
20
+ box-shadow: ${(props) => {
21
+ let boxShadow = '0 0 6px 0 rgba(0, 0, 0, 0.1), 0 10px 12px 2px rgba(170, 182, 206, 0.2)';
22
+ if (props.inLayout) {
23
+ boxShadow = '0 0 4px 0 rgba(0, 0, 0, 0.1), 0 6px 10px 2px rgba(170, 182, 206, 0.2)';
24
+ }
25
+ return boxShadow;
26
+ }};
27
+ }
28
+ .box-gray {
29
+ background: ${(props) => `${props.inLayout ? '#f8f9fa' : '#e8ebed'}`};
30
+ // box-shadow: 0 10px 12px 2px rgba(0, 0, 0, 0.1);
31
+ box-shadow: ${(props) => `${props.inLayout ? '0 5px 5px 2px rgba(0, 0, 0, 0.1)' : '0 10px 12px 2px rgba(0, 0, 0, 0.1)'}`};
32
+ }
33
+ `;
34
+ const HeaderWrapper = styled.div`
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ right: 0;
39
+ height: ${(props) => `${props.headerHeight}`};
40
+ padding: ${(props) => `${props.size === 'small' ? 20 : 24}px`};
41
+ z-index: ${(props) => `${props.zIndex}`};
42
+ display: flex;
43
+ flex-direction: row;
44
+ justify-content: space-between;
45
+ background: ${(props) => `${props.inLayout ? '#ffffff' : '#f0f2f3'}`};
46
+ box-shadow: ${(props) =>
47
+ `${props.inLayout
48
+ ? 'none'
49
+ : '0 0 6px 0 rgba(0, 0, 0, 0.1),0 10px 6px 0 rgba(170, 182, 206, 0.2)'
50
+ }`};
51
+ `;
52
+ const ContentWrapper = styled.div`
53
+ display: ${(props) => `${props.boxCount > 0 ? 'flex' : 'block'}`};;
54
+ flex-direction: row;
55
+ width: 100%;
56
+ margin-top: ${(props) => `${props.contentMarginTop}`};
57
+ padding: ${(props) => `${props.contentPadding}`};
58
+ position: relative;
59
+ z-index:0;
60
+ `;
61
+ const Section = styled.div`
62
+ display: flex;
63
+ align-items: center;
64
+ &:nth-child(1) > * {
65
+ margin-right: 10px;
66
+ }
67
+ &:nth-child(2) > * {
68
+ margin: 0 5px;
69
+ }
70
+ &:nth-child(3) > * {
71
+ margin-left: 10px;
72
+ }
73
+ `;
74
+
75
+ const GoBack = styled.div`
76
+ position: relative;
77
+ display: inline-block;
78
+ margin-right: 40px !important;
79
+ cursor: pointer;
80
+ &::after {
81
+ content: "";
82
+ position: absolute;
83
+ width: 1px;
84
+ height: 16px;
85
+ right: -20px;
86
+ top: 50%;
87
+ transform: translateY(-50%);
88
+ background-color: #dcdfe6;
89
+ }
90
+ &:hover {
91
+ &,i {
92
+ color: #126BFB;
93
+ }
94
+ }
95
+ i {
96
+ font-size: 14px;
97
+ margin-right: 6px;
98
+ color: #4c4c4c;
99
+ }
100
+ span {
101
+ font-size: 14px;
102
+ font-weight: normal;
103
+ }
104
+ `;
105
+
106
+ const BoxWrapper = styled.div`
107
+ overflow: auto;
108
+ `;
109
+ =======
110
+ const clsPrefix = 'tnt-page';
111
+ >>>>>>> b0d5e9811a677a0f26474e1b615ccac1683b6dec
112
+
113
+ const PageLayout = ({
114
+ className,
115
+ height = '100vh',
116
+ headerHeight = 50,
117
+ children,
118
+ title,
119
+ goBack,
120
+ goBackText,
121
+ center,
122
+ extra,
123
+ size = 'small',
124
+ inLayout = false,
125
+ className,
126
+ ...restProps
127
+ }) => {
128
+ // 如果传入只有数字,需要默认加px
129
+ let computedHeaderHeight = addUnitForValue(headerHeight);
130
+ let computedHeight = addUnitForValue(height);
131
+
132
+ // 判断是否有标题栏
133
+ if (!(title || extra || center)) {
134
+ computedHeaderHeight = '0px';
135
+ }
136
+
137
+ if (inLayout) {
138
+ computedHeaderHeight = '40px';
139
+ }
140
+
141
+ // 计算中间的zIndex,灰色递减,白色递增
142
+ let whiteCols = 0;
143
+ let childrenToArray = [];
144
+
145
+ // 计算children type是box的数量
146
+ let boxCount = 0;
147
+
148
+ // 如果children是单个节点,统一转为数组处理计算层级
149
+ console.log('children', children);
150
+
151
+ if (typeof children === 'object') {
152
+ childrenToArray = [children];
153
+ } else if (Array.isArray(children)) {
154
+ childrenToArray = [...children];
155
+ }
156
+
157
+ console.log('React.Children', React.Children);
158
+ React.Children.map(children, (child) => {
159
+ if (child.type === Box) {
160
+ boxCount += 1;
161
+ }
162
+ });
163
+
164
+ console.log(boxCount);
165
+
166
+ whiteCols = childrenToArray?.filter(({ props }) => props?.mode === 'white')?.length;
167
+ const total = childrenToArray?.length;
168
+ let startIndex = total - whiteCols - 1;
169
+ let endIndex = total - 1;
170
+ const headerStyle = {
171
+ height: computedHeaderHeight,
172
+ padding: `${size === 'small' ? 20 : 24}px`,
173
+ zIndex: total || 2
174
+ };
175
+ const contentStyle = {
176
+ display: boxCount > 0 ? 'flex' : 'block',
177
+ marginTop: computedHeaderHeight,
178
+ padding: inLayout ? '16px 20px' : '0px'
179
+ };
180
+
181
+ return (
182
+ <<<<<<< HEAD
183
+ <PageWrapper
184
+ className={cn('tntd-page-wrap', className)}
185
+ height={computedHeight}
186
+ inLayout={inLayout}
187
+ {...restProps}
188
+ >
189
+ {
190
+ (title || center || extra) &&
191
+ <HeaderWrapper
192
+ headerHeight={computedHeaderHeight}
193
+ size={size}
194
+ zIndex={total || 2}
195
+ inLayout={inLayout}
196
+ className='page-header-wrap'
197
+ >
198
+ {
199
+ title &&
200
+ <Section className='page-header-title'>
201
+ {
202
+ goBack &&
203
+ <GoBack
204
+ className='page-header-title-back'
205
+ onClick={() => {
206
+ goBack();
207
+ }}
208
+ >
209
+ <Icon type="left" />
210
+ <span>{goBackText ? goBackText : '返回'}</span>
211
+ </GoBack>
212
+ }
213
+ {title}
214
+ </Section>
215
+ }
216
+ {
217
+ center &&
218
+ <Section className='page-header-center'>{center}</Section>
219
+ }
220
+ {
221
+ extra &&
222
+ <Section className='page-header-extra'>{extra}</Section>
223
+ }
224
+ </HeaderWrapper>
225
+ }
226
+
227
+ <ContentWrapper
228
+ contentMarginTop={computedHeaderHeight}
229
+ contentPadding={inLayout ? '16px 20px' : '0px'}
230
+ boxCount={boxCount}
231
+ className='page-body-wrap'
232
+ >
233
+ =======
234
+ <div
235
+ className={
236
+ cn(clsPrefix, {
237
+ [className]: className,
238
+ inLayout
239
+ })
240
+ }
241
+ {...restProps}
242
+ >
243
+ {
244
+ (title || center || extra) && (
245
+ <div className={`${clsPrefix}-header`} style={headerStyle}>
246
+ {
247
+ [title, center, extra].filter(
248
+ item => !!item
249
+ ).map(item => (
250
+ <div className={`${clsPrefix}-header-section`}>
251
+ {item}
252
+ </div>
253
+ ))
254
+ }
255
+ </div>
256
+ )
257
+ }
258
+ <div className={`${clsPrefix}-content`} style={contentStyle}>
259
+ >>>>>>> b0d5e9811a677a0f26474e1b615ccac1683b6dec
260
+ {React.Children.map(children, (child) => {
261
+ // 如果children不是Box,就不需要多列布局
262
+ if (!child.type) {
263
+ // console.log("没有type");
264
+ return React.cloneElement(<div>{child}</div>);
265
+ }
266
+
267
+ const extraProps = {
268
+ headerHeight: computedHeaderHeight,
269
+ size,
270
+ height: computedHeight,
271
+ contentTotalMargin: inLayout ? '32px' : '0px',
272
+ ...child.props
273
+ };
274
+
275
+ if (child.type !== Box) {
276
+ return React.cloneElement(child, extraProps);
277
+ }
278
+
279
+ const { mode = 'gray', width } = child.props;
280
+
281
+ const style = {
282
+ flex: computeWidth(width),
283
+ // 设置cols层级关系
284
+ zIndex: mode === 'gray' ? startIndex-- : endIndex--
285
+ };
286
+
287
+ const className = cn(`${clsPrefix}-box ${clsPrefix}-box-${mode}`);
288
+
289
+ return React.createElement(
290
+ 'div',
291
+ { className, style },
292
+ React.cloneElement(child, extraProps)
293
+ );
294
+ })}
295
+ </div>
296
+ </div>
297
+ );
298
+ };
299
+
300
+ PageLayout.Box = Box;
301
+
302
+ export default PageLayout;
package/lib/Page/index.js CHANGED
@@ -108,9 +108,9 @@ var PageLayout = function PageLayout(_ref) {
108
108
  var props = _ref2.props;
109
109
  return (props == null ? void 0 : props.mode) === 'white';
110
110
  })) == null ? void 0 : _childrenToArray$filt.length;
111
- var total = (_childrenToArray2 = childrenToArray) == null ? void 0 : _childrenToArray2.length;
111
+ var total = ((_childrenToArray2 = childrenToArray) == null ? void 0 : _childrenToArray2.length) + 5;
112
112
  var startIndex = total - whiteCols - 1;
113
- var endIndex = total - 1;
113
+ var endIndex = total - 2;
114
114
  var headerStyle = {
115
115
  height: computedHeaderHeight,
116
116
  padding: "".concat(size === 'small' ? 20 : 24, "px"),
@@ -168,7 +168,7 @@ var PageLayout = function PageLayout(_ref) {
168
168
  var style = {
169
169
  flex: (0, _utils.computeWidth)(width),
170
170
  // 设置cols层级关系
171
- zIndex: mode === 'gray' ? startIndex-- : endIndex--
171
+ zIndex: mode === 'gray' ? endIndex-- : startIndex++
172
172
  };
173
173
  var className = (0, _classnames["default"])("".concat(clsPrefix, "-box ").concat(clsPrefix, "-box-").concat(mode));
174
174
  return _react["default"].createElement('div', {
@@ -1,26 +1,46 @@
1
+ .large-size > .ant-layout-content {
2
+ .tnt-page.in-layout {
3
+ height: calc(100vh - 60px);
4
+ }
5
+ }
1
6
  .tnt-page {
2
7
  position: relative;
3
8
  width: 100%;
4
9
  height: 100%;
5
10
  overflow-y: hidden;
6
11
 
12
+ &.in-layout {
13
+ box-shadow: none;
14
+ height: calc(100vh - 50px);
15
+ .tnt-page-box,
16
+ .tnt-page-box > .ant-card {
17
+ height: 100%;
18
+ }
19
+ .tnt-page-content .tnt-page-box .ant-card .ant-card-body {
20
+ overflow-x: hidden;
21
+ overflow-y: auto;
22
+ }
23
+ }
24
+
7
25
  &-box-white {
8
26
  z-index: 1;
9
27
  background: #f3f5f6;
10
28
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1), 0 10px 12px 2px rgba(170, 182, 206, 0.2);
11
- .inLayout & {
12
- background: #fbfcfe;
13
- box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1), 0 6px 10px 2px rgba(170, 182, 206, 0.2);
29
+
30
+ .in-layout & {
31
+ background: #fafbfc;
14
32
  }
15
33
  }
16
34
 
35
+
17
36
  &-box-gray {
18
37
  background: #e8ebed;
19
38
  box-shadow: 0 10px 12px 2px rgba(0, 0, 0, 0.1);
20
39
 
21
- .inLayout & {
40
+ .in-layout & {
22
41
  background: #f8f9fa;
23
- box-shadow: 0 5px 5px 2px rgba(0, 0, 0, 0.1);
42
+ // box-shadow: 0 5px 5px 2px rgba(0, 0, 0, 0.1);
43
+ box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.1);
24
44
  }
25
45
  }
26
46
 
@@ -36,7 +56,7 @@
36
56
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1),
37
57
  0 10px 6px 0 rgba(170, 182, 206, 0.2);
38
58
 
39
- .inLayout & {
59
+ .in-layout & {
40
60
  background: #ffffff;
41
61
  box-shadow: none;
42
62
  }
@@ -76,9 +96,13 @@
76
96
  .ant-card-head {
77
97
  border-bottom: 1px solid #e0e0e0;
78
98
  margin-bottom: 0;
79
- height: 60px;
99
+ // height: 60px;
80
100
  .small & {
81
101
  height: 40px;
102
+ line-height: 40px;
103
+ }
104
+ .ant-card-head-title {
105
+ font-weight: normal;
82
106
  }
83
107
  }
84
108
  .ant-card-body {
@@ -27,10 +27,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
27
27
 
28
28
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
29
 
30
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
31
-
32
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
33
-
34
30
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
31
 
36
32
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
@@ -50,8 +46,7 @@ var Option = _select["default"].Option;
50
46
  var _default = function _default(props) {
51
47
  var _props$options = props.options,
52
48
  options = _props$options === void 0 ? [] : _props$options,
53
- addonBeforeStyle = props.addonBeforeStyle,
54
- inputProps = _objectWithoutProperties(props, ["options", "addonBeforeStyle"]);
49
+ inputProps = _objectWithoutProperties(props, ["options"]);
55
50
 
56
51
  var _useState = (0, _react.useState)(options),
57
52
  _useState2 = _slicedToArray(_useState, 2),
@@ -84,10 +79,7 @@ var _default = function _default(props) {
84
79
 
85
80
  var addonBefore = _react["default"].createElement(_select["default"], {
86
81
  value: key,
87
- onChange: onKeyChange,
88
- style: _objectSpread({
89
- width: '120px'
90
- }, addonBeforeStyle)
82
+ onChange: onKeyChange
91
83
  }, items.map(function (_ref) {
92
84
  var label = _ref.label,
93
85
  value = _ref.value;