@dckj-npm/dc-material 0.1.147 → 0.1.149
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/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/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/bottom-navigation/bottom-navigation.d.ts +15 -0
- package/es/components/bottom-navigation/index.d.ts +3 -0
- package/es/components/button/button.d.ts +14 -0
- package/es/components/button/index.d.ts +6 -0
- package/es/components/carousel/carousel.d.ts +14 -0
- package/es/components/colorful-button/colorful-button.d.ts +12 -0
- package/es/components/colorful-button/index.d.ts +3 -0
- package/es/components/colorful-input/colorful-input.d.ts +8 -0
- package/es/components/colorful-input/index.d.ts +3 -0
- package/es/components/form/form-item.d.ts +42 -0
- package/es/components/form/form.d.ts +57 -0
- package/es/components/form/form.js +46 -0
- package/es/components/form/index.d.ts +6 -0
- package/es/components/form/index.js +6 -0
- package/es/components/form/index.scss +22 -0
- package/es/components/form/next-wrapper.d.ts +54 -0
- package/es/components/form/next-wrapper.js +43 -0
- package/es/components/goods-card-list/goods-card-list-common.d.ts +5 -0
- package/es/components/goods-card-list/goods-card-list-common.js +60 -0
- package/es/components/goods-card-list/goods-card-list-common.scss +118 -0
- package/es/components/goods-card-list/goods-card-list.d.ts +5 -0
- package/es/components/goods-card-list/goods-card-list.js +156 -0
- package/es/components/goods-card-list/goods-card-list.scss +112 -0
- package/es/components/goods-card-list/index.d.ts +4 -0
- package/es/components/goods-card-list/index.js +3 -0
- package/es/components/goods-card-list/types.d.ts +45 -0
- package/es/components/goods-card-list/types.js +1 -0
- package/es/components/grid-nav/grid-nav.d.ts +13 -0
- package/es/components/grid-nav/grid-nav.js +102 -0
- package/es/components/grid-nav/index.d.ts +3 -0
- package/es/components/grid-nav/index.js +2 -0
- package/es/components/grid-nav/index.scss +50 -0
- package/es/components/integral-task/index.d.ts +6 -0
- package/es/components/integral-task/index.js +5 -0
- package/es/components/integral-task/index.scss +35 -0
- package/es/components/integral-task/integral-task.d.ts +40 -0
- package/es/components/integral-task/integral-task.js +54 -0
- package/es/components/menu-list/index.d.ts +6 -0
- package/es/components/menu-list/index.js +6 -0
- package/es/components/menu-list/index.scss +16 -0
- package/es/components/menu-list/menu-list-item.d.ts +5 -0
- package/es/components/menu-list/menu-list-item.js +32 -0
- package/es/components/menu-list/menu-list-item.scss +49 -0
- package/es/components/menu-list/menu-list.d.ts +5 -0
- package/es/components/menu-list/menu-list.js +25 -0
- package/es/components/menu-list/types.d.ts +23 -0
- package/es/components/menu-list/types.js +1 -0
- package/es/components/message-list/index.d.ts +6 -0
- package/es/components/message-list/index.js +6 -0
- package/es/components/message-list/index.scss +22 -0
- package/es/components/message-list/message-list-item.d.ts +33 -0
- package/es/components/message-list/message-list-item.js +41 -0
- package/es/components/message-list/message-list-item.scss +60 -0
- package/es/components/message-list/message-list.d.ts +28 -0
- package/es/components/message-list/message-list.js +53 -0
- package/es/components/notice-bar/index.d.ts +3 -0
- package/es/components/notice-bar/index.js +2 -0
- package/es/components/notice-bar/index.scss +84 -0
- package/es/components/notice-bar/notice-bar-item.d.ts +18 -0
- package/es/components/notice-bar/notice-bar-item.js +30 -0
- package/es/components/notice-bar/notice-bar-item.scss +26 -0
- package/es/components/notice-bar/notice-bar.d.ts +46 -0
- package/es/components/notice-bar/notice-bar.js +57 -0
- package/es/components/position/entity.d.ts +5 -0
- package/es/components/position/entity.js +1 -0
- package/es/components/position/index.d.ts +3 -0
- package/es/components/position/index.js +2 -0
- package/es/components/position/index.scss +27 -0
- package/es/components/position/position-left.d.ts +9 -0
- package/es/components/position/position-left.js +28 -0
- package/es/components/position/position-list.d.ts +11 -0
- package/es/components/position/position-list.js +29 -0
- package/es/components/position/position.d.ts +8 -0
- package/es/components/position/position.js +48 -0
- package/es/components/radio-group/index.d.ts +8 -0
- package/es/components/radio-group/index.js +7 -0
- package/es/components/radio-group/index.scss +40 -0
- package/es/components/radio-group/radio-group-item.d.ts +48 -0
- package/es/components/radio-group/radio-group-item.js +74 -0
- package/es/components/radio-group/radio-group.d.ts +52 -0
- package/es/components/radio-group/radio-group.js +80 -0
- package/es/components/rich-text/index.d.ts +6 -0
- package/es/components/rich-text/index.js +6 -0
- package/es/components/rich-text/index.scss +19 -0
- package/es/components/rich-text/rich-text.d.ts +14 -0
- package/es/components/rich-text/rich-text.js +37 -0
- package/es/components/search-bar/index.d.ts +3 -0
- package/es/components/search-bar/index.js +2 -0
- package/es/components/search-bar/index.scss +39 -0
- package/es/components/search-bar/search-bar.d.ts +10 -0
- package/es/components/search-bar/search-bar.js +73 -0
- package/es/components/stream-list/index.d.ts +6 -0
- package/es/components/stream-list/index.js +6 -0
- package/es/components/stream-list/index.scss +26 -0
- package/es/components/stream-list/stream-list.d.ts +54 -0
- package/es/components/stream-list/stream-list.js +159 -0
- package/es/components/swiper/index.d.ts +3 -0
- package/es/components/swiper/index.js +2 -0
- package/es/components/swiper/index.scss +33 -0
- package/es/components/swiper/swiper.d.ts +26 -0
- package/es/components/swiper/swiper.js +77 -0
- package/es/components/tab/index.d.ts +6 -0
- package/es/components/tab/index.js +5 -0
- package/es/components/tab/index.scss +39 -0
- package/es/components/tab/tab.d.ts +27 -0
- package/es/components/tab/tab.js +50 -0
- package/es/components/tab-container/index.d.ts +3 -0
- package/es/components/tab-container/index.js +2 -0
- package/es/components/tab-container/index.scss +48 -0
- package/es/components/tab-container/tab-container.d.ts +10 -0
- package/es/components/tab-container/tab-container.js +26 -0
- package/es/components/tab-container-item/index.d.ts +3 -0
- package/es/components/tab-container-item/index.js +2 -0
- package/es/components/tab-container-item/index.scss +0 -0
- package/es/components/tab-container-item/tab-container-item.d.ts +11 -0
- package/es/components/tab-container-item/tab-container-item.js +19 -0
- package/es/components/tag/index.d.ts +6 -0
- package/es/components/tag/index.js +5 -0
- package/es/components/tag/index.scss +24 -0
- package/es/components/tag/tag.d.ts +14 -0
- package/es/components/tag/tag.js +14 -0
- package/es/components/teletext-list/index.d.ts +6 -0
- package/es/components/teletext-list/index.js +6 -0
- package/es/components/teletext-list/index.scss +40 -0
- package/es/components/teletext-list/teletext-list-item.d.ts +33 -0
- package/es/components/teletext-list/teletext-list-item.js +61 -0
- package/es/components/teletext-list/teletext-list-item.scss +57 -0
- package/es/components/teletext-list/teletext-list.d.ts +61 -0
- package/es/components/teletext-list/teletext-list.js +48 -0
- package/es/components/title/index.d.ts +8 -0
- package/es/components/title/index.js +7 -0
- package/es/components/title/title-1.d.ts +10 -0
- package/es/components/title/title-1.js +16 -0
- package/es/components/title/title-1.scss +25 -0
- package/es/components/title/title-2.d.ts +18 -0
- package/es/components/title/title-2.js +31 -0
- package/es/components/title/title-2.scss +22 -0
- package/es/entity/dynamic-column-data-type.d.ts +47 -0
- package/es/entity/dynamic-column-data-type.js +165 -0
- package/es/index.d.ts +46 -0
- package/es/index.js +86 -0
- package/es/index.scss +6 -0
- package/es/style.js +4 -0
- package/es/utils/children-node-handle.d.ts +9 -0
- package/es/utils/children-node-handle.js +25 -0
- package/es/utils/component-wrapper.d.ts +9 -0
- package/es/utils/component-wrapper.js +38 -0
- package/es/utils/debounce.d.ts +1 -0
- package/es/utils/debounce.js +14 -0
- package/es/utils/textUtil.d.ts +10 -0
- package/es/utils/textUtil.js +51 -0
- package/es/utils/time-util.d.ts +5 -0
- package/es/utils/time-util.js +18 -0
- package/es/variables.d.ts +2 -0
- package/es/variables.js +2 -0
- package/es/variables.scss +3 -0
- package/lib/assets/icon/grid-nav/right.png +0 -0
- package/lib/assets/icon/position/img.png +0 -0
- package/lib/assets/icon/position/location.png +0 -0
- package/lib/assets/icon/search/delete.png +0 -0
- package/lib/assets/icon/search/search.png +0 -0
- package/lib/assets/icon/teletext-list/arr.png +0 -0
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +15 -0
- package/lib/components/bottom-navigation/index.d.ts +3 -0
- package/lib/components/button/button.d.ts +14 -0
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/carousel/carousel.d.ts +14 -0
- package/lib/components/colorful-button/colorful-button.d.ts +12 -0
- package/lib/components/colorful-button/index.d.ts +3 -0
- package/lib/components/colorful-input/colorful-input.d.ts +8 -0
- package/lib/components/colorful-input/index.d.ts +3 -0
- package/lib/components/form/form-item.d.ts +42 -0
- package/lib/components/form/form-item.js +86 -0
- package/lib/components/form/form-item.scss +20 -0
- package/lib/components/form/form.d.ts +57 -0
- package/lib/components/form/form.js +49 -0
- package/lib/components/form/index.d.ts +6 -0
- package/lib/components/form/index.js +6 -0
- package/lib/components/form/index.scss +22 -0
- package/lib/components/form/next-wrapper.d.ts +54 -0
- package/lib/components/form/next-wrapper.js +49 -0
- package/lib/components/goods-card-list/goods-card-list-common.d.ts +5 -0
- package/lib/components/goods-card-list/goods-card-list.d.ts +5 -0
- package/lib/components/goods-card-list/index.d.ts +4 -0
- package/lib/components/goods-card-list/types.d.ts +45 -0
- package/lib/components/grid-nav/grid-nav.d.ts +13 -0
- package/lib/components/grid-nav/grid-nav.js +15 -4
- package/lib/components/grid-nav/index.d.ts +3 -0
- package/lib/components/grid-nav/index.scss +27 -18
- package/lib/components/integral-task/index.d.ts +6 -0
- package/lib/components/integral-task/integral-task.d.ts +40 -0
- package/lib/components/menu-list/index.d.ts +6 -0
- package/lib/components/menu-list/menu-list-item.d.ts +5 -0
- package/lib/components/menu-list/menu-list.d.ts +5 -0
- package/lib/components/menu-list/types.d.ts +23 -0
- package/lib/components/message-list/index.d.ts +6 -0
- package/lib/components/message-list/message-list-item.d.ts +33 -0
- package/lib/components/message-list/message-list-item.scss +1 -1
- package/lib/components/message-list/message-list.d.ts +28 -0
- package/lib/components/notice-bar/index.d.ts +3 -0
- package/lib/components/notice-bar/index.scss +56 -14
- package/lib/components/notice-bar/notice-bar-item.d.ts +18 -0
- package/lib/components/notice-bar/notice-bar-item.js +6 -5
- package/lib/components/notice-bar/notice-bar-item.scss +1 -1
- package/lib/components/notice-bar/notice-bar.d.ts +46 -0
- package/lib/components/notice-bar/notice-bar.js +28 -56
- package/lib/components/position/entity.d.ts +5 -0
- package/lib/components/position/index.d.ts +3 -0
- package/lib/components/position/position-left.d.ts +9 -0
- package/lib/components/position/position-list.d.ts +11 -0
- package/lib/components/position/position-list.js +2 -3
- package/lib/components/position/position.d.ts +8 -0
- package/lib/components/radio-group/index.d.ts +8 -0
- package/lib/components/radio-group/radio-group-item.d.ts +48 -0
- package/lib/components/radio-group/radio-group.d.ts +52 -0
- package/lib/components/rich-text/index.d.ts +6 -0
- package/lib/components/rich-text/rich-text.d.ts +14 -0
- package/lib/components/search-bar/index.d.ts +3 -0
- package/lib/components/search-bar/index.scss +36 -10
- package/lib/components/search-bar/search-bar.d.ts +10 -0
- package/lib/components/search-bar/search-bar.js +67 -27
- package/lib/components/stream-list/index.d.ts +6 -0
- package/lib/components/stream-list/index.js +6 -0
- package/lib/components/stream-list/index.scss +26 -0
- package/lib/components/stream-list/stream-list.d.ts +54 -0
- package/lib/components/stream-list/stream-list.js +166 -0
- package/lib/components/swiper/index.d.ts +3 -0
- package/lib/components/swiper/index.scss +29 -8
- package/lib/components/swiper/swiper.d.ts +26 -0
- package/lib/components/swiper/swiper.js +60 -19
- package/lib/components/tab/index.d.ts +6 -0
- package/lib/components/tab/tab.d.ts +27 -0
- package/lib/components/tab-container/index.d.ts +3 -0
- package/lib/components/tab-container/tab-container.d.ts +10 -0
- package/lib/components/tab-container-item/index.d.ts +3 -0
- package/lib/components/tab-container-item/tab-container-item.d.ts +11 -0
- package/lib/components/tag/index.d.ts +6 -0
- package/lib/components/tag/tag.d.ts +14 -0
- package/lib/components/teletext-list/index.d.ts +6 -0
- package/lib/components/teletext-list/index.scss +21 -0
- package/lib/components/teletext-list/teletext-list-item.d.ts +33 -0
- package/lib/components/teletext-list/teletext-list-item.scss +4 -2
- package/lib/components/teletext-list/teletext-list.d.ts +61 -0
- package/lib/components/teletext-list/teletext-list.js +17 -7
- package/lib/components/title/index.d.ts +8 -0
- package/lib/components/title/title-1.d.ts +10 -0
- package/lib/components/title/title-2.d.ts +18 -0
- package/lib/entity/dynamic-column-data-type.d.ts +47 -0
- package/lib/entity/dynamic-column-data-type.js +169 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.js +9 -1
- package/lib/style.js +1 -2
- package/lib/utils/children-node-handle.d.ts +9 -0
- package/lib/utils/component-wrapper.d.ts +9 -0
- package/lib/utils/debounce.d.ts +1 -0
- package/lib/utils/textUtil.d.ts +10 -0
- package/lib/utils/textUtil.js +55 -0
- package/lib/utils/time-util.d.ts +5 -0
- package/lib/variables.d.ts +2 -0
- package/lowcode/{d-c-form → form}/meta.ts +6 -6
- package/lowcode_es/{d-c-form → form}/meta.js +6 -6
- package/lowcode_es/meta.js +3 -3
- package/lowcode_lib/{d-c-form → form}/meta.js +6 -6
- package/lowcode_lib/meta.js +3 -3
- package/package.json +3 -3
- package/lib/components/notice-bar/components/ScrollSwitcher.js +0 -52
- package/lib/components/notice-bar/components/ScrollSwitcher.scss +0 -17
- /package/lowcode_es/{d-c-form → form}/meta.d.ts +0 -0
- /package/lowcode_lib/{d-c-form → form}/meta.d.ts +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./menu-list-item.scss";
|
|
3
|
+
var MenuListItem = function MenuListItem(_ref) {
|
|
4
|
+
var _ref$title = _ref.title,
|
|
5
|
+
title = _ref$title === void 0 ? '菜单名称' : _ref$title,
|
|
6
|
+
_ref$iconUrl = _ref.iconUrl,
|
|
7
|
+
iconUrl = _ref$iconUrl === void 0 ? '' : _ref$iconUrl,
|
|
8
|
+
handleClick = _ref.handleClick;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "menu-list__panel__item",
|
|
11
|
+
onClick: handleClick
|
|
12
|
+
}, iconUrl ? /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "menu-list__panel__item_icon"
|
|
14
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
15
|
+
alt: "",
|
|
16
|
+
src: iconUrl
|
|
17
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "menu-list__panel__item_title"
|
|
19
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "menu-list__panel__item_right"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
width: "32",
|
|
24
|
+
height: "32",
|
|
25
|
+
viewBox: "0 0 32 32"
|
|
26
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
d: "M22 16L12 26l-1.4-1.4l8.6-8.6l-8.6-8.6L12 6z"
|
|
29
|
+
}))));
|
|
30
|
+
};
|
|
31
|
+
MenuListItem.displayName = 'MenuListItem';
|
|
32
|
+
export default MenuListItem;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.menu-list__panel__item {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 7px;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: 45px;
|
|
9
|
+
|
|
10
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
11
|
+
|
|
12
|
+
&:last-child {
|
|
13
|
+
border-bottom: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.menu-list__panel__item_icon {
|
|
17
|
+
height: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
& > img {
|
|
22
|
+
height: 15px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menu-list__panel__item_title {
|
|
27
|
+
font-size: 15px;
|
|
28
|
+
color: #666666;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
margin-right: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.menu-list__panel__item_right {
|
|
34
|
+
height: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
|
|
38
|
+
& > svg {
|
|
39
|
+
height: 16px;
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
color: #666666;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["dataList"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
import MenuListItem from "./menu-list-item";
|
|
7
|
+
var MenuList = function MenuList(_ref) {
|
|
8
|
+
var dataList = _ref.dataList,
|
|
9
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
|
+
var _otherProps = otherProps || {};
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
12
|
+
className: "menu-list__panel"
|
|
13
|
+
}, _otherProps), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "menu-list__panel__item-list"
|
|
15
|
+
}, dataList.map(function (item, index) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(MenuListItem, {
|
|
17
|
+
key: index,
|
|
18
|
+
title: item.title,
|
|
19
|
+
iconUrl: item.iconUrl,
|
|
20
|
+
handleClick: item.handleClick
|
|
21
|
+
});
|
|
22
|
+
})));
|
|
23
|
+
};
|
|
24
|
+
MenuList.displayName = 'MenuList';
|
|
25
|
+
export default MenuList;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据
|
|
3
|
+
*/
|
|
4
|
+
export interface MenuListDataProps {
|
|
5
|
+
/**
|
|
6
|
+
* 菜单名称
|
|
7
|
+
*/
|
|
8
|
+
title: string;
|
|
9
|
+
/**
|
|
10
|
+
* 菜单图标地址
|
|
11
|
+
*/
|
|
12
|
+
iconUrl?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 点击事件
|
|
15
|
+
*/
|
|
16
|
+
handleClick?: Function;
|
|
17
|
+
}
|
|
18
|
+
export interface MenuListProps {
|
|
19
|
+
/**
|
|
20
|
+
* 数据
|
|
21
|
+
*/
|
|
22
|
+
dataList?: MenuListDataProps[];
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.message-list__panel {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
margin: 0;
|
|
7
|
+
&__tab{
|
|
8
|
+
margin-bottom: 20px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__item-list {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 10px;
|
|
15
|
+
div:last-child {
|
|
16
|
+
border-bottom: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './message-list-item.scss';
|
|
3
|
+
/**
|
|
4
|
+
* 数据
|
|
5
|
+
*/
|
|
6
|
+
export interface DataProps {
|
|
7
|
+
/**
|
|
8
|
+
* 标题
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 图片地址
|
|
13
|
+
*/
|
|
14
|
+
image?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 说明
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 发布时间
|
|
21
|
+
*/
|
|
22
|
+
gmtCreate?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 点击事件
|
|
25
|
+
*/
|
|
26
|
+
onClick?: (e: any) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 是否已读
|
|
29
|
+
*/
|
|
30
|
+
isRead?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const MessageListItem: React.FC<DataProps>;
|
|
33
|
+
export default MessageListItem;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["onClick", "title", "image", "gmtCreate", "children", "description", "isRead"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./message-list-item.scss";
|
|
6
|
+
import { convertChildren } from "../../utils/children-node-handle";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 数据
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var MessageListItem = function MessageListItem(_ref) {
|
|
13
|
+
var _ref$onClick = _ref.onClick,
|
|
14
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
15
|
+
title = _ref.title,
|
|
16
|
+
image = _ref.image,
|
|
17
|
+
gmtCreate = _ref.gmtCreate,
|
|
18
|
+
children = _ref.children,
|
|
19
|
+
description = _ref.description,
|
|
20
|
+
isRead = _ref.isRead,
|
|
21
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
|
+
var _otherProps = otherProps || {};
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24
|
+
className: "message-list__panel__item",
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, _otherProps), convertChildren(children, 'image', {
|
|
27
|
+
src: image
|
|
28
|
+
}), isRead ? null : /*#__PURE__*/React.createElement("span", {
|
|
29
|
+
className: "badge"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "message-list__panel__item__text"
|
|
32
|
+
}, convertChildren(children, 'title', {
|
|
33
|
+
children: [title]
|
|
34
|
+
}), convertChildren(children, 'gmtCreate', {
|
|
35
|
+
children: [gmtCreate]
|
|
36
|
+
}), convertChildren(children, 'content', {
|
|
37
|
+
children: [description]
|
|
38
|
+
})));
|
|
39
|
+
};
|
|
40
|
+
MessageListItem.displayName = 'TeletextListItem';
|
|
41
|
+
export default MessageListItem;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.message-list__panel__item {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 5px;
|
|
6
|
+
padding-bottom: 15px;
|
|
7
|
+
justify-content: flex-start;
|
|
8
|
+
border-bottom: 1px solid #eeeeee;
|
|
9
|
+
position: relative;
|
|
10
|
+
&_image {
|
|
11
|
+
width: 90px;
|
|
12
|
+
height: 71px;
|
|
13
|
+
border-radius: 5px;
|
|
14
|
+
flex: 0 0 auto;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
& > img {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
object-fit: cover;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.badge {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
width: 7px; // 根据需要设置的大小
|
|
27
|
+
height: 7px;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
background-color: #F44341; // 红色背景
|
|
30
|
+
position: absolute; // 绝对定位
|
|
31
|
+
top: 5px; // 根据需要调整位置
|
|
32
|
+
left: 38px; // 根据需要调整位置
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__text {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: 3px;
|
|
39
|
+
padding-top: 4px;
|
|
40
|
+
|
|
41
|
+
&__title {
|
|
42
|
+
font-size: 15px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
color: #000000;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__description {
|
|
48
|
+
-webkit-line-clamp: 1;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
color: #686868;
|
|
51
|
+
-webkit-box-orient: vertical;
|
|
52
|
+
display: -webkit-box;
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
import { DataProps } from './message-list-item';
|
|
4
|
+
export interface MessageListProps {
|
|
5
|
+
/**
|
|
6
|
+
* 全部的数据
|
|
7
|
+
*/
|
|
8
|
+
dataList?: DataProps[];
|
|
9
|
+
/**
|
|
10
|
+
* 点击事件
|
|
11
|
+
* @param e
|
|
12
|
+
*/
|
|
13
|
+
onClick?: (e: any) => void;
|
|
14
|
+
/**
|
|
15
|
+
* 子节点
|
|
16
|
+
*/
|
|
17
|
+
children: React.ReactChild;
|
|
18
|
+
/**
|
|
19
|
+
* 图片
|
|
20
|
+
*/
|
|
21
|
+
images: string[];
|
|
22
|
+
/**
|
|
23
|
+
* 切换数据源
|
|
24
|
+
*/
|
|
25
|
+
handleDataList: (key: string) => DataProps[];
|
|
26
|
+
}
|
|
27
|
+
declare const MessageList: React.FC<MessageListProps>;
|
|
28
|
+
export default MessageList;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["dataList", "handleDataList", "onClick", "children", "images"];
|
|
4
|
+
import React, { useEffect } from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
import { default as MessageListItem } from "./message-list-item";
|
|
7
|
+
import { convertChildren } from "../../utils/children-node-handle";
|
|
8
|
+
var MessageList = function MessageList(_ref) {
|
|
9
|
+
var dataList = _ref.dataList,
|
|
10
|
+
handleDataList = _ref.handleDataList,
|
|
11
|
+
_ref$onClick = _ref.onClick,
|
|
12
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
images = _ref.images,
|
|
15
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
|
+
var _otherProps = otherProps || {};
|
|
17
|
+
var _React$useState = React.useState(dataList || []),
|
|
18
|
+
currentDataList = _React$useState[0],
|
|
19
|
+
setCurrentDataList = _React$useState[1];
|
|
20
|
+
var _React$useState2 = React.useState('all'),
|
|
21
|
+
currentKey = _React$useState2[0],
|
|
22
|
+
setCurrentKey = _React$useState2[1];
|
|
23
|
+
|
|
24
|
+
// 切换数据源
|
|
25
|
+
var handleClick = function handleClick(key) {
|
|
26
|
+
var newDataList = handleDataList(key);
|
|
27
|
+
setCurrentDataList(newDataList);
|
|
28
|
+
setCurrentKey(key);
|
|
29
|
+
};
|
|
30
|
+
images = images || [];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
setCurrentDataList(dataList || []);
|
|
33
|
+
}, [dataList]);
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
|
+
className: "message-list__panel"
|
|
36
|
+
}, _otherProps), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "message-list__panel__tab"
|
|
38
|
+
}, convertChildren(children, 'tabMessage', {
|
|
39
|
+
onClickHandle: handleClick
|
|
40
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "message-list__panel__item-list"
|
|
42
|
+
}, currentDataList ? currentDataList.map(function (item, index) {
|
|
43
|
+
return /*#__PURE__*/React.createElement(MessageListItem, _extends({
|
|
44
|
+
key: index,
|
|
45
|
+
onClick: onClick,
|
|
46
|
+
children: children
|
|
47
|
+
}, item, {
|
|
48
|
+
image: images[index % images.length]
|
|
49
|
+
}));
|
|
50
|
+
}) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E")));
|
|
51
|
+
};
|
|
52
|
+
MessageList.displayName = 'MessageList';
|
|
53
|
+
export default MessageList;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.notice-bar__panel {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
height: 70px;
|
|
7
|
+
box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.07);
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 10px;
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
.notice-bar__panel__item-img {
|
|
13
|
+
width: 46px;
|
|
14
|
+
margin-right: 7px;
|
|
15
|
+
}
|
|
16
|
+
.notice-bar__panel__item-more {
|
|
17
|
+
width: 60px;
|
|
18
|
+
height: 100%;
|
|
19
|
+
//background: pink;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
|
|
22
|
+
&-more {
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: end;
|
|
27
|
+
align-items: center;
|
|
28
|
+
|
|
29
|
+
&-text {
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
font-size: 11px;
|
|
32
|
+
color: #666666;
|
|
33
|
+
margin-right: 2px;
|
|
34
|
+
}
|
|
35
|
+
&-img {
|
|
36
|
+
width: 5px;
|
|
37
|
+
height: 10px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.notice-bar__panel__item-list {
|
|
42
|
+
width: calc(100% - 53px - 60px);
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: start;
|
|
46
|
+
justify-content: start;
|
|
47
|
+
border-left: 1px solid #f1f1f1;
|
|
48
|
+
padding-left: 10px;
|
|
49
|
+
position: relative;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
|
|
52
|
+
.notice-bar__panel__item-loop {
|
|
53
|
+
width: 100%;
|
|
54
|
+
position: relative;
|
|
55
|
+
overflow: hidden; // 确保超出部分不显示
|
|
56
|
+
height: 20px; // 设置合适的高度
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.notice-bar__panel__item-loop > div {
|
|
60
|
+
position: absolute; // 绝对定位
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 20px;
|
|
63
|
+
animation: scrollUp 4s linear infinite; // 动画持续时间和类型
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes scrollUp {
|
|
67
|
+
0% {
|
|
68
|
+
transform: translateY(100%); // 从底部开始
|
|
69
|
+
}
|
|
70
|
+
100% {
|
|
71
|
+
transform: translateY(-200%); // 滚动到顶部
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
//动画
|
|
81
|
+
.anim {
|
|
82
|
+
transition: all 0.5s;
|
|
83
|
+
margin-top: -24px;
|
|
84
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './notice-bar-item.scss';
|
|
3
|
+
interface NoticeBarItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* 内容
|
|
6
|
+
*/
|
|
7
|
+
content?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 发布时间
|
|
10
|
+
*/
|
|
11
|
+
releaseTime?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 是否置顶
|
|
14
|
+
*/
|
|
15
|
+
isTop?: number;
|
|
16
|
+
}
|
|
17
|
+
declare const NoticeBarItem: React.FC<NoticeBarItemProps>;
|
|
18
|
+
export default NoticeBarItem;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
console.log(convertChildren(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
|
|
17
|
+
name: isTop === 1 ? '置顶' : '最新'
|
|
18
|
+
}));
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
20
|
+
className: "notice-bar__panel__item"
|
|
21
|
+
}, _otherProps), /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "notice-bar__panel__item-left"
|
|
23
|
+
}, convertChildren(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
|
|
24
|
+
name: isTop === 1 ? '置顶' : '最新'
|
|
25
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "notice-bar__panal__item__content"
|
|
27
|
+
}, content)));
|
|
28
|
+
};
|
|
29
|
+
NoticeBarItem.displayName = 'NoticeBarItem';
|
|
30
|
+
export default NoticeBarItem;
|
|
@@ -0,0 +1,26 @@
|
|
|
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: 180px;
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface DataProps {
|
|
4
|
+
/**
|
|
5
|
+
* 内容
|
|
6
|
+
*/
|
|
7
|
+
content?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 发布时间
|
|
10
|
+
*/
|
|
11
|
+
releaseTime?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 是否置顶
|
|
14
|
+
*/
|
|
15
|
+
isTop?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface NoticeBarProps {
|
|
18
|
+
/**
|
|
19
|
+
* 数据
|
|
20
|
+
*/
|
|
21
|
+
dataList?: DataProps[];
|
|
22
|
+
/**
|
|
23
|
+
* 点击事件
|
|
24
|
+
* @param e
|
|
25
|
+
*/
|
|
26
|
+
onClick?: (e: any) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 子节点
|
|
29
|
+
*/
|
|
30
|
+
children: React.ReactChild;
|
|
31
|
+
/**
|
|
32
|
+
* 左侧图标
|
|
33
|
+
*/
|
|
34
|
+
icon: string;
|
|
35
|
+
/**
|
|
36
|
+
* 点击事件
|
|
37
|
+
* @param e
|
|
38
|
+
*/
|
|
39
|
+
handleMoreClick?: (e: any) => void;
|
|
40
|
+
/**
|
|
41
|
+
* 更多
|
|
42
|
+
*/
|
|
43
|
+
moreText: string;
|
|
44
|
+
}
|
|
45
|
+
declare const NoticeBar: React.FC<NoticeBarProps>;
|
|
46
|
+
export default NoticeBar;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["dataList", "onClick", "icon", "children", "handleMoreClick", "moreText"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
import NoticeBarItem from "./notice-bar-item";
|
|
7
|
+
import arr from "../../assets/icon/teletext-list/arr.png";
|
|
8
|
+
var NoticeBar = function NoticeBar(_ref) {
|
|
9
|
+
var dataList = _ref.dataList,
|
|
10
|
+
_ref$onClick = _ref.onClick,
|
|
11
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
12
|
+
icon = _ref.icon,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
handleMoreClick = _ref.handleMoreClick,
|
|
15
|
+
moreText = _ref.moreText,
|
|
16
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
17
|
+
var _otherProps = otherProps || {};
|
|
18
|
+
var stickyItems = (dataList || []).filter(function (item) {
|
|
19
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 1;
|
|
20
|
+
});
|
|
21
|
+
var loopItems = (dataList || []).filter(function (item) {
|
|
22
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 0;
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
25
|
+
className: "notice-bar__panel"
|
|
26
|
+
}, _otherProps), /*#__PURE__*/React.createElement("img", {
|
|
27
|
+
className: "notice-bar__panel__item-img",
|
|
28
|
+
src: icon,
|
|
29
|
+
alt: ""
|
|
30
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "notice-bar__panel__item-list"
|
|
32
|
+
}, stickyItems ? stickyItems.map(function (item, index) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(NoticeBarItem, _extends({
|
|
34
|
+
key: index,
|
|
35
|
+
onClick: onClick
|
|
36
|
+
}, item), children);
|
|
37
|
+
}) : /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "notice-bar__panel__item-loop"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", null, loopItems.length > 0 ? loopItems.map(function (item, index) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(NoticeBarItem, _extends({
|
|
41
|
+
key: index,
|
|
42
|
+
onClick: onClick
|
|
43
|
+
}, item), children);
|
|
44
|
+
}) : /*#__PURE__*/React.createElement("div", null, "No items to display")))), /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "notice-bar__panel__item-more"
|
|
46
|
+
}, moreText ? /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "notice-bar__panel__item-more-more"
|
|
48
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
49
|
+
className: "notice-bar__panel__item-more-more-text",
|
|
50
|
+
onClick: handleMoreClick
|
|
51
|
+
}, moreText), /*#__PURE__*/React.createElement("img", {
|
|
52
|
+
src: arr,
|
|
53
|
+
className: "notice-bar__panel__item-more-more-img"
|
|
54
|
+
})) : ''));
|
|
55
|
+
};
|
|
56
|
+
NoticeBar.displayName = 'NoticeBar';
|
|
57
|
+
export default NoticeBar;
|