@dckj-npm/dc-material 0.1.127 → 0.1.129
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 +10 -10
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +5 -5
- package/dist/BizComps.js.map +1 -1
- package/es/components/bottom-navigation/index.scss +24 -24
- package/es/components/button/index.js +2 -2
- package/es/components/button/index.scss +16 -16
- package/es/components/carousel/carousel.scss +32 -32
- package/es/components/colorful-button/index.scss +5 -5
- package/es/components/colorful-input/index.scss +5 -5
- package/es/components/goods-card-list/goods-card-list-common.scss +118 -118
- package/es/components/goods-card-list/goods-card-list.scss +112 -112
- package/es/components/grid-nav/index.scss +41 -41
- package/es/components/integral-task/index.js +2 -2
- package/es/components/integral-task/index.scss +35 -35
- 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.scss +49 -49
- 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.js +2 -2
- package/es/components/message-list/message-list-item.scss +60 -60
- package/es/components/notice-bar/components/ScrollSwitcher.js +45 -0
- package/es/components/notice-bar/components/ScrollSwitcher.scss +17 -0
- package/es/components/notice-bar/index.scss +42 -59
- package/es/components/notice-bar/notice-bar-item.js +2 -5
- package/es/components/notice-bar/notice-bar-item.scss +26 -26
- package/es/components/notice-bar/notice-bar.js +51 -15
- package/es/components/position/index.scss +27 -27
- package/es/components/position/position-list.js +3 -2
- package/es/components/radio-group/index.js +2 -2
- package/es/components/radio-group/index.scss +40 -40
- package/es/components/rich-text/index.js +2 -2
- package/es/components/rich-text/index.scss +19 -19
- package/es/components/search-bar/index.scss +13 -14
- package/es/components/swiper/index.scss +12 -33
- package/es/components/swiper/swiper.js +16 -59
- package/es/components/tab/index.js +2 -2
- package/es/components/tab/index.scss +39 -39
- package/es/components/tab-container/index.scss +47 -47
- package/es/components/tag/index.js +2 -2
- package/es/components/tag/index.scss +24 -24
- 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.js +2 -2
- package/es/components/teletext-list/teletext-list-item.scss +55 -57
- package/es/components/teletext-list/teletext-list.js +2 -2
- package/es/components/title/index.js +2 -2
- package/es/components/title/title-1.scss +25 -25
- package/es/components/title/title-2.scss +22 -22
- package/es/index.js +0 -4
- package/es/index.scss +5 -5
- package/es/utils/children-node-handle.js +7 -7
- package/es/utils/time-util.js +3 -3
- package/es/variables.scss +3 -3
- package/lib/components/bottom-navigation/index.scss +24 -24
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/index.scss +16 -16
- package/lib/components/carousel/carousel.scss +32 -32
- package/lib/components/colorful-button/index.scss +5 -5
- package/lib/components/colorful-input/index.scss +5 -5
- package/lib/components/goods-card-list/goods-card-list-common.scss +118 -118
- package/lib/components/goods-card-list/goods-card-list.scss +112 -112
- package/lib/components/grid-nav/index.scss +41 -41
- package/lib/components/integral-task/index.js +2 -2
- package/lib/components/integral-task/index.scss +35 -35
- 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.scss +49 -49
- 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.js +2 -2
- package/lib/components/message-list/message-list-item.scss +60 -60
- package/lib/components/notice-bar/components/ScrollSwitcher.js +52 -0
- package/lib/components/notice-bar/components/ScrollSwitcher.scss +17 -0
- package/lib/components/notice-bar/index.scss +42 -59
- package/lib/components/notice-bar/notice-bar-item.js +2 -5
- package/lib/components/notice-bar/notice-bar-item.scss +26 -26
- package/lib/components/notice-bar/notice-bar.js +53 -15
- package/lib/components/position/index.scss +27 -27
- package/lib/components/position/position-list.js +3 -2
- package/lib/components/radio-group/index.scss +40 -40
- package/lib/components/rich-text/index.scss +19 -19
- package/lib/components/search-bar/index.scss +13 -14
- package/lib/components/swiper/index.scss +12 -33
- package/lib/components/swiper/swiper.js +19 -60
- package/lib/components/tab/index.js +2 -2
- package/lib/components/tab/index.scss +39 -39
- package/lib/components/tab-container/index.scss +47 -47
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/index.scss +24 -24
- package/lib/components/teletext-list/index.scss +19 -19
- package/lib/components/teletext-list/teletext-list-item.js +2 -2
- package/lib/components/teletext-list/teletext-list-item.scss +55 -57
- package/lib/components/teletext-list/teletext-list.js +2 -2
- package/lib/components/title/title-1.scss +25 -25
- package/lib/components/title/title-2.scss +22 -22
- package/lib/index.js +1 -5
- package/lib/index.scss +5 -5
- package/lib/utils/children-node-handle.js +7 -7
- package/lib/utils/time-util.js +3 -3
- package/lib/variables.scss +3 -3
- package/lowcode/button2/meta.ts +76 -76
- package/lowcode/custom-radio-group/meta.ts +312 -312
- package/lowcode/custom-radio-group-item/meta.ts +230 -230
- package/lowcode/d-c-form/meta.ts +62 -0
- package/lowcode/d-c-slider/meta.design.ts +174 -174
- package/lowcode/d-c-slider/meta.ts +343 -343
- package/lowcode/d-c-slider/snippets.ts +68 -68
- package/lowcode/goods-card-list/meta.ts +270 -270
- package/lowcode/goods-card-list-common/meta.ts +270 -270
- package/lowcode/grid-nav/meta.ts +227 -227
- package/lowcode/integral-task/meta.ts +212 -212
- package/lowcode/menu-list/meta.ts +154 -154
- package/lowcode/message-list/meta.ts +209 -209
- package/lowcode/navigation/meta.ts +177 -177
- package/lowcode/notice-bar/meta.ts +230 -230
- package/lowcode/position/meta.ts +162 -162
- package/lowcode/rich-text/meta.ts +72 -72
- package/lowcode/search-bar/meta.ts +57 -57
- package/lowcode/stream-list/meta.ts +209 -156
- package/lowcode/swiper/meta.ts +236 -236
- package/lowcode/tab-container/meta.ts +71 -71
- package/lowcode/tab-container/props.ts +194 -194
- package/lowcode/tab-container-item/meta.ts +195 -195
- package/lowcode/tab-message/meta.ts +105 -105
- package/lowcode/tag-c/meta.ts +76 -76
- package/lowcode/teletext-list/meta.ts +332 -332
- package/lowcode/title1/meta.ts +60 -60
- package/lowcode/title2/meta.ts +94 -94
- 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-form/meta.d.ts +22 -0
- package/lowcode_es/d-c-form/meta.js +64 -0
- package/lowcode_es/d-c-slider/meta.d.ts +150 -150
- package/lowcode_es/d-c-slider/meta.design.d.ts +101 -101
- 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 +27 -26
- 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/stream-list/meta.d.ts +22 -22
- package/lowcode_es/stream-list/meta.js +54 -3
- 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/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-form/meta.d.ts +22 -0
- package/lowcode_lib/d-c-form/meta.js +69 -0
- package/lowcode_lib/d-c-slider/meta.d.ts +150 -150
- package/lowcode_lib/d-c-slider/meta.design.d.ts +101 -101
- 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 +27 -26
- 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/stream-list/meta.d.ts +22 -22
- package/lowcode_lib/stream-list/meta.js +54 -3
- 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/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/bottom-navigation/bottom-navigation.d.ts +0 -15
- package/es/components/bottom-navigation/index.d.ts +0 -3
- package/es/components/button/button.d.ts +0 -14
- package/es/components/button/index.d.ts +0 -6
- package/es/components/carousel/carousel.d.ts +0 -14
- package/es/components/colorful-button/colorful-button.d.ts +0 -12
- package/es/components/colorful-button/index.d.ts +0 -3
- package/es/components/colorful-input/colorful-input.d.ts +0 -8
- package/es/components/colorful-input/index.d.ts +0 -3
- package/es/components/goods-card-list/goods-card-list-common.d.ts +0 -5
- package/es/components/goods-card-list/goods-card-list.d.ts +0 -5
- package/es/components/goods-card-list/index.d.ts +0 -4
- package/es/components/goods-card-list/types.d.ts +0 -45
- package/es/components/grid-nav/grid-nav.d.ts +0 -13
- package/es/components/grid-nav/index.d.ts +0 -3
- package/es/components/integral-task/index.d.ts +0 -6
- package/es/components/integral-task/integral-task.d.ts +0 -40
- package/es/components/menu-list/index.d.ts +0 -6
- package/es/components/menu-list/menu-list-item.d.ts +0 -5
- package/es/components/menu-list/menu-list.d.ts +0 -5
- package/es/components/menu-list/types.d.ts +0 -23
- package/es/components/message-list/index.d.ts +0 -6
- package/es/components/message-list/message-list-item.d.ts +0 -33
- package/es/components/message-list/message-list.d.ts +0 -28
- package/es/components/notice-bar/index.d.ts +0 -3
- package/es/components/notice-bar/notice-bar-item.d.ts +0 -18
- package/es/components/notice-bar/notice-bar.d.ts +0 -37
- package/es/components/position/entity.d.ts +0 -5
- package/es/components/position/index.d.ts +0 -3
- package/es/components/position/position-left.d.ts +0 -9
- package/es/components/position/position-list.d.ts +0 -11
- package/es/components/position/position.d.ts +0 -8
- package/es/components/radio-group/index.d.ts +0 -8
- package/es/components/radio-group/radio-group-item.d.ts +0 -48
- package/es/components/radio-group/radio-group.d.ts +0 -52
- package/es/components/rich-text/index.d.ts +0 -6
- package/es/components/rich-text/rich-text.d.ts +0 -14
- package/es/components/search-bar/index.d.ts +0 -3
- package/es/components/search-bar/search-bar.d.ts +0 -7
- package/es/components/stream-list/index.d.ts +0 -6
- package/es/components/stream-list/index.js +0 -6
- package/es/components/stream-list/index.scss +0 -26
- package/es/components/stream-list/stream-list.d.ts +0 -46
- package/es/components/stream-list/stream-list.js +0 -167
- package/es/components/swiper/index.d.ts +0 -3
- package/es/components/swiper/swiper.d.ts +0 -26
- package/es/components/tab/index.d.ts +0 -6
- package/es/components/tab/tab.d.ts +0 -27
- package/es/components/tab-container/index.d.ts +0 -3
- package/es/components/tab-container/tab-container.d.ts +0 -10
- package/es/components/tab-container-item/index.d.ts +0 -3
- package/es/components/tab-container-item/tab-container-item.d.ts +0 -11
- package/es/components/tag/index.d.ts +0 -6
- package/es/components/tag/tag.d.ts +0 -14
- package/es/components/teletext-list/index.d.ts +0 -6
- package/es/components/teletext-list/teletext-list-item.d.ts +0 -33
- package/es/components/teletext-list/teletext-list.d.ts +0 -52
- package/es/components/title/index.d.ts +0 -8
- package/es/components/title/title-1.d.ts +0 -10
- package/es/components/title/title-2.d.ts +0 -18
- package/es/index.d.ts +0 -44
- package/es/utils/children-node-handle.d.ts +0 -9
- package/es/utils/component-wrapper.d.ts +0 -9
- package/es/utils/debounce.d.ts +0 -1
- package/es/utils/time-util.d.ts +0 -5
- package/es/variables.d.ts +0 -2
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +0 -15
- package/lib/components/bottom-navigation/index.d.ts +0 -3
- package/lib/components/button/button.d.ts +0 -14
- package/lib/components/button/index.d.ts +0 -6
- package/lib/components/carousel/carousel.d.ts +0 -14
- package/lib/components/colorful-button/colorful-button.d.ts +0 -12
- package/lib/components/colorful-button/index.d.ts +0 -3
- package/lib/components/colorful-input/colorful-input.d.ts +0 -8
- package/lib/components/colorful-input/index.d.ts +0 -3
- package/lib/components/goods-card-list/goods-card-list-common.d.ts +0 -5
- package/lib/components/goods-card-list/goods-card-list.d.ts +0 -5
- package/lib/components/goods-card-list/index.d.ts +0 -4
- package/lib/components/goods-card-list/types.d.ts +0 -45
- package/lib/components/grid-nav/grid-nav.d.ts +0 -13
- package/lib/components/grid-nav/index.d.ts +0 -3
- package/lib/components/integral-task/index.d.ts +0 -6
- package/lib/components/integral-task/integral-task.d.ts +0 -40
- package/lib/components/menu-list/index.d.ts +0 -6
- package/lib/components/menu-list/menu-list-item.d.ts +0 -5
- package/lib/components/menu-list/menu-list.d.ts +0 -5
- package/lib/components/menu-list/types.d.ts +0 -23
- package/lib/components/message-list/index.d.ts +0 -6
- package/lib/components/message-list/message-list-item.d.ts +0 -33
- package/lib/components/message-list/message-list.d.ts +0 -28
- package/lib/components/notice-bar/index.d.ts +0 -3
- package/lib/components/notice-bar/notice-bar-item.d.ts +0 -18
- package/lib/components/notice-bar/notice-bar.d.ts +0 -37
- package/lib/components/position/entity.d.ts +0 -5
- package/lib/components/position/index.d.ts +0 -3
- package/lib/components/position/position-left.d.ts +0 -9
- package/lib/components/position/position-list.d.ts +0 -11
- package/lib/components/position/position.d.ts +0 -8
- package/lib/components/radio-group/index.d.ts +0 -8
- package/lib/components/radio-group/radio-group-item.d.ts +0 -48
- package/lib/components/radio-group/radio-group.d.ts +0 -52
- package/lib/components/rich-text/index.d.ts +0 -6
- package/lib/components/rich-text/rich-text.d.ts +0 -14
- package/lib/components/search-bar/index.d.ts +0 -3
- package/lib/components/search-bar/search-bar.d.ts +0 -7
- package/lib/components/stream-list/index.d.ts +0 -6
- package/lib/components/stream-list/index.js +0 -6
- package/lib/components/stream-list/index.scss +0 -26
- package/lib/components/stream-list/stream-list.d.ts +0 -46
- package/lib/components/stream-list/stream-list.js +0 -174
- package/lib/components/swiper/index.d.ts +0 -3
- package/lib/components/swiper/swiper.d.ts +0 -26
- package/lib/components/tab/index.d.ts +0 -6
- package/lib/components/tab/tab.d.ts +0 -27
- package/lib/components/tab-container/index.d.ts +0 -3
- package/lib/components/tab-container/tab-container.d.ts +0 -10
- package/lib/components/tab-container-item/index.d.ts +0 -3
- package/lib/components/tab-container-item/tab-container-item.d.ts +0 -11
- package/lib/components/tag/index.d.ts +0 -6
- package/lib/components/tag/tag.d.ts +0 -14
- package/lib/components/teletext-list/index.d.ts +0 -6
- package/lib/components/teletext-list/teletext-list-item.d.ts +0 -33
- package/lib/components/teletext-list/teletext-list.d.ts +0 -52
- package/lib/components/title/index.d.ts +0 -8
- package/lib/components/title/title-1.d.ts +0 -10
- package/lib/components/title/title-2.d.ts +0 -18
- package/lib/index.d.ts +0 -44
- package/lib/utils/children-node-handle.d.ts +0 -9
- package/lib/utils/component-wrapper.d.ts +0 -9
- package/lib/utils/debounce.d.ts +0 -1
- package/lib/utils/time-util.d.ts +0 -5
- package/lib/variables.d.ts +0 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@import '../../variables.scss';
|
|
2
|
-
|
|
3
|
-
.menu-list__panel {
|
|
4
|
-
border-radius: 10px;
|
|
5
|
-
background-color: white;
|
|
6
|
-
|
|
7
|
-
.menu-list__panel__item-list {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 2px;
|
|
11
|
-
padding: 1px 22px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.menu-list__panel {
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
background-color: white;
|
|
6
|
+
|
|
7
|
+
.menu-list__panel__item-list {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 2px;
|
|
11
|
+
padding: 1px 22px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
@@ -1,49 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -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
|
+
|
|
@@ -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,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
require("./ScrollSwitcher.scss");
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
// 导入样式
|
|
10
|
+
|
|
11
|
+
var ScrollSwitcher = function ScrollSwitcher(_ref) {
|
|
12
|
+
var children = _ref.children,
|
|
13
|
+
_ref$height = _ref.height,
|
|
14
|
+
height = _ref$height === void 0 ? '20px' : _ref$height,
|
|
15
|
+
_ref$interval = _ref.interval,
|
|
16
|
+
interval = _ref$interval === void 0 ? 3000 : _ref$interval;
|
|
17
|
+
var _useState = (0, _react.useState)(0),
|
|
18
|
+
currentIndex = _useState[0],
|
|
19
|
+
setCurrentIndex = _useState[1];
|
|
20
|
+
var childrenCount = _react["default"].Children.count(children);
|
|
21
|
+
(0, _react.useEffect)(function () {
|
|
22
|
+
var timer = setInterval(function () {
|
|
23
|
+
setCurrentIndex(function (prevIndex) {
|
|
24
|
+
return (prevIndex + 1) % _react["default"].Children.count(children);
|
|
25
|
+
});
|
|
26
|
+
}, interval);
|
|
27
|
+
return function () {
|
|
28
|
+
return clearInterval(timer);
|
|
29
|
+
}; // 清理定时器
|
|
30
|
+
}, [children, interval]);
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
className: "scroll-switcher",
|
|
33
|
+
style: {
|
|
34
|
+
height: height
|
|
35
|
+
}
|
|
36
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: "scroll-switcher-content",
|
|
38
|
+
style: {
|
|
39
|
+
transform: "translateY(-" + currentIndex * 100 + "%)",
|
|
40
|
+
transition: 'transform 0.5s ease'
|
|
41
|
+
}
|
|
42
|
+
}, _react["default"].Children.map(children, function (child, index) {
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
|
+
className: "scroll-item",
|
|
45
|
+
key: index
|
|
46
|
+
}, child);
|
|
47
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
48
|
+
className: "scroll-item",
|
|
49
|
+
key: childrenCount
|
|
50
|
+
}, children)));
|
|
51
|
+
};
|
|
52
|
+
var _default = exports["default"] = ScrollSwitcher;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.scroll-switcher {
|
|
2
|
+
overflow: hidden; /* 隐藏溢出内容 */
|
|
3
|
+
position: relative; /* 使子元素绝对定位 */
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.scroll-switcher-content {
|
|
7
|
+
display: flex; /* 使用 flexbox 使子元素竖直排列 */
|
|
8
|
+
flex-direction: column; /* 子元素垂直排列 */
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.scroll-item {
|
|
12
|
+
height: 100%; /* 使每个子项占满容器的高度 */
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center; /* 垂直居中对齐 */
|
|
15
|
+
justify-content: center; /* 水平居中对齐 */
|
|
16
|
+
}
|
|
17
|
+
|
|
@@ -1,59 +1,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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
}
|
|
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
|
+
.notice-bar__panel-loop {
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
list-style: none;
|
|
28
|
+
text-align: center;
|
|
29
|
+
height: 20px;
|
|
30
|
+
color: #111111;
|
|
31
|
+
padding: 0;
|
|
32
|
+
.notice-bar__panel-loop__item {
|
|
33
|
+
text-align: left;
|
|
34
|
+
height: 20px;
|
|
35
|
+
}
|
|
36
|
+
.toUp {
|
|
37
|
+
margin-top: -25px; //向上移
|
|
38
|
+
transition: all 0.5s;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -18,15 +18,12 @@ 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
|
-
}));
|
|
24
21
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
25
22
|
className: "notice-bar__panel__item"
|
|
26
23
|
}, _otherProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
27
24
|
className: "notice-bar__panel__item-left"
|
|
28
|
-
}, (0, _childrenNodeHandle.convertChildren)(children, isTop ===
|
|
29
|
-
name: isTop ===
|
|
25
|
+
}, (0, _childrenNodeHandle.convertChildren)(children, isTop === 0 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
|
|
26
|
+
name: isTop === 0 ? '置顶' : '最新'
|
|
30
27
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
28
|
className: "notice-bar__panal__item__content"
|
|
32
29
|
}, 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
|
+
}
|
|
@@ -5,10 +5,12 @@ 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 = _interopRequireWildcard(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; }
|
|
12
14
|
var NoticeBar = function NoticeBar(_ref) {
|
|
13
15
|
var dataList = _ref.dataList,
|
|
14
16
|
_ref$onClick = _ref.onClick,
|
|
@@ -17,13 +19,45 @@ var NoticeBar = function NoticeBar(_ref) {
|
|
|
17
19
|
children = _ref.children,
|
|
18
20
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
19
21
|
var _otherProps = otherProps || {};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
22
|
+
// const stickyItems = (dataList || []).filter((item) => item?.isTop === 1)
|
|
23
|
+
// const loopItems = (dataList || []).filter((item) => item?.isTop === 0)
|
|
24
|
+
|
|
25
|
+
var _useState = (0, _react.useState)(true),
|
|
26
|
+
play = _useState[0],
|
|
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;
|
|
25
60
|
});
|
|
26
|
-
var loopItemsData = console.log('loopItemsData');
|
|
27
61
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
28
62
|
className: "notice-bar__panel"
|
|
29
63
|
}, _otherProps), /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -38,15 +72,19 @@ var NoticeBar = function NoticeBar(_ref) {
|
|
|
38
72
|
onClick: onClick,
|
|
39
73
|
children: children
|
|
40
74
|
}, item));
|
|
41
|
-
}) : /*#__PURE__*/_react["default"].createElement("div", null), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
-
className: "notice-
|
|
43
|
-
},
|
|
44
|
-
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"],
|
|
75
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", null), loopItems.length > 0 ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
+
className: "notice-bar__panel-loop"
|
|
77
|
+
}, loopItems.map(function (item, index) {
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], {
|
|
45
79
|
key: index,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
80
|
+
className: "notice-bar__panel-loop__item " + (isScroll(index) && play ? 'toUp' : ''),
|
|
81
|
+
content: item.content,
|
|
82
|
+
releaseTime: item.releaseTime,
|
|
83
|
+
isTop: item.isTop,
|
|
84
|
+
tag: item.tag,
|
|
85
|
+
onClick: onClick
|
|
86
|
+
});
|
|
87
|
+
})) : /*#__PURE__*/_react["default"].createElement("div", null, "\u6682\u65E0\u6570\u636E")));
|
|
50
88
|
};
|
|
51
89
|
NoticeBar.displayName = 'NoticeBar';
|
|
52
90
|
var _default = exports["default"] = NoticeBar;
|