@ecoding/components.antd 0.2.29 → 0.2.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.
- package/lib/core/form.list/index.js +14 -13
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ const C = ({ columns, rules, name, hideOperation, operation, i18n }) => {
|
|
|
9
9
|
};
|
|
10
10
|
const thStyle = {
|
|
11
11
|
textAlign: 'left',
|
|
12
|
-
backgroundColor: '#
|
|
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("
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
React.createElement("
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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: column.width || 200 }) }, 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.
|
|
3
|
+
"version": "0.2.31",
|
|
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": "
|
|
47
|
+
"gitHead": "bd97cd7929a841cc580a8b1399d177f8cb33893d"
|
|
48
48
|
}
|