@dckj-npm/dc-material 0.1.122 → 0.1.124
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/README.md +17 -17
- package/build/index.js +8 -8
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +5 -5
- package/dist/BizComps.js.map +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/bottom-navigation/index.scss +24 -24
- package/es/components/button/button.d.ts +14 -0
- package/es/components/button/index.d.ts +6 -0
- package/es/components/button/index.js +2 -2
- package/es/components/button/index.scss +16 -16
- package/es/components/carousel/carousel.d.ts +14 -0
- package/es/components/carousel/carousel.scss +32 -32
- 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-button/index.scss +5 -5
- package/es/components/colorful-input/colorful-input.d.ts +8 -0
- package/es/components/colorful-input/index.d.ts +3 -0
- package/es/components/colorful-input/index.scss +5 -5
- package/es/components/goods-card-list/goods-card-list-common.d.ts +5 -0
- package/es/components/goods-card-list/goods-card-list-common.scss +118 -118
- package/es/components/goods-card-list/goods-card-list.d.ts +5 -0
- package/es/components/goods-card-list/goods-card-list.scss +112 -112
- package/es/components/goods-card-list/index.d.ts +4 -0
- package/es/components/goods-card-list/types.d.ts +45 -0
- package/es/components/grid-nav/grid-nav.d.ts +13 -0
- package/es/components/grid-nav/index.d.ts +3 -0
- package/es/components/grid-nav/index.scss +41 -41
- package/es/components/integral-task/index.d.ts +6 -0
- package/es/components/integral-task/index.js +2 -2
- package/es/components/integral-task/index.scss +35 -35
- package/es/components/integral-task/integral-task.d.ts +40 -0
- package/es/components/menu-list/index.d.ts +6 -0
- package/es/components/menu-list/index.js +2 -2
- package/es/components/menu-list/index.scss +16 -16
- package/es/components/menu-list/menu-list-item.d.ts +5 -0
- package/es/components/menu-list/menu-list-item.scss +49 -49
- package/es/components/menu-list/menu-list.d.ts +5 -0
- package/es/components/menu-list/types.d.ts +23 -0
- package/es/components/message-list/index.d.ts +6 -0
- package/es/components/message-list/index.js +2 -2
- package/es/components/message-list/index.scss +22 -22
- package/es/components/message-list/message-list-item.d.ts +33 -0
- package/es/components/message-list/message-list-item.js +2 -2
- package/es/components/message-list/message-list-item.scss +60 -60
- package/es/components/message-list/message-list.d.ts +28 -0
- package/es/components/notice-bar/index.d.ts +3 -0
- package/es/components/notice-bar/index.scss +59 -42
- package/es/components/notice-bar/notice-bar-item.d.ts +18 -0
- package/es/components/notice-bar/notice-bar-item.js +5 -2
- package/es/components/notice-bar/notice-bar-item.scss +26 -26
- package/es/components/notice-bar/notice-bar.d.ts +37 -0
- package/es/components/notice-bar/notice-bar.js +15 -51
- package/es/components/position/entity.d.ts +5 -0
- package/es/components/position/index.d.ts +3 -0
- package/es/components/position/index.scss +27 -27
- package/es/components/position/position-left.d.ts +9 -0
- package/es/components/position/position-list.d.ts +12 -0
- package/es/components/position/position.d.ts +8 -0
- package/es/components/radio-group/index.d.ts +8 -0
- package/es/components/radio-group/index.js +2 -2
- package/es/components/radio-group/index.scss +40 -40
- package/es/components/radio-group/radio-group-item.d.ts +48 -0
- package/es/components/radio-group/radio-group.d.ts +52 -0
- package/es/components/rich-text/index.d.ts +6 -0
- package/es/components/rich-text/index.js +2 -2
- package/es/components/rich-text/index.scss +19 -19
- package/es/components/rich-text/rich-text.d.ts +14 -0
- package/es/components/search-bar/index.d.ts +3 -0
- package/es/components/search-bar/index.scss +14 -13
- package/es/components/search-bar/search-bar.d.ts +7 -0
- package/es/components/swiper/index.d.ts +3 -0
- package/es/components/swiper/index.scss +12 -12
- package/es/components/swiper/swiper.d.ts +47 -0
- package/es/components/tab/index.d.ts +6 -0
- package/es/components/tab/index.js +2 -2
- package/es/components/tab/index.scss +39 -39
- package/es/components/tab/tab.d.ts +27 -0
- package/es/components/tab-container/index.d.ts +3 -0
- package/es/components/tab-container/index.scss +47 -47
- package/es/components/tab-container/tab-container.d.ts +10 -0
- package/es/components/tab-container-item/index.d.ts +3 -0
- package/es/components/tab-container-item/tab-container-item.d.ts +11 -0
- package/es/components/tag/index.d.ts +6 -0
- package/es/components/tag/index.js +2 -2
- package/es/components/tag/index.scss +24 -24
- package/es/components/tag/tag.d.ts +14 -0
- package/es/components/teletext-list/index.d.ts +6 -0
- package/es/components/teletext-list/index.js +2 -2
- package/es/components/teletext-list/index.scss +19 -19
- package/es/components/teletext-list/teletext-list-item.d.ts +33 -0
- package/es/components/teletext-list/teletext-list-item.js +2 -2
- package/es/components/teletext-list/teletext-list-item.scss +55 -55
- package/es/components/teletext-list/teletext-list.d.ts +52 -0
- package/es/components/teletext-list/teletext-list.js +2 -2
- package/es/components/title/index.d.ts +8 -0
- package/es/components/title/index.js +2 -2
- package/es/components/title/title-1.d.ts +10 -0
- package/es/components/title/title-1.scss +25 -25
- package/es/components/title/title-2.d.ts +18 -0
- package/es/components/title/title-2.scss +22 -22
- package/es/index.d.ts +42 -0
- package/es/index.scss +5 -5
- package/es/utils/children-node-handle.d.ts +9 -0
- package/es/utils/children-node-handle.js +7 -7
- package/es/utils/component-wrapper.d.ts +9 -0
- package/es/utils/debounce.d.ts +1 -0
- package/es/utils/time-util.d.ts +5 -0
- package/es/utils/time-util.js +3 -3
- package/es/variables.d.ts +2 -0
- package/es/variables.scss +3 -3
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +15 -0
- package/lib/components/bottom-navigation/index.d.ts +3 -0
- package/lib/components/bottom-navigation/index.scss +24 -24
- package/lib/components/button/button.d.ts +14 -0
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/index.scss +16 -16
- package/lib/components/carousel/carousel.d.ts +14 -0
- package/lib/components/carousel/carousel.scss +32 -32
- 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-button/index.scss +5 -5
- package/lib/components/colorful-input/colorful-input.d.ts +8 -0
- package/lib/components/colorful-input/index.d.ts +3 -0
- package/lib/components/colorful-input/index.scss +5 -5
- package/lib/components/goods-card-list/goods-card-list-common.d.ts +5 -0
- package/lib/components/goods-card-list/goods-card-list-common.scss +118 -118
- package/lib/components/goods-card-list/goods-card-list.d.ts +5 -0
- package/lib/components/goods-card-list/goods-card-list.scss +112 -112
- 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/index.d.ts +3 -0
- package/lib/components/grid-nav/index.scss +41 -41
- package/lib/components/integral-task/index.d.ts +6 -0
- package/lib/components/integral-task/index.js +2 -2
- package/lib/components/integral-task/index.scss +35 -35
- 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/index.js +2 -2
- package/lib/components/menu-list/index.scss +16 -16
- package/lib/components/menu-list/menu-list-item.d.ts +5 -0
- package/lib/components/menu-list/menu-list-item.scss +49 -49
- 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/index.js +2 -2
- package/lib/components/message-list/index.scss +22 -22
- package/lib/components/message-list/message-list-item.d.ts +33 -0
- package/lib/components/message-list/message-list-item.js +2 -2
- package/lib/components/message-list/message-list-item.scss +60 -60
- 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 +59 -42
- package/lib/components/notice-bar/notice-bar-item.d.ts +18 -0
- package/lib/components/notice-bar/notice-bar-item.js +5 -2
- package/lib/components/notice-bar/notice-bar-item.scss +26 -26
- package/lib/components/notice-bar/notice-bar.d.ts +37 -0
- package/lib/components/notice-bar/notice-bar.js +15 -53
- package/lib/components/position/entity.d.ts +5 -0
- package/lib/components/position/index.d.ts +3 -0
- package/lib/components/position/index.scss +27 -27
- package/lib/components/position/position-left.d.ts +9 -0
- package/lib/components/position/position-list.d.ts +12 -0
- package/lib/components/position/position.d.ts +8 -0
- package/lib/components/radio-group/index.d.ts +8 -0
- package/lib/components/radio-group/index.scss +40 -40
- 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/index.scss +19 -19
- 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 +14 -13
- package/lib/components/search-bar/search-bar.d.ts +7 -0
- package/lib/components/swiper/index.d.ts +3 -0
- package/lib/components/swiper/index.scss +12 -12
- package/lib/components/swiper/swiper.d.ts +47 -0
- package/lib/components/tab/index.d.ts +6 -0
- package/lib/components/tab/index.js +2 -2
- package/lib/components/tab/index.scss +39 -39
- package/lib/components/tab/tab.d.ts +27 -0
- package/lib/components/tab-container/index.d.ts +3 -0
- package/lib/components/tab-container/index.scss +47 -47
- 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/index.js +2 -2
- package/lib/components/tag/index.scss +24 -24
- 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 +19 -19
- package/lib/components/teletext-list/teletext-list-item.d.ts +33 -0
- package/lib/components/teletext-list/teletext-list-item.js +2 -2
- package/lib/components/teletext-list/teletext-list-item.scss +55 -55
- package/lib/components/teletext-list/teletext-list.d.ts +52 -0
- package/lib/components/teletext-list/teletext-list.js +2 -2
- package/lib/components/title/index.d.ts +8 -0
- package/lib/components/title/title-1.d.ts +10 -0
- package/lib/components/title/title-1.scss +25 -25
- package/lib/components/title/title-2.d.ts +18 -0
- package/lib/components/title/title-2.scss +22 -22
- package/lib/index.d.ts +42 -0
- package/lib/index.scss +5 -5
- package/lib/utils/children-node-handle.d.ts +9 -0
- package/lib/utils/children-node-handle.js +7 -7
- package/lib/utils/component-wrapper.d.ts +9 -0
- package/lib/utils/debounce.d.ts +1 -0
- package/lib/utils/time-util.d.ts +5 -0
- package/lib/utils/time-util.js +3 -3
- package/lib/variables.d.ts +2 -0
- package/lib/variables.scss +3 -3
- package/lowcode/button2/meta.ts +75 -75
- package/lowcode/custom-radio-group/meta.ts +310 -310
- package/lowcode/custom-radio-group-item/meta.ts +229 -229
- package/lowcode/d-c-slider/meta.design.ts +173 -173
- package/lowcode/d-c-slider/meta.ts +342 -342
- package/lowcode/d-c-slider/snippets.ts +68 -68
- package/lowcode/goods-card-list/meta.ts +268 -268
- package/lowcode/goods-card-list-common/meta.ts +268 -268
- package/lowcode/grid-nav/meta.ts +212 -212
- package/lowcode/integral-task/meta.ts +211 -211
- package/lowcode/menu-list/meta.ts +147 -147
- package/lowcode/message-list/meta.ts +202 -202
- package/lowcode/navigation/meta.ts +165 -165
- package/lowcode/notice-bar/meta.ts +228 -228
- package/lowcode/position/meta.ts +161 -161
- package/lowcode/search-bar/meta.ts +54 -54
- package/lowcode/swiper/meta.ts +237 -237
- package/lowcode/tab-container/meta.ts +70 -70
- package/lowcode/tab-container/props.ts +194 -194
- package/lowcode/tab-container-item/meta.ts +195 -195
- package/lowcode/tab-message/meta.ts +101 -101
- package/lowcode/tag-c/meta.ts +75 -75
- package/lowcode/teletext-list/meta.ts +338 -338
- package/lowcode/title1/meta.ts +59 -59
- package/lowcode/title2/meta.ts +93 -93
- package/lowcode_es/button2/meta.d.ts +22 -22
- package/lowcode_es/custom-radio-group/meta.d.ts +22 -22
- package/lowcode_es/custom-radio-group-item/meta.d.ts +23 -23
- package/lowcode_es/d-c-slider/meta.d.ts +148 -148
- package/lowcode_es/d-c-slider/meta.design.d.ts +100 -100
- package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_es/goods-card-list/meta.d.ts +22 -22
- package/lowcode_es/goods-card-list-common/meta.d.ts +22 -22
- package/lowcode_es/grid-nav/meta.d.ts +22 -22
- package/lowcode_es/integral-task/meta.d.ts +22 -22
- package/lowcode_es/menu-list/meta.d.ts +22 -22
- package/lowcode_es/message-list/meta.d.ts +22 -22
- package/lowcode_es/meta.js +24 -24
- package/lowcode_es/navigation/meta.d.ts +22 -22
- package/lowcode_es/notice-bar/meta.d.ts +22 -22
- package/lowcode_es/position/meta.d.ts +22 -22
- package/lowcode_es/rich-text/meta.d.ts +22 -22
- package/lowcode_es/search-bar/meta.d.ts +22 -22
- package/lowcode_es/swiper/meta.d.ts +22 -22
- package/lowcode_es/tab-container/meta.d.ts +22 -22
- package/lowcode_es/tab-container/props.d.ts +90 -90
- package/lowcode_es/tab-container-item/meta.d.ts +22 -22
- package/lowcode_es/tab-message/meta.d.ts +22 -22
- package/lowcode_es/tag-c/meta.d.ts +22 -22
- package/lowcode_es/teletext-list/meta.d.ts +22 -22
- package/lowcode_es/teletext-list/meta.js +1 -1
- package/lowcode_es/title1/meta.d.ts +22 -22
- package/lowcode_es/title2/meta.d.ts +22 -22
- package/lowcode_es/view.js +3 -3
- package/lowcode_lib/button2/meta.d.ts +22 -22
- package/lowcode_lib/custom-radio-group/meta.d.ts +22 -22
- package/lowcode_lib/custom-radio-group-item/meta.d.ts +23 -23
- package/lowcode_lib/d-c-slider/meta.d.ts +148 -148
- package/lowcode_lib/d-c-slider/meta.design.d.ts +100 -100
- package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_lib/goods-card-list/meta.d.ts +22 -22
- package/lowcode_lib/goods-card-list-common/meta.d.ts +22 -22
- package/lowcode_lib/grid-nav/meta.d.ts +22 -22
- package/lowcode_lib/integral-task/meta.d.ts +22 -22
- package/lowcode_lib/menu-list/meta.d.ts +22 -22
- package/lowcode_lib/message-list/meta.d.ts +22 -22
- package/lowcode_lib/meta.js +24 -24
- package/lowcode_lib/navigation/meta.d.ts +22 -22
- package/lowcode_lib/notice-bar/meta.d.ts +22 -22
- package/lowcode_lib/position/meta.d.ts +22 -22
- package/lowcode_lib/rich-text/meta.d.ts +22 -22
- package/lowcode_lib/search-bar/meta.d.ts +22 -22
- package/lowcode_lib/swiper/meta.d.ts +22 -22
- package/lowcode_lib/tab-container/meta.d.ts +22 -22
- package/lowcode_lib/tab-container/props.d.ts +90 -90
- package/lowcode_lib/tab-container-item/meta.d.ts +22 -22
- package/lowcode_lib/tab-message/meta.d.ts +22 -22
- package/lowcode_lib/tag-c/meta.d.ts +22 -22
- package/lowcode_lib/teletext-list/meta.d.ts +22 -22
- package/lowcode_lib/teletext-list/meta.js +1 -1
- package/lowcode_lib/title1/meta.d.ts +22 -22
- package/lowcode_lib/title2/meta.d.ts +22 -22
- package/lowcode_lib/view.js +2 -2
- package/package.json +3 -3
- package/es/components/notice-bar/components/ScrollSwitcher.js +0 -45
- package/es/components/notice-bar/components/ScrollSwitcher.scss +0 -17
- package/lib/components/notice-bar/components/ScrollSwitcher.js +0 -52
- package/lib/components/notice-bar/components/ScrollSwitcher.scss +0 -17
|
@@ -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
|
+
}
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _messageList = _interopRequireDefault(require("./message-list"));
|
|
7
|
-
/**
|
|
8
|
-
* 消息列表
|
|
7
|
+
/**
|
|
8
|
+
* 消息列表
|
|
9
9
|
*/
|
|
10
10
|
var _default = exports["default"] = _messageList["default"];
|
|
@@ -1,22 +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
|
-
|
|
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;
|
|
@@ -9,8 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./message-list-item.scss");
|
|
10
10
|
var _childrenNodeHandle = require("../../utils/children-node-handle");
|
|
11
11
|
var _excluded = ["onClick", "title", "image", "gmtCreate", "children", "description", "isRead"];
|
|
12
|
-
/**
|
|
13
|
-
* 数据
|
|
12
|
+
/**
|
|
13
|
+
* 数据
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
var MessageListItem = function MessageListItem(_ref) {
|
|
@@ -1,60 +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
|
-
}
|
|
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;
|
|
@@ -1,42 +1,59 @@
|
|
|
1
|
-
.notice-bar__panel {
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
height: 70px;
|
|
6
|
-
box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.07);
|
|
7
|
-
margin: 0;
|
|
8
|
-
padding: 0 10px;
|
|
9
|
-
border-radius: 12px;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
.notice-bar__panel__item-img {
|
|
12
|
-
width: 46px;
|
|
13
|
-
margin-right: 7px;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
.notice-bar__panel__item-list {
|
|
17
|
-
width: calc(100% - 53px);
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
align-items: start;
|
|
21
|
-
justify-content: start;
|
|
22
|
-
border-left: 1px solid #f1f1f1;
|
|
23
|
-
padding-left: 10px;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
.notice-bar__panel {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
height: 70px;
|
|
6
|
+
box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.07);
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0 10px;
|
|
9
|
+
border-radius: 12px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
.notice-bar__panel__item-img {
|
|
12
|
+
width: 46px;
|
|
13
|
+
margin-right: 7px;
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
.notice-bar__panel__item-list {
|
|
17
|
+
width: calc(100% - 53px);
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
align-items: start;
|
|
21
|
+
justify-content: start;
|
|
22
|
+
border-left: 1px solid #f1f1f1;
|
|
23
|
+
padding-left: 10px;
|
|
24
|
+
position: relative;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
.notice-bar__panel__item-loop {
|
|
28
|
+
width: 100%;
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow: hidden; // 确保超出部分不显示
|
|
31
|
+
height: 20px; // 设置合适的高度
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.notice-bar__panel__item-loop > div {
|
|
35
|
+
position: absolute; // 绝对定位
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 20px;
|
|
38
|
+
animation: scrollUp 4s linear infinite; // 动画持续时间和类型
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes scrollUp {
|
|
42
|
+
0% {
|
|
43
|
+
transform: translateY(100%); // 从底部开始
|
|
44
|
+
}
|
|
45
|
+
100% {
|
|
46
|
+
transform: translateY(-200%); // 滚动到顶部
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
//动画
|
|
56
|
+
.anim {
|
|
57
|
+
transition: all 0.5s;
|
|
58
|
+
margin-top: -24px;
|
|
59
|
+
}
|
|
@@ -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;
|
|
@@ -18,12 +18,15 @@ var NoticeBarItem = function NoticeBarItem(_ref) {
|
|
|
18
18
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
19
19
|
var _otherProps = otherProps || {};
|
|
20
20
|
releaseTime = (0, _timeUtil.formatTime)(releaseTime);
|
|
21
|
+
console.log((0, _childrenNodeHandle.convertChildren)(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
|
|
22
|
+
name: isTop === 1 ? '置顶' : '最新'
|
|
23
|
+
}));
|
|
21
24
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
22
25
|
className: "notice-bar__panel__item"
|
|
23
26
|
}, _otherProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
27
|
className: "notice-bar__panel__item-left"
|
|
25
|
-
}, (0, _childrenNodeHandle.convertChildren)(children, isTop ===
|
|
26
|
-
name: isTop ===
|
|
28
|
+
}, (0, _childrenNodeHandle.convertChildren)(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
|
|
29
|
+
name: isTop === 1 ? '置顶' : '最新'
|
|
27
30
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
31
|
className: "notice-bar__panal__item__content"
|
|
29
32
|
}, content)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1,26 +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: 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
|
+
.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
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
declare const NoticeBar: React.FC<NoticeBarProps>;
|
|
37
|
+
export default NoticeBar;
|
|
@@ -5,12 +5,10 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.scss");
|
|
10
10
|
var _noticeBarItem = _interopRequireDefault(require("./notice-bar-item"));
|
|
11
11
|
var _excluded = ["dataList", "onClick", "icon", "children"];
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
12
|
var NoticeBar = function NoticeBar(_ref) {
|
|
15
13
|
var dataList = _ref.dataList,
|
|
16
14
|
_ref$onClick = _ref.onClick,
|
|
@@ -19,45 +17,13 @@ var NoticeBar = function NoticeBar(_ref) {
|
|
|
19
17
|
children = _ref.children,
|
|
20
18
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
21
19
|
var _otherProps = otherProps || {};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
setPlay = _useState[1];
|
|
28
|
-
var _useState2 = (0, _react.useState)([]),
|
|
29
|
-
loopItems = _useState2[0],
|
|
30
|
-
setLoopItems = _useState2[1];
|
|
31
|
-
var intervalId = (0, _react.useRef)(null);
|
|
32
|
-
(0, _react.useEffect)(function () {
|
|
33
|
-
var stickyItems = dataList.filter(function (item) {
|
|
34
|
-
return item.isTop === 1;
|
|
35
|
-
});
|
|
36
|
-
setLoopItems(dataList.filter(function (item) {
|
|
37
|
-
return item.isTop === 1;
|
|
38
|
-
}));
|
|
39
|
-
var startPlay = function startPlay() {
|
|
40
|
-
if (play) {
|
|
41
|
-
setLoopItems(function (prev) {
|
|
42
|
-
var newItems = [].concat(prev);
|
|
43
|
-
newItems.push(newItems[0]);
|
|
44
|
-
newItems.shift();
|
|
45
|
-
return newItems;
|
|
46
|
-
});
|
|
47
|
-
setPlay(false);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
intervalId.current = setInterval(startPlay, 2000);
|
|
51
|
-
return function () {
|
|
52
|
-
clearInterval(intervalId.current);
|
|
53
|
-
};
|
|
54
|
-
}, [dataList, play]);
|
|
55
|
-
var isScroll = function isScroll(index) {
|
|
56
|
-
return index === 0;
|
|
57
|
-
};
|
|
58
|
-
var stickyItems = dataList.filter(function (item) {
|
|
59
|
-
return item.isTop === 1;
|
|
20
|
+
var stickyItems = (dataList || []).filter(function (item) {
|
|
21
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 1;
|
|
22
|
+
});
|
|
23
|
+
var loopItems = (dataList || []).filter(function (item) {
|
|
24
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 0;
|
|
60
25
|
});
|
|
26
|
+
var loopItemsData = console.log('loopItemsData');
|
|
61
27
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
62
28
|
className: "notice-bar__panel"
|
|
63
29
|
}, _otherProps), /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -72,19 +38,15 @@ var NoticeBar = function NoticeBar(_ref) {
|
|
|
72
38
|
onClick: onClick,
|
|
73
39
|
children: children
|
|
74
40
|
}, item));
|
|
75
|
-
}) : /*#__PURE__*/_react["default"].createElement("div", null),
|
|
76
|
-
className: "notice-
|
|
77
|
-
}, loopItems.map(function (item, index) {
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], {
|
|
41
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", null), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: "notice-bar__panel__item-loop"
|
|
43
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, loopItems.length > 0 ? loopItems.map(function (item, index) {
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], (0, _extends2["default"])({
|
|
79
45
|
key: index,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
tag: item.tag,
|
|
85
|
-
onClick: onClick
|
|
86
|
-
});
|
|
87
|
-
})) : /*#__PURE__*/_react["default"].createElement("div", null, "\u6682\u65E0\u6570\u636E")));
|
|
46
|
+
onClick: onClick,
|
|
47
|
+
children: children
|
|
48
|
+
}, item));
|
|
49
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", null, "No items to display")))));
|
|
88
50
|
};
|
|
89
51
|
NoticeBar.displayName = 'NoticeBar';
|
|
90
52
|
var _default = exports["default"] = NoticeBar;
|