@kdcloudjs/kdesign 1.6.17 → 1.6.18

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.
@@ -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.18",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [