@ccs-ui/rc-pro 2.2.4-beta-2 → 2.2.4

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.
@@ -50,6 +50,17 @@ export default function CcsColorPicker(_ref3) {
50
50
  children = _ref3.children,
51
51
  _onChange = _ref3.onChange,
52
52
  otherProps = _objectWithoutProperties(_ref3, _excluded);
53
+ var renderValueStr = function renderValueStr() {
54
+ var value = otherProps.value;
55
+ if (typeof value === 'string') {
56
+ return value;
57
+ }
58
+ if (Array.isArray(value)) {
59
+ return "linear-gradient(".concat(value.map(function (s) {
60
+ return "".concat(s.color, " ").concat(s.percent, "%");
61
+ }).join(','), ")");
62
+ }
63
+ };
53
64
  var customPanelRender = function customPanelRender(_, _ref4) {
54
65
  var _ref4$components = _ref4.components,
55
66
  Picker = _ref4$components.Picker,
@@ -58,7 +69,7 @@ export default function CcsColorPicker(_ref3) {
58
69
  justify: "space-between",
59
70
  wrap: false,
60
71
  style: {
61
- width: 360
72
+ width: 420
62
73
  },
63
74
  children: [/*#__PURE__*/_jsx(Col, {
64
75
  span: 12,
@@ -68,9 +79,15 @@ export default function CcsColorPicker(_ref3) {
68
79
  style: {
69
80
  height: 'auto'
70
81
  }
71
- }), /*#__PURE__*/_jsx(Col, {
82
+ }), /*#__PURE__*/_jsxs(Col, {
72
83
  flex: "auto",
73
- children: /*#__PURE__*/_jsx(Picker, {})
84
+ children: [/*#__PURE__*/_jsx(Picker, {}), /*#__PURE__*/_jsx("div", {
85
+ style: {
86
+ marginTop: 10,
87
+ color: 'rgba(0,0,0,0.65)'
88
+ },
89
+ children: renderValueStr()
90
+ })]
74
91
  })]
75
92
  });
76
93
  };
@@ -94,7 +111,6 @@ export default function CcsColorPicker(_ref3) {
94
111
  onChange: function onChange(value, css) {
95
112
  if (!_onChange) return;
96
113
  var colors = value.getColors();
97
-
98
114
  // 渐变色
99
115
  if (colors.length > 1) {
100
116
  var gradientColors = colors.map(function (c) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "2.2.4-beta-2",
3
+ "version": "2.2.4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -50,6 +50,7 @@
50
50
  ]
51
51
  },
52
52
  "dependencies": {
53
+ "@ant-design/colors": "^8.0.0",
53
54
  "@codemirror/lang-javascript": "^6.2.2",
54
55
  "@codemirror/lang-json": "^6.0.1",
55
56
  "@codemirror/lang-sql": "^6.7.0",
@@ -69,8 +70,7 @@
69
70
  "react-draggable": "^4.4.5",
70
71
  "react-error-overlay": "^6.0.11",
71
72
  "react-lines-ellipsis": "^0.15.4",
72
- "react-resizable": "^3.0.5",
73
- "@ant-design/colors": "^8.0.0"
73
+ "react-resizable": "^3.0.5"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@ant-design/compatible": "^5.1.2",