@ecoding/components.antd 0.2.29 → 0.2.30

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.
@@ -9,7 +9,7 @@ const C = ({ columns, rules, name, hideOperation, operation, i18n }) => {
9
9
  };
10
10
  const thStyle = {
11
11
  textAlign: 'left',
12
- backgroundColor: '#f9f9f9',
12
+ backgroundColor: '#fafafa',
13
13
  padding: '8px'
14
14
  };
15
15
  const trStyle = {
@@ -32,17 +32,18 @@ const C = ({ columns, rules, name, hideOperation, operation, i18n }) => {
32
32
  React.createElement("div", { className: "m-form-list", style: { overflowX: 'auto', marginBottom: '4px', paddingBottom: '12px', position: 'relative' } },
33
33
  React.createElement("table", { style: { width: widths } },
34
34
  React.createElement("thead", null,
35
- React.createElement("th", { style: Object.assign({}, thStyle, { width: '60px' }) }, i18n ? i18n.$t("global.num") : "序号"),
36
- columns.map((column, i) => {
37
- if (column.require) {
38
- return (React.createElement("th", { style: Object.assign({}, thStyle, { width: column.width || 200 }) },
39
- React.createElement("span", { style: { color: '#ff4d4f' } }, "*"),
40
- " ",
41
- column.title));
42
- }
43
- return React.createElement("th", { style: Object.assign({}, thStyle, { width: 150 }) }, column.title);
44
- }),
45
- hideOperation ? null : operation ? (React.createElement("th", { style: Object.assign({}, thStyle, { width: operation.width || 150 }) }, operation.title)) : (React.createElement("th", { style: Object.assign({}, thStyle, { width: 150 }) }, i18n ? i18n.$t("global.operation") : "操作"))),
35
+ React.createElement("tr", null,
36
+ React.createElement("th", { style: Object.assign({}, thStyle, { width: '60px' }) }, i18n ? i18n.$t("global.num") : "序号"),
37
+ columns.map((column, i) => {
38
+ if (column.require) {
39
+ return (React.createElement("th", { style: Object.assign({}, thStyle, { width: column.width || 200 }) },
40
+ React.createElement("span", { style: { color: '#ff4d4f' } }, "*"),
41
+ " ",
42
+ column.title));
43
+ }
44
+ return React.createElement("th", { style: Object.assign({}, thStyle, { width: 150 }) }, column.title);
45
+ }),
46
+ 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") : "操作")))),
46
47
  React.createElement("tbody", null, fields.map((field, index) => {
47
48
  return (React.createElement("tr", { style: trStyle },
48
49
  React.createElement("td", { style: tdStyle }, index + 1),
@@ -50,7 +51,7 @@ const C = ({ columns, rules, name, hideOperation, operation, i18n }) => {
50
51
  return (React.createElement("td", { style: tdStyle },
51
52
  React.createElement(Form.Item, { name: [field.name, column.name], rules: column.rules || [] }, column.render(field, index))));
52
53
  }),
53
- hideOperation ? null : operation ? (operation.component) : (React.createElement("td", { style: tdStyle },
54
+ hideOperation ? null : operation ? (React.createElement("td", { style: Object.assign({}, tdStyle, { right: 0, position: "sticky", backgroundColor: "#fff" }) }, operation.component)) : (React.createElement("td", { style: Object.assign({}, tdStyle, { right: 0, position: "sticky", backgroundColor: "#fff" }) },
54
55
  React.createElement(Typography.Text, { style: { cursor: 'pointer' }, type: "danger", onClick: () => remove(field.name) }, i18n ? i18n.$t("global.del") : '删除')))));
55
56
  })))),
56
57
  React.createElement("div", null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.2.29",
3
+ "version": "0.2.30",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -44,5 +44,5 @@
44
44
  "dependencies": {
45
45
  "react-quill": "^2.0.0"
46
46
  },
47
- "gitHead": "b0ee9a062934b059b3237717e92ce4b348e5b099"
47
+ "gitHead": "1f4c0c8bd91160a2625a5db93d9247a7e1fc385e"
48
48
  }