@cuvp1225/antd 0.1.19-beta.37 → 0.1.19-beta.39

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.
@@ -0,0 +1,44 @@
1
+ import { __rest } from "tslib";
2
+ import { Upload as AntUpload } from 'antd';
3
+ import React, { useEffect } from 'react';
4
+ import { SLOT } from '../../helpers/slottype';
5
+ export const UniUpload = (_a) => {
6
+ var
7
+ //items,
8
+ _b = SLOT.id,
9
+ //items,
10
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
11
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
12
+ const redCss = `
13
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
14
+ color: #fff;
15
+ border-color: #B20000;
16
+ background: #B20000;
17
+ }
18
+ `;
19
+ const blueCss = `
20
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
21
+ color: #fff;
22
+ border-color: #1890ff;
23
+ background: #1890ff;
24
+ }
25
+ `;
26
+ const greenCss = `
27
+ .uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
28
+ color: #fff;
29
+ border-color: #17c60e;
30
+ background: #17c60e;
31
+ }
32
+ `;
33
+ useEffect(() => {
34
+ const allow = ['blue', 'green', 'red'];
35
+ if (allow.includes(theme)) {
36
+ const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
37
+ const style = document.createElement('style');
38
+ style.innerHTML = css;
39
+ document.head.appendChild(style);
40
+ }
41
+ }, [theme]);
42
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
43
+ React.createElement(AntUpload, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.1.19-beta.37",
3
+ "version": "0.1.19-beta.39",
4
4
  "description": "antd components for tango app",
5
5
  "author": "wwsun <ww.sww@outlook.com>",
6
6
  "homepage": "https://github.com/netease/tango-components#readme",
@@ -55,5 +55,5 @@
55
55
  "classnames": "^2.3.2",
56
56
  "coral-system": "^1.0.6"
57
57
  },
58
- "gitHead": "93ae4ee50e60e04431933cc4dc688dc5157c9a97"
58
+ "gitHead": "9ed02f6e68346318488c017b2be59ef6cc72e21a"
59
59
  }