@kdcloudjs/kdesign 1.6.17 → 1.6.19

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.
@@ -10,7 +10,6 @@
10
10
  box-sizing: border-box;
11
11
  background-color: transparent;
12
12
  cursor: pointer;
13
- margin: 0 8px 2px 0;
14
13
  vertical-align: middle;
15
14
 
16
15
  &-selector:hover {
@@ -158,10 +157,15 @@
158
157
  min-width: 75px;
159
158
 
160
159
  &-content {
161
- display: flex;
162
- align-items: center;
163
- flex: auto;
164
160
  .over();
161
+
162
+ .@{kd-prefix}-checkbox {
163
+ width: 100%;
164
+
165
+ .@{kd-prefix}-checkbox-children {
166
+ display: inline-block;
167
+ }
168
+ }
165
169
  }
166
170
 
167
171
  &:hover:not(&-selected):not(&-disabled) {
@@ -208,7 +212,7 @@
208
212
  justify-content: center;
209
213
  margin-left: 8px;
210
214
  }
211
- &-single {
215
+ .@{select-prefix-cls}-single {
212
216
  .@{select-prefix-cls}-selection {
213
217
  &-search {
214
218
  position: absolute;
@@ -224,6 +228,10 @@
224
228
  width: 100%;
225
229
  }
226
230
  }
231
+ &-item {
232
+ display: inline-block;
233
+ .over();
234
+ }
227
235
  }
228
236
  &-focused {
229
237
  .focusColor();
@@ -270,14 +278,14 @@
270
278
  cursor: default;
271
279
  user-select: none;
272
280
  &-small {
273
- height: 18px;
281
+ height: 20px;
274
282
  line-height: 18px;
275
283
  font-size: 12px;
276
284
  }
277
285
 
278
286
  &-middle {
279
287
  font-size: 12px;
280
- height: 18px;
288
+ height: 20px;
281
289
  line-height: 18px;
282
290
  }
283
291
 
@@ -320,6 +328,14 @@
320
328
  // 多选
321
329
  &-multiple {
322
330
  .@{select-prefix-cls}-selection {
331
+ &-tag {
332
+ max-width: calc(100% - 5px);
333
+
334
+ .@{kd-prefix}-tag {
335
+ margin: 2px 8px 2px 0;
336
+ max-width: 100%;
337
+ }
338
+ }
323
339
  &-search {
324
340
  position: relative;
325
341
  max-width: 100%;
@@ -105,6 +105,11 @@
105
105
  -webkit-transition: all var(--kd-c-tag-motion-duration, var(--kd-g-duration, 0.3s));
106
106
  transition: all var(--kd-c-tag-motion-duration, var(--kd-g-duration, 0.3s));
107
107
  }
108
+ .kd-tag-ellipsis {
109
+ white-space: nowrap;
110
+ overflow: hidden;
111
+ text-overflow: ellipsis;
112
+ }
108
113
  .kd-tag-size-small {
109
114
  font-size: var(--kd-c-tag-font-size-small, var(--kd-g-font-size-small, 12px));
110
115
  height: var(--kd-c-tag-sizing-height-small, 20px);
@@ -468,6 +473,9 @@
468
473
  }
469
474
  .kd-tag-text {
470
475
  margin-left: 6px;
476
+ white-space: nowrap;
477
+ overflow: hidden;
478
+ text-overflow: ellipsis;
471
479
  }
472
480
  .kd-tag-closable-disabled {
473
481
  background-color: var(--kd-c-tag-edit-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5));
@@ -7,6 +7,12 @@
7
7
  @colors: @tag-process-color, @tag-success-color, @tag-warning-color, @tag-error-color, @tag-end-color, @tag-expired-color;
8
8
 
9
9
  .@{tag-prefix-cls} {
10
+ &-ellipsis {
11
+ white-space: nowrap;
12
+ overflow: hidden;
13
+ text-overflow: ellipsis;
14
+ }
15
+
10
16
  &-size-small {
11
17
  .tag-size(@tag-small-font-size, @tag-small-height, @tag-small-padding-horizontal);
12
18
  }
@@ -89,6 +95,9 @@
89
95
  // 图标设置外边距
90
96
  &-text {
91
97
  margin-left: 6px;
98
+ white-space: nowrap;
99
+ overflow: hidden;
100
+ text-overflow: ellipsis;
92
101
  }
93
102
 
94
103
  &-closable-disabled {
package/lib/tag/tag.js CHANGED
@@ -114,13 +114,17 @@ var InteranalTag = function InteranalTag(props, ref) {
114
114
  var tagRef = ref || thisTagRef; // 对children进行进一步处理 当标签包含图标时 文本内容需要用标签包裹设置外边距
115
115
 
116
116
  var handleChild = function handleChild(child) {
117
+ if (!child) return null;
118
+
117
119
  if (typeof child === 'string' && icon) {
118
120
  return /*#__PURE__*/_react.default.createElement("span", {
119
121
  className: "".concat(tagPrefixCls, "-text")
120
122
  }, child);
121
123
  }
122
124
 
123
- return child;
125
+ return /*#__PURE__*/_react.default.createElement("span", {
126
+ className: "".concat(tagPrefixCls, "-ellipsis")
127
+ }, child);
124
128
  }; // 预设的颜色值
125
129
 
126
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.6.17",
3
+ "version": "1.6.19",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [