@ecoding/components.antd 0.3.0 → 0.3.2

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.
@@ -13,11 +13,12 @@ import { UploadOutlined, LinkOutlined, DeleteOutlined, EllipsisOutlined } from '
13
13
  import { buildURL } from '@ecoding/helper.url';
14
14
  import Toast from "../../core/toast";
15
15
  import Loading from "../../core/loading";
16
- const InfosRender = ({ infos, setInfos }) => {
16
+ const InfosRender = ({ infos, setInfos, onChange }) => {
17
17
  const remove = (i) => {
18
18
  const temp = infos.concat([]);
19
19
  temp.splice(i, 1);
20
20
  setInfos(temp);
21
+ onChange(temp);
21
22
  };
22
23
  if (infos && infos.length > 0) {
23
24
  return (React.createElement("ul", null, infos.map((info, i) => {
@@ -121,7 +122,7 @@ const SingleFileUpload = (props) => {
121
122
  props.onRemove && props.onRemove(e);
122
123
  }, maxCount: props.maxCount },
123
124
  React.createElement(Button, { icon: props.icon ? React.createElement(UploadOutlined, null) : null }, props.buttonText)),
124
- React.createElement(Popover, { destroyTooltipOnHide: true, open: open, placement: "right", trigger: "hover", title: "Uploaded", content: React.createElement(InfosRender, { infos: infos, setInfos: setInfos }) },
125
+ React.createElement(Popover, { destroyTooltipOnHide: true, open: open, placement: "right", trigger: "hover", title: "Uploaded", content: React.createElement(InfosRender, { onChange: props.onChange, infos: infos, setInfos: setInfos }) },
125
126
  React.createElement(Button, { icon: React.createElement(EllipsisOutlined, null) }))));
126
127
  };
127
128
  SingleFileUpload.defaultProps = {
@@ -0,0 +1,16 @@
1
+ .m-form-list{
2
+ .ant-form-item{
3
+ margin-bottom: 0 !important;
4
+ }
5
+ // 末列固定
6
+ tbody tr:nth-child(even){
7
+ background-color: #f5fafc;
8
+ }
9
+ tbody tr:hover{
10
+ background-color: #fcfcfc;
11
+ }
12
+ }
13
+
14
+ .ant_select_no_padding > .ant-select-selector{
15
+ padding: 0 !important;
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "unlink": "npm unlink",
22
22
  "link": "npm link",
23
23
  "dev": "tsc -w",
24
- "build": "rm -rf lib && tsc"
24
+ "build": "rm -rf lib && tsc && rollup -c"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@ecoding/helper.event": "*",
@@ -43,5 +43,5 @@
43
43
  "antd": "^5.8.4",
44
44
  "axios": "^1.1.2"
45
45
  },
46
- "gitHead": "4f377d30d902349469ba97c8ee98c49b0d576c4a"
46
+ "gitHead": "df2c86e4f36ca6c46366bcece0d4097e9bff4da2"
47
47
  }