@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,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,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;
|
|
@@ -2,41 +2,83 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
5
6
|
height: 70px;
|
|
6
7
|
box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.07);
|
|
7
8
|
margin: 0;
|
|
8
|
-
padding:
|
|
9
|
+
padding: 10px;
|
|
9
10
|
border-radius: 12px;
|
|
10
11
|
box-sizing: border-box;
|
|
11
12
|
.notice-bar__panel__item-img {
|
|
12
13
|
width: 46px;
|
|
13
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;
|
|
14
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
|
+
}
|
|
15
40
|
}
|
|
16
41
|
.notice-bar__panel__item-list {
|
|
17
|
-
width: calc(100% - 53px);
|
|
42
|
+
width: calc(100% - 53px - 60px);
|
|
18
43
|
display: flex;
|
|
19
44
|
flex-direction: column;
|
|
20
45
|
align-items: start;
|
|
21
46
|
justify-content: start;
|
|
22
47
|
border-left: 1px solid #f1f1f1;
|
|
23
48
|
padding-left: 10px;
|
|
24
|
-
|
|
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; // 绝对定位
|
|
25
61
|
width: 100%;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
list-style: none;
|
|
28
|
-
text-align: center;
|
|
29
62
|
height: 20px;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
63
|
+
animation: scrollUp 4s linear infinite; // 动画持续时间和类型
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes scrollUp {
|
|
67
|
+
0% {
|
|
68
|
+
transform: translateY(100%); // 从底部开始
|
|
35
69
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
transition: all 0.5s;
|
|
70
|
+
100% {
|
|
71
|
+
transform: translateY(-200%); // 滚动到顶部
|
|
39
72
|
}
|
|
40
73
|
}
|
|
74
|
+
|
|
75
|
+
|
|
41
76
|
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
//动画
|
|
81
|
+
.anim {
|
|
82
|
+
transition: all 0.5s;
|
|
83
|
+
margin-top: -24px;
|
|
42
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;
|
|
@@ -18,17 +18,18 @@ 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
|
-
}, content))
|
|
30
|
-
className: "notice-bar__panel__item-releaseTime"
|
|
31
|
-
}, releaseTime));
|
|
32
|
+
}, content)));
|
|
32
33
|
};
|
|
33
34
|
NoticeBarItem.displayName = 'NoticeBarItem';
|
|
34
35
|
var _default = exports["default"] = NoticeBarItem;
|
|
@@ -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;
|
|
@@ -5,58 +5,26 @@ 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
|
-
var
|
|
12
|
-
|
|
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; }
|
|
11
|
+
var _arr = _interopRequireDefault(require("../../assets/icon/teletext-list/arr.png"));
|
|
12
|
+
var _excluded = ["dataList", "onClick", "icon", "children", "handleMoreClick", "moreText"];
|
|
14
13
|
var NoticeBar = function NoticeBar(_ref) {
|
|
15
14
|
var dataList = _ref.dataList,
|
|
16
15
|
_ref$onClick = _ref.onClick,
|
|
17
16
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
18
17
|
icon = _ref.icon,
|
|
19
18
|
children = _ref.children,
|
|
19
|
+
handleMoreClick = _ref.handleMoreClick,
|
|
20
|
+
moreText = _ref.moreText,
|
|
20
21
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
21
22
|
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;
|
|
23
|
+
var stickyItems = (dataList || []).filter(function (item) {
|
|
24
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 1;
|
|
25
|
+
});
|
|
26
|
+
var loopItems = (dataList || []).filter(function (item) {
|
|
27
|
+
return (item === null || item === void 0 ? void 0 : item.isTop) === 0;
|
|
60
28
|
});
|
|
61
29
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
62
30
|
className: "notice-bar__panel"
|
|
@@ -69,22 +37,26 @@ var NoticeBar = function NoticeBar(_ref) {
|
|
|
69
37
|
}, stickyItems ? stickyItems.map(function (item, index) {
|
|
70
38
|
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], (0, _extends2["default"])({
|
|
71
39
|
key: index,
|
|
72
|
-
onClick: onClick
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], {
|
|
40
|
+
onClick: onClick
|
|
41
|
+
}, item), children);
|
|
42
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", null), /*#__PURE__*/_react["default"].createElement("div", {
|
|
43
|
+
className: "notice-bar__panel__item-loop"
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, loopItems.length > 0 ? loopItems.map(function (item, index) {
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], (0, _extends2["default"])({
|
|
79
46
|
key: index,
|
|
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
47
|
onClick: onClick
|
|
86
|
-
});
|
|
87
|
-
})
|
|
48
|
+
}, item), children);
|
|
49
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", null, "No items to display")))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
className: "notice-bar__panel__item-more"
|
|
51
|
+
}, moreText ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
+
className: "notice-bar__panel__item-more-more"
|
|
53
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
|
+
className: "notice-bar__panel__item-more-more-text",
|
|
55
|
+
onClick: handleMoreClick
|
|
56
|
+
}, moreText), /*#__PURE__*/_react["default"].createElement("img", {
|
|
57
|
+
src: _arr["default"],
|
|
58
|
+
className: "notice-bar__panel__item-more-more-img"
|
|
59
|
+
})) : ''));
|
|
88
60
|
};
|
|
89
61
|
NoticeBar.displayName = 'NoticeBar';
|
|
90
62
|
var _default = exports["default"] = NoticeBar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
import { Location } from "./entity";
|
|
4
|
+
export interface LocationProps {
|
|
5
|
+
currentLocation: Location;
|
|
6
|
+
clickHandle: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const NavigationLeft: React.FC<LocationProps>;
|
|
9
|
+
export default NavigationLeft;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
import { Location } from "./position";
|
|
4
|
+
interface LocationProps {
|
|
5
|
+
itemArray: Location[];
|
|
6
|
+
open: boolean;
|
|
7
|
+
setIsOpen: () => void;
|
|
8
|
+
setCurrent: (data: Location) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ContentList: React.FC<LocationProps>;
|
|
11
|
+
export default ContentList;
|
|
@@ -9,7 +9,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
9
9
|
var ContentList = function navigationList(_ref) {
|
|
10
10
|
var open = _ref.open,
|
|
11
11
|
itemArray = _ref.itemArray,
|
|
12
|
-
currentLocation = _ref.currentLocation,
|
|
13
12
|
setIsOpen = _ref.setIsOpen,
|
|
14
13
|
setCurrent = _ref.setCurrent;
|
|
15
14
|
var changeHandle = function changeHandle(position) {
|
|
@@ -24,13 +23,13 @@ var ContentList = function navigationList(_ref) {
|
|
|
24
23
|
style: {
|
|
25
24
|
display: open ? 'block' : 'none'
|
|
26
25
|
}
|
|
27
|
-
}, itemArray.map(function (item) {
|
|
26
|
+
}, itemArray ? itemArray.map(function (item) {
|
|
28
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
29
28
|
onClick: function onClick() {
|
|
30
29
|
return changeHandle(item);
|
|
31
30
|
},
|
|
32
31
|
className: "location-list-item"
|
|
33
32
|
}, item.address);
|
|
34
|
-
}));
|
|
33
|
+
}) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E"));
|
|
35
34
|
};
|
|
36
35
|
var _default = exports["default"] = ContentList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 单选按钮组
|
|
3
|
+
*/
|
|
4
|
+
import RadioGroup from './radio-group';
|
|
5
|
+
import RadioGroupItem from './radio-group-item';
|
|
6
|
+
export type { RadioGroupProps } from './radio-group';
|
|
7
|
+
export type { RadioGroupItemProps } from './radio-group-item';
|
|
8
|
+
export { RadioGroup as CustomRadioGroup, RadioGroupItem as CustomRadioGroupItem, };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
export type RadioGroupItemType = 'button' | 'text';
|
|
4
|
+
export interface RadioGroupItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* 选项
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* 值
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* 是否选中
|
|
15
|
+
*/
|
|
16
|
+
checked: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 选中颜色
|
|
19
|
+
*/
|
|
20
|
+
selectColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 选中的文字颜色
|
|
23
|
+
*/
|
|
24
|
+
selectTextColor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 未选中颜色
|
|
27
|
+
*/
|
|
28
|
+
unSelectColor?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 未选中的文字颜色
|
|
31
|
+
*/
|
|
32
|
+
unSelectTextColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 类型
|
|
35
|
+
*/
|
|
36
|
+
type?: RadioGroupItemType;
|
|
37
|
+
/**
|
|
38
|
+
* 名称
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* 改变事件
|
|
43
|
+
* @param value
|
|
44
|
+
*/
|
|
45
|
+
onChange: (value: string) => void;
|
|
46
|
+
}
|
|
47
|
+
declare const RadioGroupItem: React.FC<RadioGroupItemProps>;
|
|
48
|
+
export default RadioGroupItem;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
export interface RadioType {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export type RadioGroupItemType = 'button' | 'text';
|
|
8
|
+
export interface RadioGroupProps {
|
|
9
|
+
/**
|
|
10
|
+
* 选项
|
|
11
|
+
*/
|
|
12
|
+
options: Array<RadioType>;
|
|
13
|
+
/**
|
|
14
|
+
* 默认值
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 是否换行
|
|
19
|
+
*/
|
|
20
|
+
isWrap?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 选中颜色
|
|
23
|
+
*/
|
|
24
|
+
selectColor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 选中的文字颜色
|
|
27
|
+
*/
|
|
28
|
+
selectTextColor?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 未选中颜色
|
|
31
|
+
*/
|
|
32
|
+
unSelectColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 未选中的文字颜色
|
|
35
|
+
*/
|
|
36
|
+
unSelectTextColor?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 改变事件
|
|
39
|
+
* @param value
|
|
40
|
+
*/
|
|
41
|
+
onChange?: (value: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* 类型
|
|
44
|
+
*/
|
|
45
|
+
type?: RadioGroupItemType;
|
|
46
|
+
/**
|
|
47
|
+
* 名称
|
|
48
|
+
*/
|
|
49
|
+
name?: string;
|
|
50
|
+
}
|
|
51
|
+
declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
52
|
+
export default RadioGroup;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface DataProps {
|
|
4
|
+
content?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RichTextProps {
|
|
7
|
+
content?: string;
|
|
8
|
+
dataList?: DataProps[];
|
|
9
|
+
}
|
|
10
|
+
declare const RichText: {
|
|
11
|
+
(props: RichTextProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default RichText;
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
.search-bar-
|
|
2
|
-
width: 260px;
|
|
1
|
+
.search-bar-form {
|
|
3
2
|
height: 35px;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
flex: 1;
|
|
4
|
+
box-shadow: 0 1px 6px 0 rgba(66, 36, 8, 0.08);
|
|
5
|
+
border-radius: 17px;
|
|
6
|
+
}
|
|
7
|
+
.search-bar {
|
|
8
|
+
//border: solid 1px #c4c6cf;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: 100%;
|
|
12
|
+
padding-right: 16px;
|
|
13
|
+
&-input {
|
|
14
|
+
outline: none;
|
|
15
|
+
border: none;
|
|
16
|
+
//width: calc(100% - 15px - 34px);
|
|
17
|
+
height: 100%;
|
|
18
|
+
flex: 1;
|
|
19
|
+
}
|
|
20
|
+
&-icon {
|
|
21
|
+
margin-left: 15px;
|
|
22
|
+
margin-right: 5px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
&-img {
|
|
26
|
+
width: 15px;
|
|
27
|
+
height: 15px;
|
|
12
28
|
}
|
|
29
|
+
}
|
|
30
|
+
&-delete-img {
|
|
31
|
+
width: 15px;
|
|
32
|
+
height: 15px;
|
|
33
|
+
}
|
|
34
|
+
&-enter {
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
color: #f77c32;
|
|
37
|
+
margin-left: 6px;
|
|
38
|
+
}
|
|
13
39
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SearchBarProps {
|
|
3
|
+
onSearch?: () => void;
|
|
4
|
+
onConfirm?: (value: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
searchText?: boolean;
|
|
7
|
+
autofocus?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const SearchBar: React.FC<SearchBarProps>;
|
|
10
|
+
export default SearchBar;
|