@dckj-npm/dc-material 0.1.376 → 0.1.377

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 (42) hide show
  1. package/build/docs/colorful-button.html +3 -3
  2. package/build/docs/colorful-input.html +3 -3
  3. package/build/docs/index.html +3 -3
  4. package/build/docs/teletext-list.html +3 -3
  5. package/build/docs/umi.6f6bf535.js +1 -0
  6. package/build/docs/{umi.6743fcd4.css → umi.9770df27.css} +1 -1
  7. package/build/docs/~demos/colorful-button-demo.html +3 -3
  8. package/build/docs/~demos/colorful-input-demo.html +3 -3
  9. package/build/docs/~demos/teletext-list-demo-1.html +3 -3
  10. package/build/docs/~demos/teletext-list-demo.html +3 -3
  11. package/build/lowcode/assets-daily.json +13 -13
  12. package/build/lowcode/assets-dev.json +2 -2
  13. package/build/lowcode/assets-prod.json +13 -13
  14. package/build/lowcode/meta.design.js +1 -1
  15. package/build/lowcode/meta.js +1 -1
  16. package/build/lowcode/render/default/view.css +1 -1
  17. package/build/lowcode/render/default/view.js +1 -1
  18. package/build/lowcode/view.css +1 -1
  19. package/build/lowcode/view.js +1 -1
  20. package/dist/BizComps.css +1 -1
  21. package/dist/BizComps.js +2 -2
  22. package/dist/BizComps.js.map +1 -1
  23. package/es/components/teletext-list/teletext-list-item.d.ts +14 -77
  24. package/es/components/teletext-list/teletext-list-item.js +153 -165
  25. package/es/components/teletext-list/teletext-list-item.scss +53 -4
  26. package/es/components/teletext-list/teletext-list.d.ts +60 -4
  27. package/es/components/teletext-list/teletext-list.js +55 -37
  28. package/lib/components/teletext-list/teletext-list-item.d.ts +14 -77
  29. package/lib/components/teletext-list/teletext-list-item.js +153 -164
  30. package/lib/components/teletext-list/teletext-list-item.scss +53 -4
  31. package/lib/components/teletext-list/teletext-list.d.ts +60 -4
  32. package/lib/components/teletext-list/teletext-list.js +55 -37
  33. package/lowcode/teletext-list/meta.ts +457 -703
  34. package/lowcode/teletext-list/meta.ts.bak +821 -0
  35. package/lowcode_es/meta.js +1 -1
  36. package/lowcode_es/teletext-list/meta.js +689 -598
  37. package/lowcode_es/teletext-list/meta.ts.bak +821 -0
  38. package/lowcode_lib/meta.js +1 -1
  39. package/lowcode_lib/teletext-list/meta.js +689 -598
  40. package/lowcode_lib/teletext-list/meta.ts.bak +821 -0
  41. package/package.json +3 -3
  42. package/build/docs/umi.d20b1d99.js +0 -1
@@ -1,106 +1,43 @@
1
1
  import React from 'react';
2
2
  import './teletext-list-item.scss';
3
3
  import { IconListProps } from './teletext-list';
4
- /**
5
- * 数据
6
- */
7
4
  export interface TeletextListItemProps {
8
- /**
9
- * 点击事件
10
- */
11
5
  onClick?: (e: any) => void;
12
- /**
13
- * 标题
14
- */
15
6
  title?: string;
16
- /**
17
- * 图片地址
18
- */
19
7
  image?: string | string[];
20
- /**
21
- * 图片位置
22
- */
23
- imagePlacement?: 'left' | 'right' | 'top' | 'bottom' | 'left-right' | 'none';
24
- /**
25
- * 说明
26
- */
8
+ imagePlacement?: 'left' | 'right' | 'top' | 'bottom' | 'none';
27
9
  description?: string;
28
- /**
29
- * 标签列表
30
- */
31
10
  tags?: string;
32
- /**
33
- * 控件类型
34
- */
35
11
  type?: 'textAndImg' | 'imgOnly' | 'textOnly';
36
- /**
37
- * 行数
38
- */
39
12
  textLines?: number;
40
- /**
41
- * 子项列数
42
- */
43
13
  itemColumns?: number;
44
- /**
45
- * 图标列表
46
- */
47
14
  iconList?: IconListProps[];
48
- /**
49
- * 列表项内边距
50
- */
51
15
  itemPadding?: number;
52
- /**
53
- * 行数3
54
- */
55
16
  text3?: string;
56
- /**
57
- * 行数4
58
- */
59
17
  text4?: string;
60
- /**
61
- * 图片宽度
62
- */
63
18
  imgWidth?: number;
64
- /**
65
- * 图片高度
66
- */
67
19
  imgHeight?: number;
68
- /**
69
- * 背景颜色
70
- */
71
20
  itemBgColor?: string;
72
- /**
73
- * 样式
74
- */
75
21
  style?: React.CSSProperties;
76
- /**
77
- * 图文对齐方式
78
- */
79
22
  textAlign?: 'flex-start' | 'flex-end' | 'center';
80
- /**
81
- * 是否为购物车列表
82
- */
83
23
  isShoppingCart?: boolean;
84
- /**
85
- * 是否为愿望单列表
86
- */
87
24
  isWishList?: boolean;
88
- /**
89
- * 是否为用户菜单列表
90
- */
91
25
  isUserMenu?: boolean;
92
- /**
93
- * 类型
94
- */
95
26
  itemType?: string;
96
- /**
97
- * 图文间距
98
- */
99
27
  textImgGap?: number;
100
- /**
101
- * 子节点
102
- */
103
- children?: React.ReactNode;
28
+ imgBorderRadius?: number;
29
+ imgObjectFit?: 'cover' | 'contain' | 'fill' | 'none';
30
+ titleColor?: string;
31
+ titleFontSize?: number;
32
+ titleFontWeight?: 'normal' | '500' | '600' | 'bold';
33
+ titleLineClamp?: number;
34
+ descriptionColor?: string;
35
+ descriptionFontSize?: number;
36
+ descriptionFontWeight?: 'normal' | '500' | '600' | 'bold';
37
+ descriptionLineClamp?: number;
38
+ itemBorderRadius?: number;
39
+ itemBorderColor?: string;
40
+ itemBorderWidth?: number;
104
41
  }
105
42
  declare const TeletextListItem: React.FC<TeletextListItemProps>;
106
43
  export default TeletextListItem;
@@ -1,214 +1,201 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["onClick", "title", "image", "children", "imagePlacement", "description", "type", "textLines", "itemColumns", "itemPadding", "iconList", "tags", "text3", "text4", "imgWidth", "imgHeight", "itemBgColor", "style", "textAlign", "isShoppingCart", "isWishList", "isUserMenu", "itemType", "textImgGap"],
4
- _excluded2 = ["width", "height"];
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ var _excluded = ["onClick", "title", "image", "imagePlacement", "description", "type", "textLines", "itemColumns", "itemPadding", "iconList", "text3", "text4", "imgWidth", "imgHeight", "itemBgColor", "style", "textAlign", "isShoppingCart", "isWishList", "itemType", "textImgGap", "imgBorderRadius", "imgObjectFit", "titleColor", "titleFontSize", "titleFontWeight", "titleLineClamp", "descriptionColor", "descriptionFontSize", "descriptionFontWeight", "descriptionLineClamp", "itemBorderRadius", "itemBorderColor", "itemBorderWidth"];
5
4
  import React, { createElement } from 'react';
6
5
  import "./teletext-list-item.scss";
7
- import { convertChildren } from "../../utils/children-node-handle";
8
6
  import { Icon } from '@alilc/lowcode-materials';
7
+ // ─── 图标位置计算(纯函数,无副作用) ────────────────────────────────────────────
8
+ function getIconStyle(icon) {
9
+ var base = {
10
+ position: 'absolute',
11
+ zIndex: 10
12
+ };
13
+ switch (icon.position) {
14
+ case 'leftTop':
15
+ return _extends({}, base, {
16
+ top: '0px',
17
+ left: '10px'
18
+ });
19
+ case 'leftBottom':
20
+ return _extends({}, base, {
21
+ bottom: '0px',
22
+ left: '10px'
23
+ });
24
+ case 'rightTop':
25
+ return _extends({}, base, {
26
+ top: '0px',
27
+ right: '10px'
28
+ });
29
+ case 'rightBottom':
30
+ return _extends({}, base, {
31
+ bottom: '0px',
32
+ right: '10px'
33
+ });
34
+ case 'customize':
35
+ return _extends({}, base, {
36
+ right: (icon.rightOffset || 0) + "px",
37
+ top: (icon.topOffset || 0) + "px"
38
+ });
39
+ default:
40
+ return base;
41
+ }
42
+ }
9
43
 
10
- /**
11
- * 数据
12
- */
13
-
44
+ // ─── 文本行内容映射(纯函数) ─────────────────────────────────────────────────────
45
+ function getTextContent(index, title, description, text3, text4) {
46
+ switch (index) {
47
+ case 0:
48
+ return title || '';
49
+ case 1:
50
+ return description || '';
51
+ case 2:
52
+ return text3 || '';
53
+ case 3:
54
+ return text4 || '';
55
+ default:
56
+ return '';
57
+ }
58
+ }
14
59
  var TeletextListItem = function TeletextListItem(_ref) {
15
60
  var _ref$onClick = _ref.onClick,
16
61
  onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
17
62
  title = _ref.title,
18
63
  image = _ref.image,
19
- children = _ref.children,
20
64
  imagePlacement = _ref.imagePlacement,
21
65
  description = _ref.description,
22
66
  type = _ref.type,
23
- textLines = _ref.textLines,
67
+ _ref$textLines = _ref.textLines,
68
+ textLines = _ref$textLines === void 0 ? 2 : _ref$textLines,
24
69
  itemColumns = _ref.itemColumns,
25
70
  itemPadding = _ref.itemPadding,
26
71
  iconList = _ref.iconList,
27
- tags = _ref.tags,
28
72
  text3 = _ref.text3,
29
73
  text4 = _ref.text4,
30
- imgWidth = _ref.imgWidth,
31
- imgHeight = _ref.imgHeight,
74
+ _ref$imgWidth = _ref.imgWidth,
75
+ imgWidth = _ref$imgWidth === void 0 ? 100 : _ref$imgWidth,
76
+ _ref$imgHeight = _ref.imgHeight,
77
+ imgHeight = _ref$imgHeight === void 0 ? 100 : _ref$imgHeight,
32
78
  itemBgColor = _ref.itemBgColor,
33
79
  style = _ref.style,
34
80
  textAlign = _ref.textAlign,
35
81
  isShoppingCart = _ref.isShoppingCart,
36
82
  isWishList = _ref.isWishList,
37
- isUserMenu = _ref.isUserMenu,
38
83
  itemType = _ref.itemType,
39
84
  _ref$textImgGap = _ref.textImgGap,
40
85
  textImgGap = _ref$textImgGap === void 0 ? 16 : _ref$textImgGap,
86
+ imgBorderRadius = _ref.imgBorderRadius,
87
+ imgObjectFit = _ref.imgObjectFit,
88
+ titleColor = _ref.titleColor,
89
+ titleFontSize = _ref.titleFontSize,
90
+ titleFontWeight = _ref.titleFontWeight,
91
+ titleLineClamp = _ref.titleLineClamp,
92
+ descriptionColor = _ref.descriptionColor,
93
+ descriptionFontSize = _ref.descriptionFontSize,
94
+ descriptionFontWeight = _ref.descriptionFontWeight,
95
+ descriptionLineClamp = _ref.descriptionLineClamp,
96
+ itemBorderRadius = _ref.itemBorderRadius,
97
+ itemBorderColor = _ref.itemBorderColor,
98
+ itemBorderWidth = _ref.itemBorderWidth,
41
99
  otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
42
- var normalizeNodeKey = function normalizeNodeKey(rawKey) {
43
- if (rawKey === undefined || rawKey === null) {
44
- return '';
45
- }
46
- return String(rawKey).replace(/^\.?\$?/, '');
47
- };
48
100
  var IconComp = Icon;
49
- var resultImage = Array.isArray(image) ? image[0] || '' : image || '';
50
101
  var _otherProps = otherProps || {};
51
- var containerClass = "teletext-list__panel__item image-" + imagePlacement + " itemColumns-" + itemColumns;
52
- var childNodeList = React.Children.toArray(children);
53
- var getChildPropsByKey = function getChildPropsByKey(key) {
54
- var targetKey = normalizeNodeKey(key);
55
- var targetChild = childNodeList.find(function (child) {
56
- var _child$props;
57
- var childKey = normalizeNodeKey(child === null || child === void 0 ? void 0 : child.key);
58
- var childPropsKey = normalizeNodeKey(child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.key);
59
- return childKey === targetKey || childPropsKey === targetKey;
60
- });
61
- return (targetChild === null || targetChild === void 0 ? void 0 : targetChild.props) || {};
62
- };
63
- var imageChildProps = getChildPropsByKey('image');
64
- var imageClassName = ['teletext-list__panel__item_image', imageChildProps === null || imageChildProps === void 0 ? void 0 : imageChildProps.className].filter(Boolean).join(' ');
65
102
 
66
- // 图片尺寸策略(修复:不再写入 Image 子节点 style):
67
- // 低代码设计模式下,调用 imageChildNode.setPropValue('style', ...) 会让引擎以"节点级别"
68
- // 重渲染 Image 节点,直接使用 schema 默认 imgSrc(占位图),绕过父组件
69
- // convertChildren 注入的真实图片 URL,从而导致画布图片回退为默认图。
70
- // 因此 imgWidth / imgHeight prop 是图片尺寸的唯一响应来源:
71
- // • 优先使用 imgWidth/imgHeight prop(TeletextList 层面统一控制)
72
- // • prop 未设置,回退到子节点 style 中已有的宽高值(兼容旧页面)
73
- // • 最终默认 100px
74
- // 子节点 style 中非尺寸属性(margin、padding 等)始终保留。
75
- var childStyle = (imageChildProps === null || imageChildProps === void 0 ? void 0 : imageChildProps.style) || {};
76
- var _childW = childStyle.width,
77
- _childH = childStyle.height,
78
- childLayoutStyle = _objectWithoutPropertiesLoose(childStyle, _excluded2);
79
- var DEFAULT_IMG_SIZE = 100;
80
- var imageStyle = _extends({}, childLayoutStyle, {
81
- width: typeof imgWidth === 'number' ? imgWidth + "px" : _childW != null ? _childW : DEFAULT_IMG_SIZE + "px",
82
- height: typeof imgHeight === 'number' ? imgHeight + "px" : _childH != null ? _childH : DEFAULT_IMG_SIZE + "px"
83
- });
103
+ // 图片地址:唯一来源是 dataList[i].image prop,不依赖任何子节点 schema
104
+ var resultImage = Array.isArray(image) ? image[0] || '' : image || '';
105
+
106
+ // 图片尺寸:唯一来源是 imgWidth / imgHeight prop(由父组件 TeletextList 统一下发)
107
+ // 不读取、不写入任何子节点 style,彻底消除与低代码引擎节点级重渲染的冲突
108
+ var imageStyle = {
109
+ width: imgWidth + "px",
110
+ height: imgHeight + "px",
111
+ borderRadius: imgBorderRadius != null ? imgBorderRadius + "px" : undefined,
112
+ objectFit: imgObjectFit
113
+ };
114
+ var containerClass = "teletext-list__panel__item image-" + imagePlacement + " itemColumns-" + itemColumns;
84
115
  var containerStyle = _extends({
85
- padding: itemPadding + "px",
116
+ padding: itemPadding != null ? itemPadding + "px" : undefined,
86
117
  backgroundColor: itemBgColor,
87
118
  alignItems: textAlign,
88
- gap: textImgGap + "px"
119
+ gap: textImgGap + "px",
120
+ borderRadius: itemBorderRadius != null ? itemBorderRadius + "px" : undefined,
121
+ border: itemBorderWidth != null || itemBorderColor ? (itemBorderWidth !== null && itemBorderWidth !== void 0 ? itemBorderWidth : 1) + "px solid " + (itemBorderColor !== null && itemBorderColor !== void 0 ? itemBorderColor : 'transparent') : undefined
89
122
  }, style);
90
123
 
91
- // 生成图标样式
92
- var getIconStyle = function getIconStyle(icon) {
93
- var baseStyle = {
94
- position: 'absolute',
95
- zIndex: 10
96
- };
97
- // 默认偏移值
98
- var defaultPosition = {};
99
- switch (icon.position) {
100
- case 'leftTop':
101
- defaultPosition = {
102
- top: '0px',
103
- left: '10px'
104
- };
105
- break;
106
- case 'leftBottom':
107
- defaultPosition = {
108
- bottom: '0px',
109
- left: '10px'
110
- };
111
- break;
112
- case 'rightTop':
113
- defaultPosition = {
114
- top: '0px',
115
- right: '10px'
116
- };
117
- break;
118
- case 'rightBottom':
119
- defaultPosition = {
120
- bottom: '0px',
121
- right: '10px'
122
- };
123
- break;
124
- case 'customize':
125
- defaultPosition = {
126
- right: (icon.rightOffset || 0) + "px",
127
- top: (icon.topOffset || 0) + "px"
128
- };
129
- break;
130
- default:
131
- defaultPosition = {};
132
- break;
133
- }
134
- return _extends({}, baseStyle, defaultPosition);
135
- };
136
- return /*#__PURE__*/React.createElement("div", _extends({
137
- className: containerClass,
138
- onClick: onClick,
139
- style: containerStyle
140
- }, _otherProps), resultImage && (imagePlacement === 'left' || imagePlacement === 'top') && type !== 'textOnly' ? convertChildren(children, 'image', {
141
- imgSrc: resultImage,
142
- className: imageClassName,
124
+ // ── 图片元素(原生 img,不依赖低代码 Image 组件 / convertChildren / cloneElement)
125
+ var imageEl = resultImage && type !== 'textOnly' ? /*#__PURE__*/React.createElement("img", {
126
+ src: resultImage,
127
+ alt: title || '',
128
+ className: "teletext-list__panel__item_image",
143
129
  style: imageStyle
144
- }) : null, type !== 'imgOnly' && itemType === '开关' && /*#__PURE__*/React.createElement("div", {
130
+ }) : null;
131
+
132
+ // ── 开关行(原生 CSS toggle switch;点击不冒泡到 item,状态由页面级事件控制)
133
+ var switchRow = type !== 'imgOnly' && itemType === '开关' ? /*#__PURE__*/React.createElement("div", {
145
134
  className: "teletext-list__panel__item__switch",
146
135
  style: {
147
136
  display: 'flex',
148
137
  alignItems: 'center',
149
138
  justifyContent: 'space-between'
150
139
  }
151
- }, convertChildren(children, "text-1", {
152
- children: [title],
153
- className: "teletext-list__panel__item__switch__title"
154
- }), convertChildren(children, "switch-1", {
155
- children: [itemType],
156
- className: "teletext-list__panel__item__switch__switch"
157
- })), type !== 'imgOnly' && itemType !== '开关' && /*#__PURE__*/React.createElement("div", {
140
+ }, /*#__PURE__*/React.createElement("span", {
141
+ className: "teletext-list__panel__item__switch__title",
142
+ style: {
143
+ color: titleColor,
144
+ fontSize: titleFontSize != null ? titleFontSize + "px" : undefined,
145
+ fontWeight: titleFontWeight,
146
+ WebkitLineClamp: titleLineClamp
147
+ }
148
+ }, title), /*#__PURE__*/React.createElement("label", {
149
+ className: "teletext-list__panel__item__switch__toggle",
150
+ onClick: function onClick(e) {
151
+ return e.stopPropagation();
152
+ }
153
+ }, /*#__PURE__*/React.createElement("input", {
154
+ type: "checkbox"
155
+ }), /*#__PURE__*/React.createElement("span", {
156
+ className: "teletext-list__panel__item__switch__slider"
157
+ }))) : null;
158
+
159
+ // ── 文本区
160
+ var textArea = type !== 'imgOnly' && itemType !== '开关' ? /*#__PURE__*/React.createElement("div", {
158
161
  className: "teletext-list__panel__item__text"
159
162
  }, Array.from({
160
163
  length: textLines
161
164
  }).map(function (_, index) {
162
- // 第一行显示标题,其余行显示描述
163
- var content = function () {
164
- switch (index) {
165
- case 0:
166
- return title;
167
- case 1:
168
- return description;
169
- case 2:
170
- return text3;
171
- case 3:
172
- return text4;
173
- default:
174
- return '';
165
+ return /*#__PURE__*/React.createElement("span", {
166
+ key: index,
167
+ className: "teletext-list__panel__item__text__" + (index === 0 ? 'title' : 'description'),
168
+ style: index === 0 ? {
169
+ color: titleColor,
170
+ fontSize: titleFontSize != null ? titleFontSize + "px" : undefined,
171
+ fontWeight: titleFontWeight,
172
+ WebkitLineClamp: titleLineClamp
173
+ } : {
174
+ color: descriptionColor,
175
+ fontSize: descriptionFontSize != null ? descriptionFontSize + "px" : undefined,
176
+ fontWeight: descriptionFontWeight,
177
+ WebkitLineClamp: descriptionLineClamp
175
178
  }
176
- }();
177
- return convertChildren(children, "text-" + (index + 1), {
178
- children: [content],
179
- className: "teletext-list__panel__item__text__" + (index === 0 ? 'title' : 'description')
180
- });
179
+ }, getTextContent(index, title, description, text3, text4));
181
180
  }), isShoppingCart && /*#__PURE__*/React.createElement("div", {
182
181
  className: "shopping-cart-select"
183
182
  }, /*#__PURE__*/React.createElement("div", {
184
183
  className: "select-box"
185
- }, convertChildren(children, 'select-box-1', {
186
- popType: 'dialog',
187
- selectType: 'number',
188
- value: 1,
189
- prefix: '数量',
190
- dialogTitle: '选择数量',
191
- btnText: '确定',
192
- className: 'teletext-list__panel__item__select'
193
- }), convertChildren(children, 'select-box-2', {
194
- popType: 'dialog',
195
- selectType: 'string',
196
- dataList: [{
197
- label: 'M',
198
- value: 'M'
199
- }, {
200
- label: 'X',
201
- value: 'X'
202
- }, {
203
- label: 'XL',
204
- value: 'XL'
205
- }],
206
- value: 'X',
207
- prefix: '尺码',
208
- dialogTitle: '选择尺码',
209
- btnText: '确定',
210
- className: 'teletext-list__panel__item__select'
211
- })), /*#__PURE__*/React.createElement("div", {
184
+ }, /*#__PURE__*/React.createElement("select", {
185
+ className: "teletext-list__panel__item__select"
186
+ }, [1, 2, 3, 4, 5].map(function (n) {
187
+ return /*#__PURE__*/React.createElement("option", {
188
+ key: n,
189
+ value: n
190
+ }, "\u6570\u91CF: ", n);
191
+ })), /*#__PURE__*/React.createElement("select", {
192
+ className: "teletext-list__panel__item__select"
193
+ }, ['M', 'X', 'XL'].map(function (s) {
194
+ return /*#__PURE__*/React.createElement("option", {
195
+ key: s,
196
+ value: s
197
+ }, "\u5C3A\u7801: ", s);
198
+ }))), /*#__PURE__*/React.createElement("div", {
212
199
  className: "shopping-cart-select__btn"
213
200
  }, /*#__PURE__*/React.createElement("div", {
214
201
  className: "shopping-cart-select__btn__item"
@@ -236,11 +223,12 @@ var TeletextListItem = function TeletextListItem(_ref) {
236
223
  className: "shopping-cart-select-img",
237
224
  src: "https://51ymb.com/source/api/upload/1075055372064133120/2025/202502/20250207/1085235703970926592.png",
238
225
  alt: ""
239
- }), "Remove"))), resultImage && (imagePlacement === 'right' || imagePlacement === 'bottom') && type !== 'textOnly' ? convertChildren(children, 'image', {
240
- imgSrc: resultImage,
241
- className: imageClassName,
242
- style: imageStyle
243
- }) : null, iconList === null || iconList === void 0 ? void 0 : iconList.map(function (icon, index) {
226
+ }), "Remove"))) : null;
227
+ return /*#__PURE__*/React.createElement("div", _extends({
228
+ className: containerClass,
229
+ onClick: onClick,
230
+ style: containerStyle
231
+ }, _otherProps), (imagePlacement === 'left' || imagePlacement === 'top') && imageEl, switchRow, textArea, (imagePlacement === 'right' || imagePlacement === 'bottom') && imageEl, iconList === null || iconList === void 0 ? void 0 : iconList.map(function (icon, index) {
244
232
  return /*#__PURE__*/React.createElement("div", {
245
233
  key: index,
246
234
  className: "teletext-list__panel__item__icon size-" + icon.size,
@@ -80,12 +80,61 @@
80
80
  display: -webkit-box;
81
81
  text-overflow: ellipsis;
82
82
  }
83
- .teletext-list__panel__item__switch__switch {
84
- font-size: 14px;
85
- font-weight: 600;
86
- color: #222222;
83
+ // ─── 原生 toggle switch ────────────────────────────────────────────────────────
84
+ .teletext-list__panel__item__switch__toggle {
85
+ position: relative;
86
+ display: inline-block;
87
+ width: 44px;
88
+ height: 24px;
89
+ flex-shrink: 0;
90
+ cursor: pointer;
91
+
92
+ input {
93
+ opacity: 0;
94
+ width: 0;
95
+ height: 0;
96
+ position: absolute;
97
+ }
98
+
99
+ .teletext-list__panel__item__switch__slider {
100
+ position: absolute;
101
+ inset: 0;
102
+ background-color: #cccccc;
103
+ border-radius: 24px;
104
+ transition: background-color 0.2s;
105
+
106
+ &::before {
107
+ content: '';
108
+ position: absolute;
109
+ width: 18px;
110
+ height: 18px;
111
+ left: 3px;
112
+ top: 3px;
113
+ background-color: #fff;
114
+ border-radius: 50%;
115
+ transition: transform 0.2s;
116
+ }
117
+ }
118
+
119
+ input:checked + .teletext-list__panel__item__switch__slider {
120
+ background-color: #4c84ff;
121
+ &::before {
122
+ transform: translateX(20px);
123
+ }
124
+ }
87
125
  }
88
126
  }
127
+ // ─── 购物车 select 下拉菜单 ──────────────────────────────────────────────────────
128
+ .teletext-list__panel__item__select {
129
+ padding: 4px 8px;
130
+ border: 1px solid #dddddd;
131
+ border-radius: 4px;
132
+ font-size: 12px;
133
+ background: #fff;
134
+ color: #333333;
135
+ outline: none;
136
+ cursor: pointer;
137
+ }
89
138
  .shopping-cart-select {
90
139
  display: flex;
91
140
  flex-direction: column;
@@ -28,6 +28,14 @@ interface DataProps {
28
28
  * 类型
29
29
  */
30
30
  itemType?: string;
31
+ /**
32
+ * 扩展文本行3(textLines >= 3 时显示)
33
+ */
34
+ text3?: string;
35
+ /**
36
+ * 扩展文本行4(textLines >= 4 时显示)
37
+ */
38
+ text4?: string;
31
39
  }
32
40
  export interface IconListProps {
33
41
  /**
@@ -65,10 +73,6 @@ export interface TeletextListProps {
65
73
  * @param e
66
74
  */
67
75
  onClick?: (e: any) => void;
68
- /**
69
- * 子节点
70
- */
71
- children?: React.ReactNode;
72
76
  /**
73
77
  * 图片位置
74
78
  */
@@ -142,6 +146,58 @@ export interface TeletextListProps {
142
146
  * 图文间距
143
147
  */
144
148
  textImgGap?: number;
149
+ /**
150
+ * 图片圆角
151
+ */
152
+ imgBorderRadius?: number;
153
+ /**
154
+ * 图片填充方式
155
+ */
156
+ imgObjectFit?: 'cover' | 'contain' | 'fill' | 'none';
157
+ /**
158
+ * 标题颜色
159
+ */
160
+ titleColor?: string;
161
+ /**
162
+ * 标题字体大小
163
+ */
164
+ titleFontSize?: number;
165
+ /**
166
+ * 标题字重
167
+ */
168
+ titleFontWeight?: 'normal' | '500' | '600' | 'bold';
169
+ /**
170
+ * 标题最大行数(超出省略)
171
+ */
172
+ titleLineClamp?: number;
173
+ /**
174
+ * 说明颜色
175
+ */
176
+ descriptionColor?: string;
177
+ /**
178
+ * 说明字体大小
179
+ */
180
+ descriptionFontSize?: number;
181
+ /**
182
+ * 说明字重
183
+ */
184
+ descriptionFontWeight?: 'normal' | '500' | '600' | 'bold';
185
+ /**
186
+ * 说明最大行数(超出省略)
187
+ */
188
+ descriptionLineClamp?: number;
189
+ /**
190
+ * 列表项圆角
191
+ */
192
+ itemBorderRadius?: number;
193
+ /**
194
+ * 列表项边框颜色
195
+ */
196
+ itemBorderColor?: string;
197
+ /**
198
+ * 列表项边框宽度
199
+ */
200
+ itemBorderWidth?: number;
145
201
  }
146
202
  declare const TeletextList: React.FC<TeletextListProps>;
147
203
  export default TeletextList;