@dckj-npm/dc-material 0.1.145 → 0.1.147

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 (99) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/meta.design.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/dist/BizComps.css +1 -1
  7. package/dist/BizComps.js +2 -2
  8. package/dist/BizComps.js.map +1 -1
  9. package/es/assets/icon/grid-nav/right.png +0 -0
  10. package/es/assets/icon/position/img.png +0 -0
  11. package/es/assets/icon/position/location.png +0 -0
  12. package/es/assets/icon/search/delete.png +0 -0
  13. package/es/assets/icon/search/search.png +0 -0
  14. package/es/assets/icon/teletext-list/arr.png +0 -0
  15. package/es/components/form/form-item.js +79 -0
  16. package/es/components/form/form-item.scss +20 -0
  17. package/lowcode_es/meta.js +1 -1
  18. package/lowcode_lib/meta.js +1 -1
  19. package/package.json +2 -2
  20. package/es/components/goods-card-list/goods-card-list-common.js +0 -60
  21. package/es/components/goods-card-list/goods-card-list-common.scss +0 -118
  22. package/es/components/goods-card-list/goods-card-list.js +0 -156
  23. package/es/components/goods-card-list/goods-card-list.scss +0 -112
  24. package/es/components/goods-card-list/index.js +0 -3
  25. package/es/components/goods-card-list/types.js +0 -1
  26. package/es/components/grid-nav/grid-nav.js +0 -91
  27. package/es/components/grid-nav/index.js +0 -2
  28. package/es/components/grid-nav/index.scss +0 -41
  29. package/es/components/integral-task/index.js +0 -5
  30. package/es/components/integral-task/index.scss +0 -35
  31. package/es/components/integral-task/integral-task.js +0 -54
  32. package/es/components/menu-list/index.js +0 -6
  33. package/es/components/menu-list/index.scss +0 -16
  34. package/es/components/menu-list/menu-list-item.js +0 -32
  35. package/es/components/menu-list/menu-list-item.scss +0 -49
  36. package/es/components/menu-list/menu-list.js +0 -25
  37. package/es/components/menu-list/types.js +0 -1
  38. package/es/components/message-list/index.js +0 -6
  39. package/es/components/message-list/index.scss +0 -22
  40. package/es/components/message-list/message-list-item.js +0 -41
  41. package/es/components/message-list/message-list-item.scss +0 -60
  42. package/es/components/message-list/message-list.js +0 -53
  43. package/es/components/notice-bar/components/ScrollSwitcher.js +0 -45
  44. package/es/components/notice-bar/components/ScrollSwitcher.scss +0 -17
  45. package/es/components/notice-bar/index.js +0 -2
  46. package/es/components/notice-bar/index.scss +0 -42
  47. package/es/components/notice-bar/notice-bar-item.js +0 -29
  48. package/es/components/notice-bar/notice-bar-item.scss +0 -26
  49. package/es/components/notice-bar/notice-bar.js +0 -83
  50. package/es/components/position/entity.js +0 -1
  51. package/es/components/position/index.js +0 -2
  52. package/es/components/position/index.scss +0 -27
  53. package/es/components/position/position-left.js +0 -28
  54. package/es/components/position/position-list.js +0 -30
  55. package/es/components/position/position.js +0 -48
  56. package/es/components/radio-group/index.js +0 -7
  57. package/es/components/radio-group/index.scss +0 -40
  58. package/es/components/radio-group/radio-group-item.js +0 -74
  59. package/es/components/radio-group/radio-group.js +0 -80
  60. package/es/components/rich-text/index.js +0 -6
  61. package/es/components/rich-text/index.scss +0 -19
  62. package/es/components/rich-text/rich-text.js +0 -37
  63. package/es/components/search-bar/index.js +0 -2
  64. package/es/components/search-bar/index.scss +0 -13
  65. package/es/components/search-bar/search-bar.js +0 -33
  66. package/es/components/swiper/index.js +0 -2
  67. package/es/components/swiper/index.scss +0 -12
  68. package/es/components/swiper/swiper.js +0 -34
  69. package/es/components/tab/index.js +0 -5
  70. package/es/components/tab/index.scss +0 -39
  71. package/es/components/tab/tab.js +0 -50
  72. package/es/components/tab-container/index.js +0 -2
  73. package/es/components/tab-container/index.scss +0 -48
  74. package/es/components/tab-container/tab-container.js +0 -26
  75. package/es/components/tab-container-item/index.js +0 -2
  76. package/es/components/tab-container-item/index.scss +0 -0
  77. package/es/components/tab-container-item/tab-container-item.js +0 -19
  78. package/es/components/tag/index.js +0 -5
  79. package/es/components/tag/index.scss +0 -24
  80. package/es/components/tag/tag.js +0 -14
  81. package/es/components/teletext-list/index.js +0 -6
  82. package/es/components/teletext-list/index.scss +0 -19
  83. package/es/components/teletext-list/teletext-list-item.js +0 -61
  84. package/es/components/teletext-list/teletext-list-item.scss +0 -55
  85. package/es/components/teletext-list/teletext-list.js +0 -38
  86. package/es/components/title/index.js +0 -7
  87. package/es/components/title/title-1.js +0 -16
  88. package/es/components/title/title-1.scss +0 -25
  89. package/es/components/title/title-2.js +0 -31
  90. package/es/components/title/title-2.scss +0 -22
  91. package/es/index.js +0 -78
  92. package/es/index.scss +0 -6
  93. package/es/style.js +0 -5
  94. package/es/utils/children-node-handle.js +0 -25
  95. package/es/utils/component-wrapper.js +0 -38
  96. package/es/utils/debounce.js +0 -14
  97. package/es/utils/time-util.js +0 -18
  98. package/es/variables.js +0 -2
  99. package/es/variables.scss +0 -3
@@ -1,29 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["content", "releaseTime", "isTop", "children"];
4
- import React from 'react';
5
- import "./notice-bar-item.scss";
6
- import { convertChildren } from "../../utils/children-node-handle";
7
- import { formatTime } from "../../utils/time-util";
8
- var NoticeBarItem = function NoticeBarItem(_ref) {
9
- var content = _ref.content,
10
- releaseTime = _ref.releaseTime,
11
- isTop = _ref.isTop,
12
- children = _ref.children,
13
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
14
- var _otherProps = otherProps || {};
15
- releaseTime = formatTime(releaseTime);
16
- return /*#__PURE__*/React.createElement("div", _extends({
17
- className: "notice-bar__panel__item"
18
- }, _otherProps), /*#__PURE__*/React.createElement("div", {
19
- className: "notice-bar__panel__item-left"
20
- }, convertChildren(children, isTop === 0 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
21
- name: isTop === 0 ? '置顶' : '最新'
22
- }), /*#__PURE__*/React.createElement("div", {
23
- className: "notice-bar__panal__item__content"
24
- }, content)), /*#__PURE__*/React.createElement("div", {
25
- className: "notice-bar__panel__item-releaseTime"
26
- }, releaseTime));
27
- };
28
- NoticeBarItem.displayName = 'NoticeBarItem';
29
- export default NoticeBarItem;
@@ -1,26 +0,0 @@
1
- .notice-bar__panel__item {
2
- width: calc(100vw - 110px);
3
- display: flex;
4
- align-items: center;
5
- justify-content: space-between;
6
- margin-bottom: 5px;
7
- .notice-bar__panel__item-left {
8
- display: flex;
9
- align-items: center;
10
- .notice-bar__panal__item__content{
11
- color: #676767;
12
- font-size: 12px;
13
- width: 160px;
14
- overflow: hidden;
15
- text-overflow: ellipsis;
16
- white-space: nowrap;
17
- margin-left: 4px;
18
- }
19
- }
20
- .notice-bar__panel__item-releaseTime {
21
- color: #676767;
22
- font-size: 11px;
23
- opacity: 0.5;
24
- }
25
-
26
- }
@@ -1,83 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["dataList", "onClick", "icon", "children"];
4
- import React, { useRef, useState, useEffect } from 'react';
5
- import "./index.scss";
6
- import NoticeBarItem from "./notice-bar-item";
7
- var NoticeBar = function NoticeBar(_ref) {
8
- var dataList = _ref.dataList,
9
- _ref$onClick = _ref.onClick,
10
- onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
11
- icon = _ref.icon,
12
- children = _ref.children,
13
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
14
- var _otherProps = otherProps || {};
15
- // const stickyItems = (dataList || []).filter((item) => item?.isTop === 1)
16
- // const loopItems = (dataList || []).filter((item) => item?.isTop === 0)
17
-
18
- var _useState = useState(true),
19
- play = _useState[0],
20
- setPlay = _useState[1];
21
- var _useState2 = useState([]),
22
- loopItems = _useState2[0],
23
- setLoopItems = _useState2[1];
24
- var intervalId = useRef(null);
25
- useEffect(function () {
26
- var stickyItems = dataList.filter(function (item) {
27
- return item.isTop === 1;
28
- });
29
- setLoopItems(dataList.filter(function (item) {
30
- return item.isTop === 1;
31
- }));
32
- var startPlay = function startPlay() {
33
- if (play) {
34
- setLoopItems(function (prev) {
35
- var newItems = [].concat(prev);
36
- newItems.push(newItems[0]);
37
- newItems.shift();
38
- return newItems;
39
- });
40
- setPlay(false);
41
- }
42
- };
43
- intervalId.current = setInterval(startPlay, 2000);
44
- return function () {
45
- clearInterval(intervalId.current);
46
- };
47
- }, [dataList, play]);
48
- var isScroll = function isScroll(index) {
49
- return index === 0;
50
- };
51
- var stickyItems = dataList.filter(function (item) {
52
- return item.isTop === 1;
53
- });
54
- return /*#__PURE__*/React.createElement("div", _extends({
55
- className: "notice-bar__panel"
56
- }, _otherProps), /*#__PURE__*/React.createElement("img", {
57
- className: "notice-bar__panel__item-img",
58
- src: icon,
59
- alt: ""
60
- }), /*#__PURE__*/React.createElement("div", {
61
- className: "notice-bar__panel__item-list"
62
- }, stickyItems ? stickyItems.map(function (item, index) {
63
- return /*#__PURE__*/React.createElement(NoticeBarItem, _extends({
64
- key: index,
65
- onClick: onClick,
66
- children: children
67
- }, item));
68
- }) : /*#__PURE__*/React.createElement("div", null), loopItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
69
- className: "notice-bar__panel-loop"
70
- }, loopItems.map(function (item, index) {
71
- return /*#__PURE__*/React.createElement(NoticeBarItem, {
72
- key: index,
73
- className: "notice-bar__panel-loop__item " + (isScroll(index) && play ? 'toUp' : ''),
74
- content: item.content,
75
- releaseTime: item.releaseTime,
76
- isTop: item.isTop,
77
- tag: item.tag,
78
- onClick: onClick
79
- });
80
- })) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E")));
81
- };
82
- NoticeBar.displayName = 'NoticeBar';
83
- export default NoticeBar;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import Position from "./position";
2
- export default Position;
@@ -1,27 +0,0 @@
1
- .location {
2
- display: flex;
3
- cursor: pointer;
4
- color: #414141;
5
- font-size: 13.5px;
6
- &-address {
7
- margin-right: 7px;
8
- }
9
- &-icon {
10
- display: flex;
11
- align-items: center;
12
- }
13
- }
14
- .location-list {
15
- position: fixed;
16
- top: 0;
17
- left: 0;
18
- width: 100vw;
19
- height: 100vh;
20
- background-color: #fff;
21
- padding: 10px 15px;
22
- z-index: 999;
23
- &-item {
24
- padding: 10px 0;
25
- border-bottom: solid 1px #eee;
26
- }
27
- }
@@ -1,28 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["currentLocation", "clickHandle"];
4
- import * as React from 'react';
5
- import "./index.scss";
6
- import arror from "../../assets/icon/position/arror.png";
7
- var NavigationLeft = function navigationLeft(_ref) {
8
- var currentLocation = _ref.currentLocation,
9
- clickHandle = _ref.clickHandle,
10
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
11
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", _extends({
12
- className: "location"
13
- }, otherProps, {
14
- onClick: function onClick() {
15
- return clickHandle();
16
- }
17
- }), /*#__PURE__*/React.createElement("div", {
18
- className: "location-address"
19
- }, currentLocation.address), /*#__PURE__*/React.createElement("div", {
20
- className: "location-icon"
21
- }, /*#__PURE__*/React.createElement("img", {
22
- src: arror,
23
- width: "10",
24
- height: "5",
25
- alt: "icon"
26
- }))));
27
- };
28
- export default NavigationLeft;
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import "./index.scss";
3
- var ContentList = function navigationList(_ref) {
4
- var open = _ref.open,
5
- itemArray = _ref.itemArray,
6
- currentLocation = _ref.currentLocation,
7
- setIsOpen = _ref.setIsOpen,
8
- setCurrent = _ref.setCurrent;
9
- var changeHandle = function changeHandle(position) {
10
- console.log('changeHandle', position);
11
- // 设置当前选中位置
12
- setCurrent(position);
13
- // 关闭位置列表
14
- setIsOpen();
15
- };
16
- return /*#__PURE__*/React.createElement("div", {
17
- className: "location-list",
18
- style: {
19
- display: open ? 'block' : 'none'
20
- }
21
- }, itemArray.map(function (item) {
22
- return /*#__PURE__*/React.createElement("div", {
23
- onClick: function onClick() {
24
- return changeHandle(item);
25
- },
26
- className: "location-list-item"
27
- }, item.address);
28
- }));
29
- };
30
- export default ContentList;
@@ -1,48 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["itemArray", "defaultLocation", "__designMode"];
4
- import * as React from 'react';
5
- import { default as List } from "./position-list";
6
- import { default as Position } from "./position-left";
7
- var Navigation = function bottomNavigation(_ref) {
8
- var itemArray = _ref.itemArray,
9
- defaultLocation = _ref.defaultLocation,
10
- __designMode = _ref.__designMode,
11
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
12
- var _React$useState = React.useState(defaultLocation),
13
- current = _React$useState[0],
14
- _setCurrent = _React$useState[1];
15
- var _React$useState2 = React.useState(false),
16
- isOpen = _React$useState2[0],
17
- setIsOpen = _React$useState2[1];
18
- var openList = function openList() {
19
- if (__designMode == 'design') {
20
- // 设计态不打开列表
21
- return;
22
- }
23
- setIsOpen(!isOpen);
24
- console.log('isopen', isOpen);
25
- };
26
- // React.useEffect(() => {
27
- // console.log('defaultLocation', defaultLocation)
28
- // if (defaultLocation) {
29
- // setCurrent(defaultLocation)
30
- // }
31
- // })
32
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Position, _extends({
33
- currentLocation: current
34
- }, otherProps, {
35
- clickHandle: function clickHandle() {
36
- return openList();
37
- }
38
- })), /*#__PURE__*/React.createElement(List, {
39
- open: isOpen,
40
- currentLocation: current,
41
- itemArray: itemArray,
42
- setIsOpen: openList,
43
- setCurrent: function setCurrent(value) {
44
- return _setCurrent(value);
45
- }
46
- }));
47
- };
48
- export default Navigation;
@@ -1,7 +0,0 @@
1
- /**
2
- * 单选按钮组
3
- */
4
-
5
- import RadioGroup from "./radio-group";
6
- import RadioGroupItem from "./radio-group-item";
7
- export { RadioGroup as CustomRadioGroup, RadioGroupItem as CustomRadioGroupItem };
@@ -1,40 +0,0 @@
1
- @import '../../variables.scss';
2
-
3
- .radio-group__panel {
4
- display: flex;
5
- gap: 12px;
6
- width: 100%;
7
-
8
- .radio-group-item__button {
9
- flex: 0 0 auto;
10
- transition-property: all;
11
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
12
- transition-duration: 250ms;
13
- font-size: 12px;
14
- padding: 5px 11px;
15
- border-radius: 25rem;
16
- }
17
-
18
- .radio-group-item__text {
19
- flex: 0 0 auto;
20
- transition-property: all;
21
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
22
- transition-duration: 250ms;
23
- font-size: 12px;
24
- padding: 5px 0;
25
-
26
- .radio-group-item__text__line {
27
- width: 100%;
28
- height: 1px;
29
- right: 0;
30
- left: 0;
31
- bottom: 0;
32
- position: absolute;
33
- }
34
-
35
- }
36
-
37
-
38
- }
39
-
40
-
@@ -1,74 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["label", "value", "checked", "type", "name", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "onChange"];
4
- import React from 'react';
5
- import "./index.scss";
6
- var styleFunction = function styleFunction(type, bgColors, textColors, checked) {
7
- var bgColor = checked ? bgColors[1] : bgColors[0];
8
- var textColor = checked ? textColors[1] : textColors[0];
9
- if (type === 'button') {
10
- return {
11
- 'backgroundColor': bgColor,
12
- 'color': textColor
13
- };
14
- }
15
- if (type === 'text') {
16
- return {
17
- 'color': textColor,
18
- 'position': checked ? 'relative' : 'static'
19
- };
20
- }
21
- return {};
22
- };
23
- var RadioGroupItem = function RadioGroupItem(_ref) {
24
- var _ref$label = _ref.label,
25
- label = _ref$label === void 0 ? '标签' : _ref$label,
26
- _ref$value = _ref.value,
27
- value = _ref$value === void 0 ? 'value' : _ref$value,
28
- checked = _ref.checked,
29
- _ref$type = _ref.type,
30
- type = _ref$type === void 0 ? 'button' : _ref$type,
31
- name = _ref.name,
32
- _ref$selectColor = _ref.selectColor,
33
- selectColor = _ref$selectColor === void 0 ? '#F5743F' : _ref$selectColor,
34
- _ref$selectTextColor = _ref.selectTextColor,
35
- selectTextColor = _ref$selectTextColor === void 0 ? 'white' : _ref$selectTextColor,
36
- _ref$unSelectColor = _ref.unSelectColor,
37
- unSelectColor = _ref$unSelectColor === void 0 ? '#F0F0F0' : _ref$unSelectColor,
38
- _ref$unSelectTextColo = _ref.unSelectTextColor,
39
- unSelectTextColor = _ref$unSelectTextColo === void 0 ? '#727272' : _ref$unSelectTextColo,
40
- onChange = _ref.onChange,
41
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
42
- var _otherProps = otherProps || {};
43
- var handleChange = function handleChange(event) {
44
- onChange(event.target.value);
45
- };
46
- // 获取特殊的样式
47
- var customStyle = styleFunction(type, [unSelectColor, selectColor], [unSelectTextColor, selectTextColor], checked);
48
- if (_otherProps.style) {
49
- _otherProps.style = _extends({}, _otherProps.style, customStyle);
50
- } else {
51
- _otherProps.style = _extends({}, customStyle);
52
- }
53
- var className = type === 'button' ? 'radio-group-item__button' : 'radio-group-item__text';
54
- return /*#__PURE__*/React.createElement("label", _extends({
55
- key: value,
56
- className: className
57
- }, _otherProps), type === 'text' && checked && /*#__PURE__*/React.createElement("span", {
58
- className: "radio-group-item__text__line",
59
- style: {
60
- 'background-color': selectColor
61
- }
62
- }), /*#__PURE__*/React.createElement("input", {
63
- type: "radio",
64
- style: {
65
- 'display': 'none'
66
- },
67
- name: name,
68
- value: value,
69
- checked: checked,
70
- onChange: handleChange
71
- }), label);
72
- };
73
- RadioGroupItem.displayName = 'RadioGroupItem';
74
- export default RadioGroupItem;
@@ -1,80 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["options", "name", "type", "defaultValue", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "isWrap", "onChange", "children"];
4
- import React, { useEffect, useState } from 'react';
5
- import "./index.scss";
6
- import RadioGroupItem from "./radio-group-item";
7
- function uuid() {
8
- return Math.random().toString(36).substring(2);
9
- }
10
- var RadioGroup = function RadioGroup(_ref) {
11
- var _options$;
12
- var options = _ref.options,
13
- _ref$name = _ref.name,
14
- name = _ref$name === void 0 ? uuid() : _ref$name,
15
- _ref$type = _ref.type,
16
- type = _ref$type === void 0 ? 'button' : _ref$type,
17
- defaultValue = _ref.defaultValue,
18
- _ref$selectColor = _ref.selectColor,
19
- selectColor = _ref$selectColor === void 0 ? '#F5743F' : _ref$selectColor,
20
- _ref$selectTextColor = _ref.selectTextColor,
21
- selectTextColor = _ref$selectTextColor === void 0 ? 'white' : _ref$selectTextColor,
22
- _ref$unSelectColor = _ref.unSelectColor,
23
- unSelectColor = _ref$unSelectColor === void 0 ? '#F0F0F0' : _ref$unSelectColor,
24
- _ref$unSelectTextColo = _ref.unSelectTextColor,
25
- unSelectTextColor = _ref$unSelectTextColo === void 0 ? '#727272' : _ref$unSelectTextColo,
26
- _ref$isWrap = _ref.isWrap,
27
- isWrap = _ref$isWrap === void 0 ? false : _ref$isWrap,
28
- _ref$onChange = _ref.onChange,
29
- onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
30
- children = _ref.children,
31
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
32
- var _otherProps = otherProps || {};
33
- var defaultV = (options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value) || defaultValue || '';
34
- var _useState = useState(defaultV),
35
- selectedValue = _useState[0],
36
- setSelectedValue = _useState[1];
37
- useEffect(function () {
38
- if (defaultV) {
39
- handleChange(defaultV);
40
- }
41
- }, [defaultV]);
42
- var handleChange = function handleChange(value) {
43
- setSelectedValue(value);
44
- onChange(value);
45
- };
46
- var wrapClass = isWrap ? 'flex-wrap: wrap;' : 'flex-wrap: nowrap;overflow-x: auto;';
47
- _otherProps.style = wrapClass + ' ' + _otherProps.style ? _otherProps.style : '';
48
- return /*#__PURE__*/React.createElement("div", _extends({
49
- className: "radio-group__panel"
50
- }, _otherProps), (options || []).map(function (option) {
51
- return /*#__PURE__*/React.createElement(RadioGroupItem, {
52
- label: option.label,
53
- value: option.value,
54
- key: option.value,
55
- checked: selectedValue === option.value,
56
- name: name,
57
- type: type,
58
- selectColor: selectColor,
59
- selectTextColor: selectTextColor,
60
- unSelectColor: unSelectColor,
61
- unSelectTextColor: unSelectTextColor,
62
- onChange: handleChange
63
- });
64
- // return convertChildren(children, 'custom-radio-group-item', {
65
- // label: option.label,
66
- // value: option.value,
67
- // key: option.value,
68
- // checked: selectedValue === option.value,
69
- // name: name,
70
- // type: type,
71
- // selectColor: selectColor,
72
- // selectTextColor: selectTextColor,
73
- // unSelectColor: unSelectColor,
74
- // unSelectTextColor: unSelectTextColor,
75
- // onChange: handleChange
76
- // })
77
- }));
78
- };
79
- RadioGroup.displayName = 'RadioGroup';
80
- export default RadioGroup;
@@ -1,6 +0,0 @@
1
- /**
2
- * 富文本
3
- */
4
-
5
- import RichText from "./rich-text";
6
- export { RichText };
@@ -1,19 +0,0 @@
1
- .rich-text {
2
- width: 100%;
3
- display: flex;
4
- flex-direction: column;
5
- padding: 0; /* 添加内边距 */
6
- margin: 0; /* 去除外边距 */
7
- word-break: break-word; /* 处理长单词换行 */
8
- overflow-wrap: break-word; /* 支持长单词换行 */
9
- overflow: hidden; /* 隐藏超出部分 */
10
- }
11
- p {
12
- padding: 0;
13
- margin: 0 0 20px 0 !important;
14
- }
15
- img {
16
- max-width: 100%;
17
- height: auto; /* 保持纵横比 */
18
- object-fit: contain; /* 确保图片保持在容器内 */
19
- }
@@ -1,37 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["content", "dataList"];
4
- import React from 'react';
5
- import "./index.scss";
6
- // 富文本
7
-
8
- // 用于处理富文本内容的函数
9
- var processContent = function processContent(content) {
10
- // 检查内容是否为字符串
11
- if (typeof content !== 'string') {
12
- return '';
13
- }
14
- // 替换转义符号(这里可以根据需要添加更多处理逻辑)
15
- return content.replace(/\\/g, '');
16
- };
17
- var RichText = function RichText(props) {
18
- var content = props.content,
19
- dataList = props.dataList,
20
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
21
- return /*#__PURE__*/React.createElement("div", _extends({
22
- className: "rich-text"
23
- }, otherProps), dataList && dataList.length > 0 ? dataList.map(function (item, index) {
24
- return /*#__PURE__*/React.createElement("div", {
25
- key: index,
26
- dangerouslySetInnerHTML: {
27
- __html: processContent(item.content)
28
- }
29
- });
30
- }) : /*#__PURE__*/React.createElement("div", {
31
- dangerouslySetInnerHTML: {
32
- __html: processContent(content)
33
- }
34
- }));
35
- };
36
- RichText.displayName = 'RichText';
37
- export default RichText;
@@ -1,2 +0,0 @@
1
- import SearchBar from "./search-bar";
2
- export default SearchBar;
@@ -1,13 +0,0 @@
1
- .search-bar-box {
2
- width: 260px;
3
- height: 35px;
4
- margin: 0;
5
- .next-input {
6
- width: 260px;
7
- border-radius: 34px;
8
- height: 35px;
9
- & input {
10
- height: 100%;
11
- }
12
- }
13
- }
@@ -1,33 +0,0 @@
1
- import _Input from "@alifd/next/es/input";
2
- import _Icon from "@alifd/next/es/icon";
3
- import * as React from 'react';
4
- import { forwardRef } from "react";
5
- var ExampleComponent = function ExampleComponent(props, ref) {
6
- var defaultValue = props.defaultValue,
7
- onSearch = props.onSearch;
8
- return /*#__PURE__*/React.createElement("div", {
9
- ref: ref,
10
- className: "search-bar-box",
11
- onClick: function onClick() {
12
- onSearch();
13
- }
14
- }, /*#__PURE__*/React.createElement(_Input, {
15
- innerBefore: /*#__PURE__*/React.createElement(_Icon, {
16
- type: "search",
17
- style: {
18
- marginLeft: '15px'
19
- },
20
- onClick: function onClick() {
21
- return onSearch();
22
- }
23
- }),
24
- placeholder: defaultValue,
25
- "aria-label": "input with config of innerBefore",
26
- onFocus: function onFocus() {
27
- return onSearch();
28
- }
29
- }));
30
- };
31
- var SearchBar = /*#__PURE__*/forwardRef(ExampleComponent);
32
- SearchBar.displayName = 'SearchBar';
33
- export default SearchBar;
@@ -1,2 +0,0 @@
1
- import Swiper from "./swiper";
2
- export default Swiper;
@@ -1,12 +0,0 @@
1
- /* write style here */
2
- .swiper__container {
3
- margin: 0;
4
- &__sliede {
5
- position: relative;
6
- height: 100%;
7
- }
8
- }
9
- .img{
10
- width: 100%;
11
- height: 100%;
12
- }
@@ -1,34 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import * as React from 'react';
3
- import { Image } from '@alilc/lowcode-materials';
4
- import { Swiper, SwiperSlide } from 'swiper/react';
5
- import SwiperCore, { Autoplay } from 'swiper/core'; // 引入核心插件和自动播放组件
6
- SwiperCore.use([Autoplay]); // 使用插件,插件名放入[]中,这一行是重点
7
- import "./index.scss";
8
- import 'swiper/swiper.min.css';
9
- var DCSlider = function DCSlider(props) {
10
- var height = props.height;
11
- return /*#__PURE__*/React.createElement(Swiper, _extends({}, props, {
12
- className: "swiper__container",
13
- style: {
14
- height: height ? height + "px" : '100%'
15
- }
16
- }), props.picUrls && props.picUrls.length > 0 ? props.picUrls.map(function (url, index) {
17
- return /*#__PURE__*/React.createElement(SwiperSlide, {
18
- className: "swiper__container__sliede",
19
- style: {
20
- width: '100%',
21
- height: height ? height + "px" : '100%'
22
- }
23
- }, /*#__PURE__*/React.createElement(Image, {
24
- src: url,
25
- alt: "Slide",
26
- key: index,
27
- style: {
28
- width: '100%',
29
- height: height ? height + "px" : '100%'
30
- }
31
- }));
32
- }) : /*#__PURE__*/React.createElement("div", null, "\u56FE\u7247\u4E3A\u7A7A"));
33
- };
34
- export default DCSlider;
@@ -1,5 +0,0 @@
1
- /**
2
- * 标签tag
3
- */
4
- import Tab from "./tab";
5
- export default Tab;