@ecoding/components.antd 0.3.33 → 0.3.34

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.
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo } from 'react';
2
- import { Typography, Form, Button, Space } from 'antd';
3
- import { PlusCircleOutlined } from '@ant-design/icons';
2
+ import { Typography, Form, Button, Space, Tooltip } from 'antd';
3
+ import { PlusCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
4
4
  const C = ({ columns, rules, name, hideOperation, hideHeader, hideBottom, operation, i18n, afterRemove, afterAdd }) => {
5
5
  const tdStyle = {
6
6
  verticalAlign: 'top',
@@ -38,10 +38,14 @@ const C = ({ columns, rules, name, hideOperation, hideHeader, hideBottom, operat
38
38
  if (column.require) {
39
39
  return (React.createElement("th", { style: Object.assign({}, thStyle, { width: column.width || 200 }) },
40
40
  React.createElement("span", { style: { color: '#ff4d4f' } }, "*"),
41
- " ",
42
- column.title));
41
+ column.title,
42
+ column.tooltip ? (React.createElement(Tooltip, { placement: "top", title: column.tooltip || undefined },
43
+ React.createElement(QuestionCircleOutlined, { style: { paddingLeft: 4, color: "rgba(0, 0, 0, 0.45)" } }))) : null));
43
44
  }
44
- return React.createElement("th", { style: Object.assign({}, thStyle, { width: column.width || 200 }) }, column.title);
45
+ return (React.createElement("th", { style: Object.assign({}, thStyle, { width: column.width || 200 }) },
46
+ column.title,
47
+ column.tooltip ? (React.createElement(Tooltip, { placement: "top", title: column.tooltip || undefined },
48
+ React.createElement(QuestionCircleOutlined, { style: { paddingLeft: 4, color: "rgba(0, 0, 0, 0.45)" } }))) : null));
45
49
  }),
46
50
  hideOperation ? null : operation ? (React.createElement("th", { style: Object.assign({}, thStyle, { width: operation.width || 150, right: 0, position: "sticky" }) }, operation.title || "操作")) : (React.createElement("th", { style: Object.assign({}, thStyle, { width: 150, right: 0, position: "sticky" }) }, i18n ? i18n.$t("global.operation", "操作") : "操作"))))),
47
51
  React.createElement("tbody", null, fields.map((field, index) => {
@@ -49,7 +53,7 @@ const C = ({ columns, rules, name, hideOperation, hideHeader, hideBottom, operat
49
53
  React.createElement("td", { style: tdStyle }, index + 1),
50
54
  columns.map((column, i) => {
51
55
  return (React.createElement("td", { style: tdStyle },
52
- React.createElement(Form.Item, { style: { marginBottom: 0 }, tooltip: column.tooltip || undefined, name: [field.name, column.name], rules: column.rules || [] }, column.render(field, index))));
56
+ React.createElement(Form.Item, { style: { marginBottom: 0 }, name: [field.name, column.name], rules: column.rules || [] }, column.render(field, index))));
53
57
  }),
54
58
  hideOperation ? null : operation ? (React.createElement("td", { style: Object.assign({}, tdStyle, { right: 0, position: "sticky", backgroundColor: "#fff" }) },
55
59
  React.createElement(Space, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.33",
3
+ "version": "0.3.34",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -43,5 +43,5 @@
43
43
  "antd": "^5.8.4",
44
44
  "axios": "^1.1.2"
45
45
  },
46
- "gitHead": "51ec61416c94404bff5dc0fbe8ed011a5b33466f"
46
+ "gitHead": "aec3b5b35f5a1ebedc7f09c378da17403aa2e574"
47
47
  }