@dckj-npm/dc-material 0.1.1 → 0.1.3
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/docs/colorful-button.html +48 -0
- package/build/docs/colorful-input.html +48 -0
- package/build/docs/index.html +48 -0
- package/build/docs/umi.6846fe8b.js +1 -0
- package/build/docs/umi.7f7df875.css +8 -0
- package/build/docs/~demos/colorful-button-demo.html +47 -0
- package/build/docs/~demos/colorful-input-demo.html +47 -0
- package/build/index.js +19 -12
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- 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 +8 -8
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +5 -5
- package/dist/BizComps.js.map +1 -1
- package/es/assets/icon/navigation/index-selected.png +0 -0
- package/es/assets/icon/navigation/index.png +0 -0
- package/es/assets/icon/navigation/message-selected.png +0 -0
- package/es/assets/icon/navigation/message.png +0 -0
- package/es/assets/icon/navigation/mine-selected.png +0 -0
- package/es/assets/icon/navigation/mine.png +0 -0
- package/es/components/bottom-navigation/bottom-navigation.d.ts +13 -13
- package/es/components/bottom-navigation/bottom-navigation.js +5 -3
- package/es/components/bottom-navigation/index.d.ts +3 -3
- package/es/components/colorful-button/colorful-button.d.ts +12 -12
- package/es/components/colorful-button/index.d.ts +3 -3
- package/es/components/colorful-input/colorful-input.d.ts +8 -8
- package/es/components/colorful-input/index.d.ts +3 -3
- package/es/components/dc-slider/index.d.ts +3 -3
- package/es/components/dc-slider/slider.d.ts +32 -32
- package/es/components/dc-slider/slider.js +1 -1
- package/es/components/position/index.d.ts +3 -0
- package/es/components/position/index.js +2 -0
- package/es/components/position/index.scss +16 -0
- package/es/components/position/position.d.ts +13 -0
- package/es/components/position/position.js +39 -0
- package/es/components/teletext-list/index.d.ts +6 -6
- package/es/components/teletext-list/index.js +2 -2
- package/es/components/teletext-list/index.scss +16 -114
- package/es/components/teletext-list/teletext-list-item.d.ts +38 -0
- package/es/components/teletext-list/teletext-list-item.js +47 -0
- package/es/components/teletext-list/teletext-list-item.scss +74 -0
- package/es/components/teletext-list/teletext-list.d.ts +48 -48
- package/es/components/teletext-list/teletext-list.js +10 -33
- package/es/components/title/index.d.ts +8 -8
- package/es/components/title/index.js +2 -2
- package/es/components/title/title-1.d.ts +10 -10
- package/es/components/title/title-1.scss +26 -26
- package/es/components/title/title-2.d.ts +18 -18
- package/es/components/title/title-2.js +1 -1
- package/es/components/title/title-2.scss +22 -22
- package/es/index.d.ts +12 -12
- package/es/index.scss +3 -3
- package/es/variables.d.ts +2 -2
- package/lib/assets/icon/navigation/index-selected.png +0 -0
- package/lib/assets/icon/navigation/index.png +0 -0
- package/lib/assets/icon/navigation/message-selected.png +0 -0
- package/lib/assets/icon/navigation/message.png +0 -0
- package/lib/assets/icon/navigation/mine-selected.png +0 -0
- package/lib/assets/icon/navigation/mine.png +0 -0
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +13 -13
- package/lib/components/bottom-navigation/bottom-navigation.js +5 -3
- package/lib/components/bottom-navigation/index.d.ts +3 -3
- package/lib/components/colorful-button/colorful-button.d.ts +12 -12
- package/lib/components/colorful-button/index.d.ts +3 -3
- package/lib/components/colorful-input/colorful-input.d.ts +8 -8
- package/lib/components/colorful-input/index.d.ts +3 -3
- package/lib/components/dc-slider/index.d.ts +3 -3
- package/lib/components/dc-slider/slider.d.ts +32 -32
- package/lib/components/dc-slider/slider.js +1 -1
- package/lib/components/position/index.d.ts +3 -0
- package/lib/components/position/index.js +7 -0
- package/lib/components/position/index.scss +16 -0
- package/lib/components/position/position.d.ts +13 -0
- package/lib/components/position/position.js +46 -0
- package/lib/components/teletext-list/index.d.ts +6 -6
- package/lib/components/teletext-list/index.js +2 -2
- package/lib/components/teletext-list/index.scss +16 -114
- package/lib/components/teletext-list/teletext-list-item.d.ts +38 -0
- package/lib/components/teletext-list/teletext-list-item.js +51 -0
- package/lib/components/teletext-list/teletext-list-item.scss +74 -0
- package/lib/components/teletext-list/teletext-list.d.ts +48 -48
- package/lib/components/teletext-list/teletext-list.js +10 -33
- package/lib/components/title/index.d.ts +8 -8
- package/lib/components/title/title-1.d.ts +10 -10
- package/lib/components/title/title-1.scss +26 -26
- package/lib/components/title/title-2.d.ts +18 -18
- package/lib/components/title/title-2.js +1 -1
- package/lib/components/title/title-2.scss +22 -22
- package/lib/index.d.ts +12 -12
- package/lib/index.scss +3 -3
- package/lib/variables.d.ts +2 -2
- package/lowcode/d-c-slider/snippets.ts +42 -42
- package/lowcode/navigation/meta.ts +44 -10
- package/lowcode/teletext-list/meta.ts +292 -292
- package/lowcode/title1/meta.ts +58 -58
- package/lowcode/title2/meta.ts +92 -92
- package/lowcode_es/d-c-slider/meta.d.ts +140 -140
- package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_es/meta.js +6 -6
- package/lowcode_es/navigation/meta.d.ts +22 -22
- package/lowcode_es/navigation/meta.js +38 -8
- 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/title2/meta.js +2 -2
- package/lowcode_es/view.js +3 -3
- package/lowcode_lib/d-c-slider/meta.d.ts +140 -140
- package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_lib/meta.js +6 -6
- package/lowcode_lib/navigation/meta.d.ts +22 -22
- package/lowcode_lib/navigation/meta.js +38 -8
- 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/title2/meta.js +2 -2
- package/lowcode_lib/view.js +2 -2
- package/package.json +4 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface Navigation {
|
|
4
|
+
text: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
selectedIcon: string;
|
|
7
|
+
}
|
|
8
|
+
export interface NavigationProps {
|
|
9
|
+
itemArray: Navigation[];
|
|
10
|
+
selectedColor: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Navigation: React.FC<NavigationProps>;
|
|
13
|
+
export default Navigation;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _lowcodeMaterials = require("@alilc/lowcode-materials");
|
|
10
|
+
require("./index.scss");
|
|
11
|
+
var _excluded = ["itemArray", "selectedColor"];
|
|
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
|
+
var Navigation = function bottomNavigation(_ref) {
|
|
15
|
+
var itemArray = _ref.itemArray,
|
|
16
|
+
selectedColor = _ref.selectedColor,
|
|
17
|
+
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
18
|
+
var _React$useState = React.useState(0),
|
|
19
|
+
activeNum = _React$useState[0],
|
|
20
|
+
setActiveNum = _React$useState[1];
|
|
21
|
+
var clickHandle = function clickHandle(index) {
|
|
22
|
+
// 更新激活tab
|
|
23
|
+
setActiveNum(index);
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
26
|
+
className: "navigation"
|
|
27
|
+
}, otherProps), itemArray.map(function (item, index) {
|
|
28
|
+
var _item$selectedIcon;
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "navigation-item",
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
return clickHandle(index);
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
color: activeNum === index ? selectedColor !== null && selectedColor !== void 0 ? selectedColor : '#4598FF' : ''
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/React.createElement(_lowcodeMaterials.Image, {
|
|
38
|
+
src: activeNum === index ? (_item$selectedIcon = item.selectedIcon) !== null && _item$selectedIcon !== void 0 ? _item$selectedIcon : item.icon : item.icon,
|
|
39
|
+
style: {
|
|
40
|
+
width: '24.5px',
|
|
41
|
+
height: '24.5px'
|
|
42
|
+
}
|
|
43
|
+
}), /*#__PURE__*/React.createElement("span", null, item.text));
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
var _default = exports["default"] = Navigation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图文列表
|
|
3
|
-
*/
|
|
4
|
-
import TeletextList from './teletext-list';
|
|
5
|
-
export type { TeletextListProps } from './teletext-list';
|
|
6
|
-
export default TeletextList;
|
|
1
|
+
/**
|
|
2
|
+
* 图文列表
|
|
3
|
+
*/
|
|
4
|
+
import TeletextList from './teletext-list';
|
|
5
|
+
export type { TeletextListProps } from './teletext-list';
|
|
6
|
+
export default TeletextList;
|
|
@@ -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 _teletextList = _interopRequireDefault(require("./teletext-list"));
|
|
7
|
-
/**
|
|
8
|
-
* 图文列表
|
|
7
|
+
/**
|
|
8
|
+
* 图文列表
|
|
9
9
|
*/
|
|
10
10
|
var _default = exports["default"] = _teletextList["default"];
|
|
@@ -1,114 +1,16 @@
|
|
|
1
|
-
@import '../../variables.scss';
|
|
2
|
-
|
|
3
|
-
.teletext-list__panel {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 10px;
|
|
7
|
-
|
|
8
|
-
.teletext-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
&::after {
|
|
18
|
-
content: '';
|
|
19
|
-
position: absolute;
|
|
20
|
-
bottom: -2px;
|
|
21
|
-
left: 0;
|
|
22
|
-
width: 100%;
|
|
23
|
-
height: 5px;
|
|
24
|
-
background: linear-gradient(-30deg, #95CDFE, #61A0FE);
|
|
25
|
-
border-radius: 5px;
|
|
26
|
-
opacity: 0.6;
|
|
27
|
-
z-index: 0;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.teletext-list__panel__item-list {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 10px;
|
|
37
|
-
|
|
38
|
-
.teletext-list__panel__item {
|
|
39
|
-
display: flex;
|
|
40
|
-
gap: 5px;
|
|
41
|
-
padding-bottom: 10px;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
|
|
44
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
45
|
-
|
|
46
|
-
.teletext-list__panel__item_image {
|
|
47
|
-
width: 90px;
|
|
48
|
-
height: 71px;
|
|
49
|
-
border-radius: 5px;
|
|
50
|
-
flex: 0 0 auto;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
|
|
53
|
-
& > img {
|
|
54
|
-
width: 100%;
|
|
55
|
-
height: 100%;
|
|
56
|
-
object-fit: cover;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.teletext-list__panel__item__text {
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: 3px;
|
|
65
|
-
|
|
66
|
-
.teletext-list__panel__item__text__title {
|
|
67
|
-
font-size: 15px;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
color: #000000;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.teletext-list__panel__item__text__description {
|
|
73
|
-
-webkit-line-clamp: 1;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
color: #686868;
|
|
76
|
-
-webkit-box-orient: vertical;
|
|
77
|
-
display: -webkit-box;
|
|
78
|
-
font-size: 12px;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.teletext-list__panel__item__text__tags {
|
|
83
|
-
display: flex;
|
|
84
|
-
gap: 6px;
|
|
85
|
-
|
|
86
|
-
& > span {
|
|
87
|
-
padding: 2px 6px;
|
|
88
|
-
border-radius: 4px;
|
|
89
|
-
background-color: black;
|
|
90
|
-
color: white;
|
|
91
|
-
font-size: 11px;
|
|
92
|
-
|
|
93
|
-
&.orange {
|
|
94
|
-
color: #F1770E;
|
|
95
|
-
background-color: rgba(241, 119, 14, 0.1);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&.blue {
|
|
99
|
-
color: #2972DD;
|
|
100
|
-
background-color: rgba(41, 114, 221, 0.1);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.teletext-list__panel {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
|
|
8
|
+
.teletext-list__panel__item-list {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 10px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './teletext-list-item.scss';
|
|
3
|
+
/**
|
|
4
|
+
* 数据
|
|
5
|
+
*/
|
|
6
|
+
interface TeletextListItemProps {
|
|
7
|
+
/**
|
|
8
|
+
* 标题
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 图片地址
|
|
13
|
+
*/
|
|
14
|
+
image?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 图片位置
|
|
17
|
+
*/
|
|
18
|
+
imagePlacement?: "left" | "right" | "none";
|
|
19
|
+
/**
|
|
20
|
+
* 说明
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 标签列表
|
|
25
|
+
*/
|
|
26
|
+
tags?: {
|
|
27
|
+
/**
|
|
28
|
+
* 标签名称
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* 标签颜色
|
|
33
|
+
*/
|
|
34
|
+
color: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
declare const TeletextListItem: React.FC<TeletextListItemProps>;
|
|
38
|
+
export default TeletextListItem;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
require("./teletext-list-item.scss");
|
|
10
|
+
var _excluded = ["title", "image", "imagePlacement", "description", "tags"];
|
|
11
|
+
/**
|
|
12
|
+
* 数据
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
var TeletextListItem = function TeletextListItem(_ref) {
|
|
16
|
+
var title = _ref.title,
|
|
17
|
+
image = _ref.image,
|
|
18
|
+
imagePlacement = _ref.imagePlacement,
|
|
19
|
+
description = _ref.description,
|
|
20
|
+
tags = _ref.tags,
|
|
21
|
+
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
22
|
+
var _otherProps = otherProps || {};
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
24
|
+
className: "teletext-list__panel__item"
|
|
25
|
+
}, _otherProps), image && imagePlacement === 'left' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
+
className: "teletext-list__panel__item_image"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
28
|
+
alt: "img",
|
|
29
|
+
src: image
|
|
30
|
+
})) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
|
+
className: "teletext-list__panel__item__text"
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
|
+
className: "teletext-list__panel__item__text__title"
|
|
34
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
+
className: "teletext-list__panel__item__text__description"
|
|
36
|
+
}, description), tags ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: "teletext-list__panel__item__text__tags"
|
|
38
|
+
}, tags === null || tags === void 0 ? void 0 : tags.map(function (tag, tagIndex) {
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
40
|
+
key: tagIndex,
|
|
41
|
+
className: tag.color
|
|
42
|
+
}, tag.name);
|
|
43
|
+
})) : null), image && imagePlacement === 'right' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
|
+
className: "teletext-list__panel__item_image"
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
46
|
+
alt: "img",
|
|
47
|
+
src: image
|
|
48
|
+
})) : null);
|
|
49
|
+
};
|
|
50
|
+
TeletextListItem.displayName = 'TeletextListItem';
|
|
51
|
+
var _default = exports["default"] = TeletextListItem;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.teletext-list__panel__item {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 5px;
|
|
6
|
+
padding-bottom: 10px;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
|
|
9
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
10
|
+
|
|
11
|
+
.teletext-list__panel__item_image {
|
|
12
|
+
width: 90px;
|
|
13
|
+
height: 71px;
|
|
14
|
+
border-radius: 5px;
|
|
15
|
+
flex: 0 0 auto;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
|
|
18
|
+
& > img {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
object-fit: cover;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.teletext-list__panel__item__text {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: 3px;
|
|
30
|
+
|
|
31
|
+
.teletext-list__panel__item__text__title {
|
|
32
|
+
font-size: 15px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
color: #000000;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.teletext-list__panel__item__text__description {
|
|
38
|
+
-webkit-line-clamp: 1;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
color: #686868;
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
display: -webkit-box;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.teletext-list__panel__item__text__tags {
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: 6px;
|
|
50
|
+
|
|
51
|
+
& > span {
|
|
52
|
+
padding: 2px 6px;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
background-color: black;
|
|
55
|
+
color: white;
|
|
56
|
+
font-size: 11px;
|
|
57
|
+
|
|
58
|
+
&.orange {
|
|
59
|
+
color: #F1770E;
|
|
60
|
+
background-color: rgba(241, 119, 14, 0.1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.blue {
|
|
64
|
+
color: #2972DD;
|
|
65
|
+
background-color: rgba(41, 114, 221, 0.1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
/**
|
|
4
|
-
* 数据
|
|
5
|
-
*/
|
|
6
|
-
interface DataProps {
|
|
7
|
-
/**
|
|
8
|
-
* 标题
|
|
9
|
-
*/
|
|
10
|
-
title?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 图片地址
|
|
13
|
-
*/
|
|
14
|
-
image?: string;
|
|
15
|
-
/**
|
|
16
|
-
* 图片位置
|
|
17
|
-
*/
|
|
18
|
-
imagePlacement?: "left" | "right" | "none";
|
|
19
|
-
/**
|
|
20
|
-
* 说明
|
|
21
|
-
*/
|
|
22
|
-
description?: string;
|
|
23
|
-
/**
|
|
24
|
-
* 标签列表
|
|
25
|
-
*/
|
|
26
|
-
tags?: {
|
|
27
|
-
/**
|
|
28
|
-
* 标签名称
|
|
29
|
-
*/
|
|
30
|
-
name: string;
|
|
31
|
-
/**
|
|
32
|
-
* 标签颜色
|
|
33
|
-
*/
|
|
34
|
-
color: string;
|
|
35
|
-
}[];
|
|
36
|
-
}
|
|
37
|
-
export interface TeletextListProps {
|
|
38
|
-
/**
|
|
39
|
-
* 标题
|
|
40
|
-
*/
|
|
41
|
-
title?: string;
|
|
42
|
-
/**
|
|
43
|
-
* 数据
|
|
44
|
-
*/
|
|
45
|
-
dataList?: DataProps[];
|
|
46
|
-
}
|
|
47
|
-
declare const TeletextList: React.FC<TeletextListProps>;
|
|
48
|
-
export default TeletextList;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
/**
|
|
4
|
+
* 数据
|
|
5
|
+
*/
|
|
6
|
+
interface DataProps {
|
|
7
|
+
/**
|
|
8
|
+
* 标题
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 图片地址
|
|
13
|
+
*/
|
|
14
|
+
image?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 图片位置
|
|
17
|
+
*/
|
|
18
|
+
imagePlacement?: "left" | "right" | "none";
|
|
19
|
+
/**
|
|
20
|
+
* 说明
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 标签列表
|
|
25
|
+
*/
|
|
26
|
+
tags?: {
|
|
27
|
+
/**
|
|
28
|
+
* 标签名称
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* 标签颜色
|
|
33
|
+
*/
|
|
34
|
+
color: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
export interface TeletextListProps {
|
|
38
|
+
/**
|
|
39
|
+
* 标题
|
|
40
|
+
*/
|
|
41
|
+
title?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 数据
|
|
44
|
+
*/
|
|
45
|
+
dataList?: DataProps[];
|
|
46
|
+
}
|
|
47
|
+
declare const TeletextList: React.FC<TeletextListProps>;
|
|
48
|
+
export default TeletextList;
|
|
@@ -7,9 +7,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.scss");
|
|
10
|
+
var _title = require("../title");
|
|
11
|
+
var _teletextListItem = _interopRequireDefault(require("./teletext-list-item"));
|
|
10
12
|
var _excluded = ["title", "dataList"];
|
|
11
|
-
/**
|
|
12
|
-
* 数据
|
|
13
|
+
/**
|
|
14
|
+
* 数据
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
var DEFAULT_DATA_1 = {
|
|
@@ -58,39 +60,14 @@ var TeletextList = function TeletextList(_ref) {
|
|
|
58
60
|
var _otherProps = otherProps || {};
|
|
59
61
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
60
62
|
className: "teletext-list__panel"
|
|
61
|
-
}, _otherProps),
|
|
62
|
-
|
|
63
|
-
}
|
|
63
|
+
}, _otherProps), /*#__PURE__*/_react["default"].createElement(_title.Title1, {
|
|
64
|
+
title: title
|
|
65
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
64
66
|
className: "teletext-list__panel__item-list"
|
|
65
67
|
}, dataList.map(function (item, index) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
className: "teletext-list__panel__item"
|
|
70
|
-
}, item.image && item.imagePlacement === 'left' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
-
className: "teletext-list__panel__item_image"
|
|
72
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
73
|
-
alt: "img",
|
|
74
|
-
src: item.image
|
|
75
|
-
})) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
-
className: "teletext-list__panel__item__text"
|
|
77
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
-
className: "teletext-list__panel__item__text__title"
|
|
79
|
-
}, item.title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
-
className: "teletext-list__panel__item__text__description"
|
|
81
|
-
}, item.description), item.tags ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
|
-
className: "teletext-list__panel__item__text__tags"
|
|
83
|
-
}, (_item$tags = item.tags) === null || _item$tags === void 0 ? void 0 : _item$tags.map(function (tag, tagIndex) {
|
|
84
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
-
key: tagIndex,
|
|
86
|
-
className: tag.color
|
|
87
|
-
}, tag.name);
|
|
88
|
-
})) : null), item.image && item.imagePlacement === 'right' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
-
className: "teletext-list__panel__item_image"
|
|
90
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
91
|
-
alt: "img",
|
|
92
|
-
src: item.image
|
|
93
|
-
})) : null);
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_teletextListItem["default"], (0, _extends2["default"])({
|
|
69
|
+
key: index
|
|
70
|
+
}, item));
|
|
94
71
|
})));
|
|
95
72
|
};
|
|
96
73
|
TeletextList.displayName = 'TeletextList';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 标题
|
|
3
|
-
*/
|
|
4
|
-
import Title1 from './title-1';
|
|
5
|
-
import Title2 from './title-2';
|
|
6
|
-
export type { Title1Props } from './title-1';
|
|
7
|
-
export type { Title2Props } from './title-2';
|
|
8
|
-
export { Title1, Title2 };
|
|
1
|
+
/**
|
|
2
|
+
* 标题
|
|
3
|
+
*/
|
|
4
|
+
import Title1 from './title-1';
|
|
5
|
+
import Title2 from './title-2';
|
|
6
|
+
export type { Title1Props } from './title-1';
|
|
7
|
+
export type { Title2Props } from './title-2';
|
|
8
|
+
export { Title1, Title2 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './title-1.scss';
|
|
3
|
-
export interface Title1Props {
|
|
4
|
-
/**
|
|
5
|
-
* 标题
|
|
6
|
-
*/
|
|
7
|
-
title?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Title1: React.FC<Title1Props>;
|
|
10
|
-
export default Title1;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './title-1.scss';
|
|
3
|
+
export interface Title1Props {
|
|
4
|
+
/**
|
|
5
|
+
* 标题
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Title1: React.FC<Title1Props>;
|
|
10
|
+
export default Title1;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
@import '../../variables.scss';
|
|
2
|
-
|
|
3
|
-
.custom-title-1 {
|
|
4
|
-
|
|
5
|
-
& > span {
|
|
6
|
-
position: relative;
|
|
7
|
-
font-size: 17px;
|
|
8
|
-
font-weight: 500;
|
|
9
|
-
color: #000000;
|
|
10
|
-
z-index: 1;
|
|
11
|
-
|
|
12
|
-
&::after {
|
|
13
|
-
content: '';
|
|
14
|
-
position: absolute;
|
|
15
|
-
bottom: -2px;
|
|
16
|
-
left: 0;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 5px;
|
|
19
|
-
background: linear-gradient(-30deg, #95CDFE, #61A0FE);
|
|
20
|
-
border-radius: 5px;
|
|
21
|
-
opacity: 0.6;
|
|
22
|
-
z-index: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.custom-title-1 {
|
|
4
|
+
|
|
5
|
+
& > span {
|
|
6
|
+
position: relative;
|
|
7
|
+
font-size: 17px;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
color: #000000;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
|
|
12
|
+
&::after {
|
|
13
|
+
content: '';
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: -2px;
|
|
16
|
+
left: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 5px;
|
|
19
|
+
background: linear-gradient(-30deg, #95CDFE, #61A0FE);
|
|
20
|
+
border-radius: 5px;
|
|
21
|
+
opacity: 0.6;
|
|
22
|
+
z-index: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './title-2.scss';
|
|
3
|
-
export interface Title2Props {
|
|
4
|
-
/**
|
|
5
|
-
* 标题
|
|
6
|
-
*/
|
|
7
|
-
title?: string;
|
|
8
|
-
/**
|
|
9
|
-
* 颜色
|
|
10
|
-
*/
|
|
11
|
-
color?: string;
|
|
12
|
-
/**
|
|
13
|
-
* tip颜色
|
|
14
|
-
*/
|
|
15
|
-
tipColor?: string;
|
|
16
|
-
}
|
|
17
|
-
declare const Title2: React.FC<Title2Props>;
|
|
18
|
-
export default Title2;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './title-2.scss';
|
|
3
|
+
export interface Title2Props {
|
|
4
|
+
/**
|
|
5
|
+
* 标题
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 颜色
|
|
10
|
+
*/
|
|
11
|
+
color?: string;
|
|
12
|
+
/**
|
|
13
|
+
* tip颜色
|
|
14
|
+
*/
|
|
15
|
+
tipColor?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Title2: React.FC<Title2Props>;
|
|
18
|
+
export default Title2;
|
|
@@ -21,7 +21,7 @@ var Title2 = function Title2(_ref) {
|
|
|
21
21
|
color: color
|
|
22
22
|
} : {};
|
|
23
23
|
var tipColorStyle = tipColor ? {
|
|
24
|
-
'
|
|
24
|
+
'backgroundColor': tipColor
|
|
25
25
|
} : {};
|
|
26
26
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
27
27
|
className: "custom-title-2"
|