@hw-component/table 1.10.30 → 1.10.31

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.
@@ -96,6 +96,7 @@ var TagsComponent = function TagsComponent(props) {
96
96
  color: color,
97
97
  icon: icon
98
98
  };
99
+ var tagWidth = closable ? "calc(100% - 18px)" : "100%";
99
100
  var indexKey = index.toString();
100
101
  if (typeof tagItem === "string") {
101
102
  var _tooltipProps = getTooltipProps({
@@ -107,7 +108,7 @@ var TagsComponent = function TagsComponent(props) {
107
108
  return jsx(Tooltip, _objectSpread(_objectSpread({}, _tooltipProps), {}, {
108
109
  children: jsx(Tag, _objectSpread(_objectSpread({
109
110
  style: _objectSpread({
110
- maxWidth: "100%"
111
+ maxWidth: tagWidth
111
112
  }, tagStyle)
112
113
  }, tagProps), {}, {
113
114
  onClose: function onClose(e) {
@@ -133,7 +134,7 @@ var TagsComponent = function TagsComponent(props) {
133
134
  return jsx(Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
134
135
  children: jsx(Tag, _objectSpread(_objectSpread({
135
136
  style: _objectSpread({
136
- maxWidth: "100%"
137
+ maxWidth: tagWidth
137
138
  }, tagStyle)
138
139
  }, cuTagProps), {}, {
139
140
  onClose: function onClose(e) {
@@ -99,6 +99,7 @@ var TagsComponent = function TagsComponent(props) {
99
99
  color: color,
100
100
  icon: icon
101
101
  };
102
+ var tagWidth = closable ? "calc(100% - 18px)" : "100%";
102
103
  var indexKey = index.toString();
103
104
  if (typeof tagItem === "string") {
104
105
  var _tooltipProps = getTooltipProps({
@@ -110,7 +111,7 @@ var TagsComponent = function TagsComponent(props) {
110
111
  return jsxRuntime.jsx(antd.Tooltip, _objectSpread(_objectSpread({}, _tooltipProps), {}, {
111
112
  children: jsxRuntime.jsx(antd.Tag, _objectSpread(_objectSpread({
112
113
  style: _objectSpread({
113
- maxWidth: "100%"
114
+ maxWidth: tagWidth
114
115
  }, tagStyle)
115
116
  }, tagProps), {}, {
116
117
  onClose: function onClose(e) {
@@ -136,7 +137,7 @@ var TagsComponent = function TagsComponent(props) {
136
137
  return jsxRuntime.jsx(antd.Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
137
138
  children: jsxRuntime.jsx(antd.Tag, _objectSpread(_objectSpread({
138
139
  style: _objectSpread({
139
- maxWidth: "100%"
140
+ maxWidth: tagWidth
140
141
  }, tagStyle)
141
142
  }, cuTagProps), {}, {
142
143
  onClose: function onClose(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "1.10.30",
3
+ "version": "1.10.31",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -87,6 +87,7 @@ const TagsComponent = (props: IProps) => {
87
87
  color,
88
88
  icon,
89
89
  };
90
+ const tagWidth=closable?`calc(100% - 18px)`:"100%";
90
91
  const indexKey = index.toString();
91
92
  if (typeof tagItem === "string") {
92
93
  const tooltipProps = getTooltipProps({ title: tagItem }, tooltip);
@@ -96,7 +97,7 @@ const TagsComponent = (props: IProps) => {
96
97
  <Tag
97
98
  key={indexKey}
98
99
  style={{
99
- maxWidth: "100%",
100
+ maxWidth:tagWidth,
100
101
  ...tagStyle
101
102
  }}
102
103
  {...tagProps}
@@ -126,7 +127,7 @@ const TagsComponent = (props: IProps) => {
126
127
  <Tag
127
128
  key={cuKey}
128
129
  style={{
129
- maxWidth: "100%",
130
+ maxWidth:tagWidth,
130
131
  ...tagStyle
131
132
  }}
132
133
  {...cuTagProps}