@dckj-npm/dc-material 0.1.30 → 0.1.32
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/build/index.js +1 -1
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +2 -2
- package/dist/BizComps.js.map +1 -1
- package/es/components/carousel/carousel.scss +1 -1
- package/es/components/goods-card-list/goods-card-list.js +19 -2
- package/es/components/goods-card-list/goods-card-list.scss +25 -6
- package/es/components/goods-card-list/types.d.ts +4 -0
- package/es/components/radio-group/radio-group.js +16 -3
- package/es/components/tab-container/tab-container.js +0 -1
- package/lib/components/carousel/carousel.scss +1 -1
- package/lib/components/goods-card-list/goods-card-list.js +19 -2
- package/lib/components/goods-card-list/goods-card-list.scss +25 -6
- package/lib/components/goods-card-list/types.d.ts +4 -0
- package/lib/components/radio-group/radio-group.js +16 -3
- package/lib/components/tab-container/tab-container.js +0 -1
- package/lowcode/custom-radio-group/meta.ts +235 -218
- package/lowcode/goods-card-list/meta.ts +6 -0
- package/lowcode_es/custom-radio-group/meta.js +201 -181
- package/lowcode_es/goods-card-list/meta.js +5 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/custom-radio-group/meta.js +201 -181
- package/lowcode_lib/goods-card-list/meta.js +5 -0
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/404.html +0 -47
- package/build/docs/_demos/:uuid +0 -47
- package/build/docs/colorful-button.html +0 -48
- package/build/docs/colorful-input.html +0 -48
- package/build/docs/index.html +0 -48
- package/build/docs/umi.19a78b0f.js +0 -1
- package/build/docs/umi.5357b0f6.css +0 -8
- package/build/docs/~demos/:uuid.html +0 -47
- package/build/docs/~demos/colorful-button-demo.html +0 -47
- package/build/docs/~demos/colorful-input-demo.html +0 -47
|
@@ -13,7 +13,6 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
13
13
|
_ref$onClick = _ref.onClick,
|
|
14
14
|
_onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
15
15
|
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
|
-
var _otherProps = otherProps || {};
|
|
17
16
|
var _useState = useState([]),
|
|
18
17
|
positions = _useState[0],
|
|
19
18
|
setPositions = _useState[1];
|
|
@@ -95,6 +94,20 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
95
94
|
},
|
|
96
95
|
// 当 dataList 变化时重新计算
|
|
97
96
|
[dataList]);
|
|
97
|
+
var resolveResultDesc = function resolveResultDesc(desc) {
|
|
98
|
+
var htmlString = "<div>" + desc + "</div>";
|
|
99
|
+
// 创建一个虚拟的 DOM 容器
|
|
100
|
+
var tempDiv = document.createElement('div');
|
|
101
|
+
tempDiv.innerHTML = htmlString;
|
|
102
|
+
// 提取文本
|
|
103
|
+
return tempDiv.textContent || tempDiv.innerText;
|
|
104
|
+
};
|
|
105
|
+
var resultStyle = _extends({}, otherProps.style || {}, {
|
|
106
|
+
height: maxContainerHeight + 20 + "px"
|
|
107
|
+
});
|
|
108
|
+
var _otherProps = _extends({}, otherProps || {}, {
|
|
109
|
+
style: resultStyle
|
|
110
|
+
});
|
|
98
111
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
99
112
|
className: "card-list-goods__container waterfall-container",
|
|
100
113
|
style: {
|
|
@@ -124,12 +137,16 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
124
137
|
className: "card-list-goods__title"
|
|
125
138
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
126
139
|
className: "card-list-goods__desc"
|
|
127
|
-
}, item.desc), /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
}, resolveResultDesc(item.desc)), /*#__PURE__*/React.createElement("div", {
|
|
128
141
|
className: "card-list-goods__bottom"
|
|
129
142
|
}, /*#__PURE__*/React.createElement("div", {
|
|
130
143
|
className: "card-list-goods__unit"
|
|
131
144
|
}, "\uFFE5"), /*#__PURE__*/React.createElement("div", {
|
|
132
145
|
className: "card-list-goods__price"
|
|
146
|
+
}, item.activePrice || item.price), item.activePrice && /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: "card-list-goods__unit__delete"
|
|
148
|
+
}, "\uFFE5"), item.activePrice && /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: "card-list-goods__price__delete"
|
|
133
150
|
}, item.price), /*#__PURE__*/React.createElement("div", {
|
|
134
151
|
className: "card-list-goods__sales"
|
|
135
152
|
}, "\u5DF2\u552E", item.sales > maxSales ? maxSales + "+" : item.sales))));
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
transition: top 0.35s ease, left 0.35s ease, width 0.35s ease;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
border-radius: 8px;
|
|
11
|
-
box-shadow: 0 3px 9px 1px rgba(204,204,204,0.35);
|
|
11
|
+
box-shadow: 0 3px 9px 1px rgba(204, 204, 204, 0.35);
|
|
12
12
|
|
|
13
13
|
& > .card-list-goods__image {
|
|
14
14
|
height: 200px;
|
|
@@ -58,12 +58,27 @@
|
|
|
58
58
|
margin-bottom: 0.25rem;
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: baseline;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
row-gap: 0.5rem;
|
|
63
|
+
|
|
64
|
+
& > div {
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
61
67
|
|
|
62
68
|
.card-list-goods__unit {
|
|
63
69
|
font-size: 12px;
|
|
64
70
|
color: #F57D51;
|
|
65
71
|
font-weight: 700;
|
|
66
72
|
line-height: 1;
|
|
73
|
+
|
|
74
|
+
&__delete {
|
|
75
|
+
margin-left: 0;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
color: #666666;
|
|
78
|
+
line-height: 1;
|
|
79
|
+
text-decoration: line-through
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
.card-list-goods__price {
|
|
@@ -71,11 +86,18 @@
|
|
|
71
86
|
color: #F57D51;
|
|
72
87
|
font-weight: 700;
|
|
73
88
|
line-height: 1;
|
|
89
|
+
|
|
90
|
+
&__delete {
|
|
91
|
+
margin-left: 0;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
color: #666666;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
text-decoration: line-through
|
|
96
|
+
}
|
|
74
97
|
}
|
|
75
98
|
|
|
76
99
|
.card-list-goods__sales {
|
|
77
|
-
margin-left:
|
|
78
|
-
margin-right: 0.5rem;
|
|
100
|
+
margin-left: 3px;
|
|
79
101
|
font-size: 12px;
|
|
80
102
|
color: #666666;
|
|
81
103
|
line-height: 1;
|
|
@@ -88,6 +110,3 @@
|
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["options", "name", "type", "defaultValue", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "isWrap", "onChange", "children"];
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
-
import { convertChildren } from "../../utils/children-node-handle";
|
|
6
5
|
import "./index.scss";
|
|
6
|
+
import RadioGroupItem from "./radio-group-item";
|
|
7
7
|
function uuid() {
|
|
8
8
|
return Math.random().toString(36).substring(2);
|
|
9
9
|
}
|
|
@@ -45,8 +45,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
45
45
|
_otherProps.style = wrapClass + ' ' + _otherProps.style ? _otherProps.style : '';
|
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
47
47
|
className: "radio-group__panel"
|
|
48
|
-
}, _otherProps), options.map(function (option) {
|
|
49
|
-
return
|
|
48
|
+
}, _otherProps), (options || []).map(function (option) {
|
|
49
|
+
return /*#__PURE__*/React.createElement(RadioGroupItem, {
|
|
50
50
|
label: option.label,
|
|
51
51
|
value: option.value,
|
|
52
52
|
key: option.value,
|
|
@@ -59,6 +59,19 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
59
59
|
unSelectTextColor: unSelectTextColor,
|
|
60
60
|
onChange: handleChange
|
|
61
61
|
});
|
|
62
|
+
// return convertChildren(children, 'custom-radio-group-item', {
|
|
63
|
+
// label: option.label,
|
|
64
|
+
// value: option.value,
|
|
65
|
+
// key: option.value,
|
|
66
|
+
// checked: selectedValue === option.value,
|
|
67
|
+
// name: name,
|
|
68
|
+
// type: type,
|
|
69
|
+
// selectColor: selectColor,
|
|
70
|
+
// selectTextColor: selectTextColor,
|
|
71
|
+
// unSelectColor: unSelectColor,
|
|
72
|
+
// unSelectTextColor: unSelectTextColor,
|
|
73
|
+
// onChange: handleChange
|
|
74
|
+
// })
|
|
62
75
|
}));
|
|
63
76
|
};
|
|
64
77
|
RadioGroup.displayName = 'RadioGroup';
|
|
@@ -9,7 +9,6 @@ export var TabContainer = function TabContainer(props) {
|
|
|
9
9
|
var className = props.className,
|
|
10
10
|
restProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
11
11
|
var CustomTabItem = function CustomTabItem(key, props) {
|
|
12
|
-
console.log('key', key, props);
|
|
13
12
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
13
|
className: "navigation"
|
|
15
14
|
}, key.title);
|
|
@@ -20,7 +20,6 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
20
20
|
_ref$onClick = _ref.onClick,
|
|
21
21
|
_onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
22
22
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
23
|
-
var _otherProps = otherProps || {};
|
|
24
23
|
var _useState = (0, _react.useState)([]),
|
|
25
24
|
positions = _useState[0],
|
|
26
25
|
setPositions = _useState[1];
|
|
@@ -102,6 +101,20 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
102
101
|
},
|
|
103
102
|
// 当 dataList 变化时重新计算
|
|
104
103
|
[dataList]);
|
|
104
|
+
var resolveResultDesc = function resolveResultDesc(desc) {
|
|
105
|
+
var htmlString = "<div>" + desc + "</div>";
|
|
106
|
+
// 创建一个虚拟的 DOM 容器
|
|
107
|
+
var tempDiv = document.createElement('div');
|
|
108
|
+
tempDiv.innerHTML = htmlString;
|
|
109
|
+
// 提取文本
|
|
110
|
+
return tempDiv.textContent || tempDiv.innerText;
|
|
111
|
+
};
|
|
112
|
+
var resultStyle = (0, _extends2["default"])({}, otherProps.style || {}, {
|
|
113
|
+
height: maxContainerHeight + 20 + "px"
|
|
114
|
+
});
|
|
115
|
+
var _otherProps = (0, _extends2["default"])({}, otherProps || {}, {
|
|
116
|
+
style: resultStyle
|
|
117
|
+
});
|
|
105
118
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
106
119
|
className: "card-list-goods__container waterfall-container",
|
|
107
120
|
style: {
|
|
@@ -131,12 +144,16 @@ var GoodsCardList = function GoodsCardList(_ref) {
|
|
|
131
144
|
className: "card-list-goods__title"
|
|
132
145
|
}, item.title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
146
|
className: "card-list-goods__desc"
|
|
134
|
-
}, item.desc), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
|
+
}, resolveResultDesc(item.desc)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
148
|
className: "card-list-goods__bottom"
|
|
136
149
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
150
|
className: "card-list-goods__unit"
|
|
138
151
|
}, "\uFFE5"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
152
|
className: "card-list-goods__price"
|
|
153
|
+
}, item.activePrice || item.price), item.activePrice && /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
|
+
className: "card-list-goods__unit__delete"
|
|
155
|
+
}, "\uFFE5"), item.activePrice && /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
|
+
className: "card-list-goods__price__delete"
|
|
140
157
|
}, item.price), /*#__PURE__*/_react["default"].createElement("div", {
|
|
141
158
|
className: "card-list-goods__sales"
|
|
142
159
|
}, "\u5DF2\u552E", item.sales > maxSales ? maxSales + "+" : item.sales))));
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
transition: top 0.35s ease, left 0.35s ease, width 0.35s ease;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
border-radius: 8px;
|
|
11
|
-
box-shadow: 0 3px 9px 1px rgba(204,204,204,0.35);
|
|
11
|
+
box-shadow: 0 3px 9px 1px rgba(204, 204, 204, 0.35);
|
|
12
12
|
|
|
13
13
|
& > .card-list-goods__image {
|
|
14
14
|
height: 200px;
|
|
@@ -58,12 +58,27 @@
|
|
|
58
58
|
margin-bottom: 0.25rem;
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: baseline;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
row-gap: 0.5rem;
|
|
63
|
+
|
|
64
|
+
& > div {
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
61
67
|
|
|
62
68
|
.card-list-goods__unit {
|
|
63
69
|
font-size: 12px;
|
|
64
70
|
color: #F57D51;
|
|
65
71
|
font-weight: 700;
|
|
66
72
|
line-height: 1;
|
|
73
|
+
|
|
74
|
+
&__delete {
|
|
75
|
+
margin-left: 0;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
color: #666666;
|
|
78
|
+
line-height: 1;
|
|
79
|
+
text-decoration: line-through
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
.card-list-goods__price {
|
|
@@ -71,11 +86,18 @@
|
|
|
71
86
|
color: #F57D51;
|
|
72
87
|
font-weight: 700;
|
|
73
88
|
line-height: 1;
|
|
89
|
+
|
|
90
|
+
&__delete {
|
|
91
|
+
margin-left: 0;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
color: #666666;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
text-decoration: line-through
|
|
96
|
+
}
|
|
74
97
|
}
|
|
75
98
|
|
|
76
99
|
.card-list-goods__sales {
|
|
77
|
-
margin-left:
|
|
78
|
-
margin-right: 0.5rem;
|
|
100
|
+
margin-left: 3px;
|
|
79
101
|
font-size: 12px;
|
|
80
102
|
color: #666666;
|
|
81
103
|
line-height: 1;
|
|
@@ -88,6 +110,3 @@
|
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
@@ -6,8 +6,8 @@ exports["default"] = void 0;
|
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _childrenNodeHandle = require("../../utils/children-node-handle");
|
|
10
9
|
require("./index.scss");
|
|
10
|
+
var _radioGroupItem = _interopRequireDefault(require("./radio-group-item"));
|
|
11
11
|
var _excluded = ["options", "name", "type", "defaultValue", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "isWrap", "onChange", "children"];
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -52,8 +52,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
52
52
|
_otherProps.style = wrapClass + ' ' + _otherProps.style ? _otherProps.style : '';
|
|
53
53
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
54
54
|
className: "radio-group__panel"
|
|
55
|
-
}, _otherProps), options.map(function (option) {
|
|
56
|
-
return
|
|
55
|
+
}, _otherProps), (options || []).map(function (option) {
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement(_radioGroupItem["default"], {
|
|
57
57
|
label: option.label,
|
|
58
58
|
value: option.value,
|
|
59
59
|
key: option.value,
|
|
@@ -66,6 +66,19 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
66
66
|
unSelectTextColor: unSelectTextColor,
|
|
67
67
|
onChange: handleChange
|
|
68
68
|
});
|
|
69
|
+
// return convertChildren(children, 'custom-radio-group-item', {
|
|
70
|
+
// label: option.label,
|
|
71
|
+
// value: option.value,
|
|
72
|
+
// key: option.value,
|
|
73
|
+
// checked: selectedValue === option.value,
|
|
74
|
+
// name: name,
|
|
75
|
+
// type: type,
|
|
76
|
+
// selectColor: selectColor,
|
|
77
|
+
// selectTextColor: selectTextColor,
|
|
78
|
+
// unSelectColor: unSelectColor,
|
|
79
|
+
// unSelectTextColor: unSelectTextColor,
|
|
80
|
+
// onChange: handleChange
|
|
81
|
+
// })
|
|
69
82
|
}));
|
|
70
83
|
};
|
|
71
84
|
RadioGroup.displayName = 'RadioGroup';
|
|
@@ -14,7 +14,6 @@ var TabContainer = exports.TabContainer = function TabContainer(props) {
|
|
|
14
14
|
var className = props.className,
|
|
15
15
|
restProps = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
|
16
16
|
var CustomTabItem = function CustomTabItem(key, props) {
|
|
17
|
-
console.log('key', key, props);
|
|
18
17
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
19
18
|
className: "navigation"
|
|
20
19
|
}, key.title);
|