@dckj-npm/dc-material 0.1.40 → 0.1.42

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.
Files changed (39) hide show
  1. package/build/index.js +1 -1
  2. package/build/lowcode/assets-daily.json +13 -13
  3. package/build/lowcode/assets-dev.json +2 -2
  4. package/build/lowcode/assets-prod.json +13 -13
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.design.js +1 -1
  7. package/build/lowcode/meta.js +1 -1
  8. package/build/lowcode/preview.js +7 -7
  9. package/build/lowcode/render/default/view.css +1 -1
  10. package/build/lowcode/render/default/view.js +6 -6
  11. package/build/lowcode/view.css +1 -1
  12. package/build/lowcode/view.js +6 -6
  13. package/dist/BizComps.css +1 -1
  14. package/dist/BizComps.js +2 -2
  15. package/dist/BizComps.js.map +1 -1
  16. package/es/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  17. package/es/components/goods-card-list/goods-card-list-common.js +52 -0
  18. package/es/components/goods-card-list/goods-card-list-common.scss +119 -0
  19. package/es/components/goods-card-list/index.d.ts +2 -1
  20. package/es/components/goods-card-list/index.js +2 -1
  21. package/es/components/rich-text/index.scss +7 -0
  22. package/es/index.d.ts +1 -1
  23. package/es/index.js +1 -1
  24. package/lib/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  25. package/lib/components/goods-card-list/goods-card-list-common.js +57 -0
  26. package/lib/components/goods-card-list/goods-card-list-common.scss +119 -0
  27. package/lib/components/goods-card-list/index.d.ts +2 -1
  28. package/lib/components/goods-card-list/index.js +3 -1
  29. package/lib/components/rich-text/index.scss +7 -0
  30. package/lib/index.d.ts +1 -1
  31. package/lib/index.js +2 -1
  32. package/lowcode/goods-card-list-common/meta.ts +268 -0
  33. package/lowcode_es/goods-card-list-common/meta.d.ts +22 -0
  34. package/lowcode_es/goods-card-list-common/meta.js +250 -0
  35. package/lowcode_es/meta.js +3 -2
  36. package/lowcode_lib/goods-card-list-common/meta.d.ts +22 -0
  37. package/lowcode_lib/goods-card-list-common/meta.js +255 -0
  38. package/lowcode_lib/meta.js +21 -20
  39. package/package.json +3 -3
@@ -0,0 +1,5 @@
1
+ import type { GoodsCardListProps } from './types';
2
+ import React from 'react';
3
+ import './goods-card-list-common.scss';
4
+ declare const GoodsCardListCommon: React.FC<GoodsCardListProps>;
5
+ export default GoodsCardListCommon;
@@ -0,0 +1,52 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["dataList", "maxSales", "onClick"];
4
+ import React from 'react';
5
+ import Carousel from "../carousel/carousel";
6
+ import "./goods-card-list-common.scss";
7
+ var GoodsCardListCommon = function GoodsCardListCommon(_ref) {
8
+ var _ref$dataList = _ref.dataList,
9
+ dataList = _ref$dataList === void 0 ? [] : _ref$dataList,
10
+ _ref$maxSales = _ref.maxSales,
11
+ maxSales = _ref$maxSales === void 0 ? 1000 : _ref$maxSales,
12
+ _ref$onClick = _ref.onClick,
13
+ _onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
14
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
15
+ var _otherProps = otherProps || {};
16
+ return /*#__PURE__*/React.createElement("div", _extends({
17
+ className: "card-list-goods-common__container"
18
+ }, _otherProps), dataList.map(function (item) {
19
+ return /*#__PURE__*/React.createElement("div", {
20
+ key: item.key,
21
+ className: "card-list-goods__item",
22
+ onClick: function onClick() {
23
+ return _onClick(item);
24
+ }
25
+ }, item.imageList && item.imageList.length > 0 && /*#__PURE__*/React.createElement("div", {
26
+ className: "card-list-goods__image"
27
+ }, /*#__PURE__*/React.createElement(Carousel, {
28
+ images: item.imageList,
29
+ interval: 3000
30
+ })), /*#__PURE__*/React.createElement("div", {
31
+ className: "card-list-goods__content"
32
+ }, /*#__PURE__*/React.createElement("div", {
33
+ className: "card-list-goods__title"
34
+ }, item.title), /*#__PURE__*/React.createElement("div", {
35
+ className: "card-list-goods__desc"
36
+ }, item.desc), /*#__PURE__*/React.createElement("div", {
37
+ className: "card-list-goods__bottom"
38
+ }, /*#__PURE__*/React.createElement("div", {
39
+ className: "card-list-goods__unit"
40
+ }, "\uFFE5"), /*#__PURE__*/React.createElement("div", {
41
+ className: "card-list-goods__price"
42
+ }, item.activePrice || item.price), item.activePrice && /*#__PURE__*/React.createElement("div", {
43
+ className: "card-list-goods__unit__delete"
44
+ }, "\uFFE5"), item.activePrice && /*#__PURE__*/React.createElement("div", {
45
+ className: "card-list-goods__price__delete"
46
+ }, item.price), /*#__PURE__*/React.createElement("div", {
47
+ className: "card-list-goods__sales"
48
+ }, "\u5DF2\u552E", item.sales > maxSales ? maxSales + "+" : item.sales))));
49
+ }));
50
+ };
51
+ GoodsCardListCommon.displayName = 'GoodsCardListCommon';
52
+ export default GoodsCardListCommon;
@@ -0,0 +1,119 @@
1
+ .card-list-goods-common__container {
2
+ display: grid;
3
+ grid-template-columns:repeat(2, minmax(0, 1fr));
4
+ row-gap: 12px;
5
+ column-gap: 10px;
6
+ width: 100%;
7
+
8
+ & > .card-list-goods__item {
9
+ box-sizing: border-box;
10
+ transition: top 0.35s ease, left 0.35s ease, width 0.35s ease;
11
+ overflow: hidden;
12
+ border-radius: 8px;
13
+ --un-shadow: var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)), var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));
14
+ box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);
15
+
16
+ & > .card-list-goods__image {
17
+ height: 200px;
18
+ width: 100%;
19
+ overflow: hidden;
20
+ display: flex;
21
+
22
+ & > img {
23
+ height: 100%;
24
+ width: 100%;
25
+ object-fit: cover;
26
+ //object-position: center;
27
+ object-position: 50% 50%;
28
+ }
29
+ }
30
+
31
+ & > .card-list-goods__content {
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: space-between;
35
+ padding: 0.5rem;
36
+
37
+ .card-list-goods__title {
38
+ overflow: hidden;
39
+ display: -webkit-box;
40
+ -webkit-box-orient: vertical;
41
+ -webkit-line-clamp: 2;
42
+ line-clamp: 2;
43
+ margin-top: 0.25rem;
44
+ margin-bottom: 0.25rem;
45
+ font-size: 14px;
46
+ font-weight: 700;
47
+ }
48
+
49
+ .card-list-goods__desc {
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ line-clamp: 2;
54
+ margin-top: 0.25rem;
55
+ margin-bottom: 0.25rem;
56
+ font-size: 12px;
57
+ color: #333333;
58
+ }
59
+
60
+ .card-list-goods__bottom {
61
+ margin-top: 0.25rem;
62
+ margin-bottom: 0.25rem;
63
+ display: flex;
64
+ align-items: baseline;
65
+ flex-wrap: wrap;
66
+ row-gap: 0.5rem;
67
+
68
+ & > div {
69
+ display: flex;
70
+ }
71
+
72
+ .card-list-goods__unit {
73
+ font-size: 12px;
74
+ color: #F57D51;
75
+ font-weight: 700;
76
+ line-height: 1;
77
+
78
+ &__delete {
79
+ margin-left: 0;
80
+ font-size: 14px;
81
+ color: #666666;
82
+ line-height: 1;
83
+ text-decoration: line-through
84
+ }
85
+
86
+ }
87
+
88
+ .card-list-goods__price {
89
+ font-size: 17px;
90
+ color: #F57D51;
91
+ font-weight: 700;
92
+ line-height: 1;
93
+
94
+ &__delete {
95
+ margin-left: 0;
96
+ font-size: 14px;
97
+ color: #666666;
98
+ line-height: 1;
99
+ text-decoration: line-through
100
+ }
101
+ }
102
+
103
+ .card-list-goods__sales {
104
+ margin-left: 3px;
105
+ font-size: 12px;
106
+ color: #666666;
107
+ line-height: 1;
108
+ }
109
+
110
+ }
111
+
112
+ }
113
+
114
+ }
115
+
116
+ }
117
+
118
+
119
+
@@ -1,3 +1,4 @@
1
1
  import GoodsCardList from './goods-card-list';
2
+ import GoodsCardListCommon from './goods-card-list-common';
2
3
  export type { GoodsCardListItemProps, GoodsCardListProps } from './types';
3
- export { GoodsCardList };
4
+ export { GoodsCardList, GoodsCardListCommon };
@@ -1,2 +1,3 @@
1
1
  import GoodsCardList from "./goods-card-list";
2
- export { GoodsCardList };
2
+ import GoodsCardListCommon from "./goods-card-list-common";
3
+ export { GoodsCardList, GoodsCardListCommon };
@@ -1,8 +1,15 @@
1
1
  .rich-text {
2
+ width: 100%;
2
3
  display: flex;
3
4
  flex-direction: column;
4
5
  padding: 10px; /* 添加内边距 */
5
6
  margin: 0; /* 去除外边距 */
6
7
  word-break: break-word; /* 处理长单词换行 */
7
8
  overflow-wrap: break-word; /* 支持长单词换行 */
9
+ overflow: hidden; /* 隐藏超出部分 */
10
+ }
11
+ img {
12
+ max-width: 100%;
13
+ height: auto; /* 保持纵横比 */
14
+ object-fit: contain; /* 确保图片保持在容器内 */
8
15
  }
package/es/index.d.ts CHANGED
@@ -35,7 +35,7 @@ export { default as Button2 } from './components/button';
35
35
  export type { RadioGroupProps, RadioGroupItemProps } from './components/radio-group';
36
36
  export { CustomRadioGroup, CustomRadioGroupItem } from './components/radio-group';
37
37
  export type { GoodsCardListProps } from './components/goods-card-list';
38
- export { GoodsCardList } from './components/goods-card-list';
38
+ export { GoodsCardList, GoodsCardListCommon } from './components/goods-card-list';
39
39
  export type { RichTextProps } from './components/rich-text';
40
40
  export { RichText } from './components/rich-text';
41
41
  declare const bizCssPrefix = "bizpack";
package/es/index.js CHANGED
@@ -69,7 +69,7 @@ export { CustomRadioGroup, CustomRadioGroupItem } from "./components/radio-group
69
69
 
70
70
  // 商品卡片列表
71
71
 
72
- export { GoodsCardList } from "./components/goods-card-list";
72
+ export { GoodsCardList, GoodsCardListCommon } from "./components/goods-card-list";
73
73
 
74
74
  // 富文本
75
75
 
@@ -0,0 +1,5 @@
1
+ import type { GoodsCardListProps } from './types';
2
+ import React from 'react';
3
+ import './goods-card-list-common.scss';
4
+ declare const GoodsCardListCommon: React.FC<GoodsCardListProps>;
5
+ export default GoodsCardListCommon;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports["default"] = void 0;
6
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _carousel = _interopRequireDefault(require("../carousel/carousel"));
10
+ require("./goods-card-list-common.scss");
11
+ var _excluded = ["dataList", "maxSales", "onClick"];
12
+ var GoodsCardListCommon = function GoodsCardListCommon(_ref) {
13
+ var _ref$dataList = _ref.dataList,
14
+ dataList = _ref$dataList === void 0 ? [] : _ref$dataList,
15
+ _ref$maxSales = _ref.maxSales,
16
+ maxSales = _ref$maxSales === void 0 ? 1000 : _ref$maxSales,
17
+ _ref$onClick = _ref.onClick,
18
+ _onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
19
+ otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
20
+ var _otherProps = otherProps || {};
21
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
22
+ className: "card-list-goods-common__container"
23
+ }, _otherProps), dataList.map(function (item) {
24
+ return /*#__PURE__*/_react["default"].createElement("div", {
25
+ key: item.key,
26
+ className: "card-list-goods__item",
27
+ onClick: function onClick() {
28
+ return _onClick(item);
29
+ }
30
+ }, item.imageList && item.imageList.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
31
+ className: "card-list-goods__image"
32
+ }, /*#__PURE__*/_react["default"].createElement(_carousel["default"], {
33
+ images: item.imageList,
34
+ interval: 3000
35
+ })), /*#__PURE__*/_react["default"].createElement("div", {
36
+ className: "card-list-goods__content"
37
+ }, /*#__PURE__*/_react["default"].createElement("div", {
38
+ className: "card-list-goods__title"
39
+ }, item.title), /*#__PURE__*/_react["default"].createElement("div", {
40
+ className: "card-list-goods__desc"
41
+ }, item.desc), /*#__PURE__*/_react["default"].createElement("div", {
42
+ className: "card-list-goods__bottom"
43
+ }, /*#__PURE__*/_react["default"].createElement("div", {
44
+ className: "card-list-goods__unit"
45
+ }, "\uFFE5"), /*#__PURE__*/_react["default"].createElement("div", {
46
+ className: "card-list-goods__price"
47
+ }, item.activePrice || item.price), item.activePrice && /*#__PURE__*/_react["default"].createElement("div", {
48
+ className: "card-list-goods__unit__delete"
49
+ }, "\uFFE5"), item.activePrice && /*#__PURE__*/_react["default"].createElement("div", {
50
+ className: "card-list-goods__price__delete"
51
+ }, item.price), /*#__PURE__*/_react["default"].createElement("div", {
52
+ className: "card-list-goods__sales"
53
+ }, "\u5DF2\u552E", item.sales > maxSales ? maxSales + "+" : item.sales))));
54
+ }));
55
+ };
56
+ GoodsCardListCommon.displayName = 'GoodsCardListCommon';
57
+ var _default = exports["default"] = GoodsCardListCommon;
@@ -0,0 +1,119 @@
1
+ .card-list-goods-common__container {
2
+ display: grid;
3
+ grid-template-columns:repeat(2, minmax(0, 1fr));
4
+ row-gap: 12px;
5
+ column-gap: 10px;
6
+ width: 100%;
7
+
8
+ & > .card-list-goods__item {
9
+ box-sizing: border-box;
10
+ transition: top 0.35s ease, left 0.35s ease, width 0.35s ease;
11
+ overflow: hidden;
12
+ border-radius: 8px;
13
+ --un-shadow: var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)), var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));
14
+ box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);
15
+
16
+ & > .card-list-goods__image {
17
+ height: 200px;
18
+ width: 100%;
19
+ overflow: hidden;
20
+ display: flex;
21
+
22
+ & > img {
23
+ height: 100%;
24
+ width: 100%;
25
+ object-fit: cover;
26
+ //object-position: center;
27
+ object-position: 50% 50%;
28
+ }
29
+ }
30
+
31
+ & > .card-list-goods__content {
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: space-between;
35
+ padding: 0.5rem;
36
+
37
+ .card-list-goods__title {
38
+ overflow: hidden;
39
+ display: -webkit-box;
40
+ -webkit-box-orient: vertical;
41
+ -webkit-line-clamp: 2;
42
+ line-clamp: 2;
43
+ margin-top: 0.25rem;
44
+ margin-bottom: 0.25rem;
45
+ font-size: 14px;
46
+ font-weight: 700;
47
+ }
48
+
49
+ .card-list-goods__desc {
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ line-clamp: 2;
54
+ margin-top: 0.25rem;
55
+ margin-bottom: 0.25rem;
56
+ font-size: 12px;
57
+ color: #333333;
58
+ }
59
+
60
+ .card-list-goods__bottom {
61
+ margin-top: 0.25rem;
62
+ margin-bottom: 0.25rem;
63
+ display: flex;
64
+ align-items: baseline;
65
+ flex-wrap: wrap;
66
+ row-gap: 0.5rem;
67
+
68
+ & > div {
69
+ display: flex;
70
+ }
71
+
72
+ .card-list-goods__unit {
73
+ font-size: 12px;
74
+ color: #F57D51;
75
+ font-weight: 700;
76
+ line-height: 1;
77
+
78
+ &__delete {
79
+ margin-left: 0;
80
+ font-size: 14px;
81
+ color: #666666;
82
+ line-height: 1;
83
+ text-decoration: line-through
84
+ }
85
+
86
+ }
87
+
88
+ .card-list-goods__price {
89
+ font-size: 17px;
90
+ color: #F57D51;
91
+ font-weight: 700;
92
+ line-height: 1;
93
+
94
+ &__delete {
95
+ margin-left: 0;
96
+ font-size: 14px;
97
+ color: #666666;
98
+ line-height: 1;
99
+ text-decoration: line-through
100
+ }
101
+ }
102
+
103
+ .card-list-goods__sales {
104
+ margin-left: 3px;
105
+ font-size: 12px;
106
+ color: #666666;
107
+ line-height: 1;
108
+ }
109
+
110
+ }
111
+
112
+ }
113
+
114
+ }
115
+
116
+ }
117
+
118
+
119
+
@@ -1,3 +1,4 @@
1
1
  import GoodsCardList from './goods-card-list';
2
+ import GoodsCardListCommon from './goods-card-list-common';
2
3
  export type { GoodsCardListItemProps, GoodsCardListProps } from './types';
3
- export { GoodsCardList };
4
+ export { GoodsCardList, GoodsCardListCommon };
@@ -3,4 +3,6 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
5
  var _goodsCardList = _interopRequireDefault(require("./goods-card-list"));
6
- exports.GoodsCardList = _goodsCardList["default"];
6
+ exports.GoodsCardList = _goodsCardList["default"];
7
+ var _goodsCardListCommon = _interopRequireDefault(require("./goods-card-list-common"));
8
+ exports.GoodsCardListCommon = _goodsCardListCommon["default"];
@@ -1,8 +1,15 @@
1
1
  .rich-text {
2
+ width: 100%;
2
3
  display: flex;
3
4
  flex-direction: column;
4
5
  padding: 10px; /* 添加内边距 */
5
6
  margin: 0; /* 去除外边距 */
6
7
  word-break: break-word; /* 处理长单词换行 */
7
8
  overflow-wrap: break-word; /* 支持长单词换行 */
9
+ overflow: hidden; /* 隐藏超出部分 */
10
+ }
11
+ img {
12
+ max-width: 100%;
13
+ height: auto; /* 保持纵横比 */
14
+ object-fit: contain; /* 确保图片保持在容器内 */
8
15
  }
package/lib/index.d.ts CHANGED
@@ -35,7 +35,7 @@ export { default as Button2 } from './components/button';
35
35
  export type { RadioGroupProps, RadioGroupItemProps } from './components/radio-group';
36
36
  export { CustomRadioGroup, CustomRadioGroupItem } from './components/radio-group';
37
37
  export type { GoodsCardListProps } from './components/goods-card-list';
38
- export { GoodsCardList } from './components/goods-card-list';
38
+ export { GoodsCardList, GoodsCardListCommon } from './components/goods-card-list';
39
39
  export type { RichTextProps } from './components/rich-text';
40
40
  export { RichText } from './components/rich-text';
41
41
  declare const bizCssPrefix = "bizpack";
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
- exports.bizCssPrefix = exports.Title2 = exports.Title1 = exports.TeletextList = exports.TagC = exports.TabMessage = exports.TabContainerItem = exports.TabContainer = exports.Swiper = exports.SearchBar = exports.RichText = exports.Position = exports.NoticeBar = exports.Navigation = exports.MessageList = exports.MenuList = exports.IntegralTask = exports.GridNav = exports.GoodsCardList = exports.CustomRadioGroupItem = exports.CustomRadioGroup = exports.Button2 = void 0;
5
+ exports.bizCssPrefix = exports.Title2 = exports.Title1 = exports.TeletextList = exports.TagC = exports.TabMessage = exports.TabContainerItem = exports.TabContainer = exports.Swiper = exports.SearchBar = exports.RichText = exports.Position = exports.NoticeBar = exports.Navigation = exports.MessageList = exports.MenuList = exports.IntegralTask = exports.GridNav = exports.GoodsCardListCommon = exports.GoodsCardList = exports.CustomRadioGroupItem = exports.CustomRadioGroup = exports.Button2 = void 0;
6
6
  var _swiper = _interopRequireDefault(require("./components/swiper"));
7
7
  exports.Swiper = _swiper["default"];
8
8
  var _bottomNavigation = _interopRequireDefault(require("./components/bottom-navigation"));
@@ -41,6 +41,7 @@ exports.CustomRadioGroup = _radioGroup.CustomRadioGroup;
41
41
  exports.CustomRadioGroupItem = _radioGroup.CustomRadioGroupItem;
42
42
  var _goodsCardList = require("./components/goods-card-list");
43
43
  exports.GoodsCardList = _goodsCardList.GoodsCardList;
44
+ exports.GoodsCardListCommon = _goodsCardList.GoodsCardListCommon;
44
45
  var _richText = require("./components/rich-text");
45
46
  exports.RichText = _richText.RichText;
46
47
  // 轮播图