@dckj-npm/dc-material 0.1.9 → 0.1.11
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.css +2 -0
- package/build/index.html +1 -0
- package/build/index.js +60 -0
- package/build/lowcode/assets-daily.json +67 -0
- package/build/lowcode/assets-dev.json +67 -0
- package/build/lowcode/assets-prod.json +67 -0
- package/build/lowcode/designer.html +302 -0
- package/build/lowcode/index.html +304 -0
- package/build/lowcode/index.js +1 -0
- package/build/lowcode/meta.js +1 -0
- package/build/lowcode/preview.css +1 -0
- package/build/lowcode/preview.html +33 -0
- package/build/lowcode/preview.js +308 -0
- package/build/lowcode/render/default/view.css +1 -0
- package/build/lowcode/render/default/view.js +295 -0
- package/build/lowcode/view.css +1 -0
- package/build/lowcode/view.js +295 -0
- package/dist/BizComps.css +1 -0
- package/dist/BizComps.js +7 -0
- package/dist/BizComps.js.map +1 -0
- 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/assets/icon/position/arror.png +0 -0
- package/es/components/bottom-navigation/bottom-navigation.d.ts +13 -0
- package/es/components/bottom-navigation/bottom-navigation.js +39 -0
- package/es/components/bottom-navigation/index.d.ts +3 -0
- package/es/components/bottom-navigation/index.js +2 -0
- package/es/components/bottom-navigation/index.scss +19 -0
- package/es/components/colorful-button/colorful-button.d.ts +12 -0
- package/es/components/colorful-button/colorful-button.js +25 -0
- package/es/components/colorful-button/index.d.ts +3 -0
- package/es/components/colorful-button/index.js +2 -0
- package/es/components/colorful-button/index.scss +5 -0
- package/es/components/colorful-input/colorful-input.d.ts +8 -0
- package/es/components/colorful-input/colorful-input.js +19 -0
- package/es/components/colorful-input/index.d.ts +3 -0
- package/es/components/colorful-input/index.js +2 -0
- package/es/components/colorful-input/index.scss +5 -0
- package/es/components/dc-slider/index.d.ts +3 -0
- package/es/components/dc-slider/index.js +2 -0
- package/es/components/dc-slider/index.scss +8 -0
- package/es/components/dc-slider/slider.d.ts +32 -0
- package/es/components/dc-slider/slider.js +14 -0
- package/es/components/grid-nav/grid-nav.d.ts +13 -0
- package/es/components/grid-nav/grid-nav.js +91 -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 +36 -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/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 +21 -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 +12 -0
- package/es/components/position/position-list.js +30 -0
- package/es/components/position/position.d.ts +8 -0
- package/es/components/position/position.js +47 -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 +3 -0
- package/es/components/search-bar/search-bar.d.ts +7 -0
- package/es/components/search-bar/search-bar.js +21 -0
- package/es/components/tag/index.d.ts +6 -0
- package/es/components/tag/index.js +5 -0
- package/es/components/tag/index.scss +17 -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 +16 -0
- package/es/components/teletext-list/teletext-list-item.d.ts +42 -0
- package/es/components/teletext-list/teletext-list-item.js +35 -0
- package/es/components/teletext-list/teletext-list-item.scss +74 -0
- package/es/components/teletext-list/teletext-list.d.ts +57 -0
- package/es/components/teletext-list/teletext-list.js +75 -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/index.d.ts +22 -0
- package/es/index.js +12 -0
- package/es/index.scss +5 -0
- package/es/style.js +4 -0
- package/es/utils/children-node-handle.d.ts +6 -0
- package/es/utils/children-node-handle.js +23 -0
- package/es/utils/component-wrapper.d.ts +9 -0
- package/es/utils/component-wrapper.js +38 -0
- package/es/variables.d.ts +2 -0
- package/es/variables.js +2 -0
- package/es/variables.scss +3 -0
- 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/assets/icon/position/arror.png +0 -0
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +13 -0
- package/lib/components/bottom-navigation/bottom-navigation.js +46 -0
- package/lib/components/bottom-navigation/index.d.ts +3 -0
- package/lib/components/bottom-navigation/index.js +7 -0
- package/lib/components/bottom-navigation/index.scss +19 -0
- package/lib/components/colorful-button/colorful-button.d.ts +12 -0
- package/lib/components/colorful-button/colorful-button.js +32 -0
- package/lib/components/colorful-button/index.d.ts +3 -0
- package/lib/components/colorful-button/index.js +7 -0
- package/lib/components/colorful-button/index.scss +5 -0
- package/lib/components/colorful-input/colorful-input.d.ts +8 -0
- package/lib/components/colorful-input/colorful-input.js +26 -0
- package/lib/components/colorful-input/index.d.ts +3 -0
- package/lib/components/colorful-input/index.js +7 -0
- package/lib/components/colorful-input/index.scss +5 -0
- package/lib/components/dc-slider/index.d.ts +3 -0
- package/lib/components/dc-slider/index.js +7 -0
- package/lib/components/dc-slider/index.scss +8 -0
- package/lib/components/dc-slider/slider.d.ts +32 -0
- package/lib/components/dc-slider/slider.js +21 -0
- package/lib/components/grid-nav/grid-nav.d.ts +13 -0
- package/lib/components/grid-nav/grid-nav.js +98 -0
- package/lib/components/grid-nav/index.d.ts +3 -0
- package/lib/components/grid-nav/index.js +7 -0
- package/lib/components/grid-nav/index.scss +36 -0
- package/lib/components/menu-list/index.d.ts +6 -0
- package/lib/components/menu-list/index.js +10 -0
- package/lib/components/menu-list/index.scss +16 -0
- package/lib/components/menu-list/menu-list-item.d.ts +5 -0
- package/lib/components/menu-list/menu-list-item.js +37 -0
- package/lib/components/menu-list/menu-list-item.scss +49 -0
- package/lib/components/menu-list/menu-list.d.ts +5 -0
- package/lib/components/menu-list/menu-list.js +30 -0
- package/lib/components/menu-list/types.d.ts +23 -0
- package/lib/components/menu-list/types.js +3 -0
- package/lib/components/position/entity.d.ts +5 -0
- package/lib/components/position/entity.js +3 -0
- package/lib/components/position/index.d.ts +3 -0
- package/lib/components/position/index.js +7 -0
- package/lib/components/position/index.scss +21 -0
- package/lib/components/position/position-left.d.ts +9 -0
- package/lib/components/position/position-left.js +35 -0
- package/lib/components/position/position-list.d.ts +12 -0
- package/lib/components/position/position-list.js +36 -0
- package/lib/components/position/position.d.ts +8 -0
- package/lib/components/position/position.js +54 -0
- package/lib/components/search-bar/index.d.ts +3 -0
- package/lib/components/search-bar/index.js +7 -0
- package/lib/components/search-bar/index.scss +3 -0
- package/lib/components/search-bar/search-bar.d.ts +7 -0
- package/lib/components/search-bar/search-bar.js +28 -0
- package/lib/components/tag/index.d.ts +6 -0
- package/lib/components/tag/index.js +10 -0
- package/lib/components/tag/index.scss +17 -0
- package/lib/components/tag/tag.d.ts +14 -0
- package/lib/components/tag/tag.js +21 -0
- package/lib/components/teletext-list/index.d.ts +6 -0
- package/lib/components/teletext-list/index.js +10 -0
- package/lib/components/teletext-list/index.scss +16 -0
- package/lib/components/teletext-list/teletext-list-item.d.ts +42 -0
- package/lib/components/teletext-list/teletext-list-item.js +39 -0
- package/lib/components/teletext-list/teletext-list-item.scss +74 -0
- package/lib/components/teletext-list/teletext-list.d.ts +57 -0
- package/lib/components/teletext-list/teletext-list.js +79 -0
- package/lib/components/title/index.d.ts +8 -0
- package/lib/components/title/index.js +8 -0
- package/lib/components/title/title-1.d.ts +10 -0
- package/lib/components/title/title-1.js +21 -0
- package/lib/components/title/title-1.scss +25 -0
- package/lib/components/title/title-2.d.ts +18 -0
- package/lib/components/title/title-2.js +36 -0
- package/lib/components/title/title-2.scss +22 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.js +25 -0
- package/lib/index.scss +5 -0
- package/lib/style.js +4 -0
- package/lib/utils/children-node-handle.d.ts +6 -0
- package/lib/utils/children-node-handle.js +28 -0
- package/lib/utils/component-wrapper.d.ts +9 -0
- package/lib/utils/component-wrapper.js +45 -0
- package/lib/variables.d.ts +2 -0
- package/lib/variables.js +5 -0
- package/lib/variables.scss +3 -0
- package/lowcode/d-c-slider/meta.ts +15 -1
- package/lowcode/position/meta.ts +211 -211
- package/lowcode/search-bar/meta.ts +3 -3
- package/lowcode/tag-c/meta.ts +75 -75
- package/lowcode_es/d-c-slider/meta.d.ts +152 -0
- package/lowcode_es/d-c-slider/meta.js +313 -0
- package/lowcode_es/d-c-slider/snippets.d.ts +36 -0
- package/lowcode_es/d-c-slider/snippets.js +36 -0
- package/lowcode_es/grid-nav/meta.d.ts +22 -0
- package/lowcode_es/grid-nav/meta.js +152 -0
- package/lowcode_es/menu-list/meta.d.ts +22 -0
- package/lowcode_es/menu-list/meta.js +128 -0
- package/lowcode_es/meta.js +173 -0
- package/lowcode_es/navigation/meta.d.ts +22 -0
- package/lowcode_es/navigation/meta.js +136 -0
- package/lowcode_es/position/meta.d.ts +22 -0
- package/lowcode_es/position/meta.js +190 -0
- package/lowcode_es/search-bar/meta.d.ts +22 -0
- package/lowcode_es/search-bar/meta.js +46 -0
- package/lowcode_es/tag-c/meta.d.ts +22 -0
- package/lowcode_es/tag-c/meta.js +66 -0
- package/lowcode_es/teletext-list/meta.d.ts +22 -0
- package/lowcode_es/teletext-list/meta.js +294 -0
- package/lowcode_es/title1/meta.d.ts +22 -0
- package/lowcode_es/title1/meta.js +51 -0
- package/lowcode_es/title2/meta.d.ts +22 -0
- package/lowcode_es/title2/meta.js +83 -0
- package/lowcode_es/view.js +18 -0
- package/lowcode_lib/d-c-slider/meta.d.ts +152 -0
- package/lowcode_lib/d-c-slider/meta.js +318 -0
- package/lowcode_lib/d-c-slider/snippets.d.ts +36 -0
- package/lowcode_lib/d-c-slider/snippets.js +40 -0
- package/lowcode_lib/grid-nav/meta.d.ts +22 -0
- package/lowcode_lib/grid-nav/meta.js +157 -0
- package/lowcode_lib/menu-list/meta.d.ts +22 -0
- package/lowcode_lib/menu-list/meta.js +133 -0
- package/lowcode_lib/meta.js +177 -0
- package/lowcode_lib/navigation/meta.d.ts +22 -0
- package/lowcode_lib/navigation/meta.js +141 -0
- package/lowcode_lib/position/meta.d.ts +22 -0
- package/lowcode_lib/position/meta.js +195 -0
- package/lowcode_lib/search-bar/meta.d.ts +22 -0
- package/lowcode_lib/search-bar/meta.js +51 -0
- package/lowcode_lib/tag-c/meta.d.ts +22 -0
- package/lowcode_lib/tag-c/meta.js +71 -0
- package/lowcode_lib/teletext-list/meta.d.ts +22 -0
- package/lowcode_lib/teletext-list/meta.js +299 -0
- package/lowcode_lib/title1/meta.d.ts +22 -0
- package/lowcode_lib/title1/meta.js +56 -0
- package/lowcode_lib/title2/meta.d.ts +22 -0
- package/lowcode_lib/title2/meta.js +88 -0
- package/lowcode_lib/view.js +29 -0
- package/package.json +110 -110
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["currentLocation", "clickHandle"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
import arror from "../../assets/icon/position/arror.png";
|
|
7
|
+
var NavigationLeft = function navigationLeft(_ref) {
|
|
8
|
+
var currentLocation = _ref.currentLocation,
|
|
9
|
+
clickHandle = _ref.clickHandle,
|
|
10
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", _extends({
|
|
12
|
+
className: "location"
|
|
13
|
+
}, otherProps, {
|
|
14
|
+
onClick: function onClick() {
|
|
15
|
+
return clickHandle();
|
|
16
|
+
}
|
|
17
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "location-address"
|
|
19
|
+
}, currentLocation.address), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "location-icon"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
22
|
+
src: arror,
|
|
23
|
+
width: "10",
|
|
24
|
+
height: "5",
|
|
25
|
+
alt: "icon"
|
|
26
|
+
}))));
|
|
27
|
+
};
|
|
28
|
+
export default NavigationLeft;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
import { Location } from "./position";
|
|
4
|
+
interface LocationProps {
|
|
5
|
+
itemArray: Location[];
|
|
6
|
+
currentLocation: Location;
|
|
7
|
+
open: boolean;
|
|
8
|
+
setIsOpen: () => void;
|
|
9
|
+
setCurrent: (data: Location) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ContentList: React.FC<LocationProps>;
|
|
12
|
+
export default ContentList;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
var ContentList = function navigationList(_ref) {
|
|
4
|
+
var open = _ref.open,
|
|
5
|
+
itemArray = _ref.itemArray,
|
|
6
|
+
currentLocation = _ref.currentLocation,
|
|
7
|
+
setIsOpen = _ref.setIsOpen,
|
|
8
|
+
setCurrent = _ref.setCurrent;
|
|
9
|
+
var changeHandle = function changeHandle(position) {
|
|
10
|
+
console.log('changeHandle', position);
|
|
11
|
+
// 设置当前选中位置
|
|
12
|
+
setCurrent(position);
|
|
13
|
+
// 关闭位置列表
|
|
14
|
+
setIsOpen();
|
|
15
|
+
};
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "location-list",
|
|
18
|
+
style: {
|
|
19
|
+
display: open ? 'block' : 'none'
|
|
20
|
+
}
|
|
21
|
+
}, itemArray.map(function (item) {
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
onClick: function onClick() {
|
|
24
|
+
return changeHandle(item);
|
|
25
|
+
},
|
|
26
|
+
className: "location-list-item"
|
|
27
|
+
}, item.address);
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
export default ContentList;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["itemArray", "defaultLocation", "__designMode"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { default as List } from "./position-list";
|
|
6
|
+
import { default as Position } from "./position-left";
|
|
7
|
+
var Navigation = function bottomNavigation(_ref) {
|
|
8
|
+
var itemArray = _ref.itemArray,
|
|
9
|
+
defaultLocation = _ref.defaultLocation,
|
|
10
|
+
__designMode = _ref.__designMode,
|
|
11
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
|
+
var _React$useState = React.useState(),
|
|
13
|
+
current = _React$useState[0],
|
|
14
|
+
_setCurrent = _React$useState[1];
|
|
15
|
+
var _React$useState2 = React.useState(false),
|
|
16
|
+
isOpen = _React$useState2[0],
|
|
17
|
+
setIsOpen = _React$useState2[1];
|
|
18
|
+
var openList = function openList() {
|
|
19
|
+
if (__designMode == 'design') {
|
|
20
|
+
// 设计态不打开列表
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
setIsOpen(!isOpen);
|
|
24
|
+
console.log('isopen', isOpen);
|
|
25
|
+
};
|
|
26
|
+
React.useEffect(function () {
|
|
27
|
+
if (defaultLocation) {
|
|
28
|
+
_setCurrent(defaultLocation);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Position, _extends({
|
|
32
|
+
currentLocation: current
|
|
33
|
+
}, otherProps, {
|
|
34
|
+
clickHandle: function clickHandle() {
|
|
35
|
+
return openList();
|
|
36
|
+
}
|
|
37
|
+
})), /*#__PURE__*/React.createElement(List, {
|
|
38
|
+
open: isOpen,
|
|
39
|
+
currentLocation: current,
|
|
40
|
+
itemArray: itemArray,
|
|
41
|
+
setIsOpen: openList,
|
|
42
|
+
setCurrent: function setCurrent(value) {
|
|
43
|
+
return _setCurrent(value);
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
export default Navigation;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _Search from "@alifd/next/es/search";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
var ExampleComponent = function ExampleComponent(props, ref) {
|
|
5
|
+
var defaultValue = props.defaultValue,
|
|
6
|
+
onSearch = props.onSearch;
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
ref: ref,
|
|
9
|
+
className: "search-bar-box",
|
|
10
|
+
onClick: function onClick() {
|
|
11
|
+
onSearch();
|
|
12
|
+
}
|
|
13
|
+
}, /*#__PURE__*/React.createElement(_Search, {
|
|
14
|
+
size: "medium",
|
|
15
|
+
shape: "simple",
|
|
16
|
+
placeholder: defaultValue
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
var SearchBar = /*#__PURE__*/forwardRef(ExampleComponent);
|
|
20
|
+
SearchBar.displayName = 'SearchBar';
|
|
21
|
+
export default SearchBar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.tags__container {
|
|
2
|
+
padding: 2px 6px;
|
|
3
|
+
border-radius: 4px;
|
|
4
|
+
background-color: black;
|
|
5
|
+
color: white;
|
|
6
|
+
font-size: 11px;
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
.orange {
|
|
10
|
+
color: #F1770E;
|
|
11
|
+
background-color: rgba(241, 119, 14, 0.1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.blue {
|
|
15
|
+
color: #2972DD;
|
|
16
|
+
background-color: rgba(41, 114, 221, 0.1);
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["name", "color"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
var Tag = function Tag(_ref) {
|
|
7
|
+
var name = _ref.name,
|
|
8
|
+
color = _ref.color,
|
|
9
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
11
|
+
className: "tags__container " + (color ? color : '')
|
|
12
|
+
}, otherProps), name);
|
|
13
|
+
};
|
|
14
|
+
export default Tag;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './teletext-list-item.scss';
|
|
3
|
+
/**
|
|
4
|
+
* 数据
|
|
5
|
+
*/
|
|
6
|
+
interface TeletextListItemProps {
|
|
7
|
+
/**
|
|
8
|
+
* 点击事件
|
|
9
|
+
*/
|
|
10
|
+
onClick?: (e: any) => void;
|
|
11
|
+
/**
|
|
12
|
+
* 标题
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 图片地址
|
|
17
|
+
*/
|
|
18
|
+
image?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 图片位置
|
|
21
|
+
*/
|
|
22
|
+
imagePlacement?: "left" | "right" | "none";
|
|
23
|
+
/**
|
|
24
|
+
* 说明
|
|
25
|
+
*/
|
|
26
|
+
description?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 标签列表
|
|
29
|
+
*/
|
|
30
|
+
tags?: {
|
|
31
|
+
/**
|
|
32
|
+
* 标签名称
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* 标签颜色
|
|
37
|
+
*/
|
|
38
|
+
color: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
declare const TeletextListItem: React.FC<TeletextListItemProps>;
|
|
42
|
+
export default TeletextListItem;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["onClick", "title", "image", "children", "imagePlacement", "description", "tags"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./teletext-list-item.scss";
|
|
6
|
+
import { convertChildren } from "../../utils/children-node-handle";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 数据
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var TeletextListItem = function TeletextListItem(_ref) {
|
|
13
|
+
var _ref$onClick = _ref.onClick,
|
|
14
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
15
|
+
title = _ref.title,
|
|
16
|
+
image = _ref.image,
|
|
17
|
+
children = _ref.children,
|
|
18
|
+
imagePlacement = _ref.imagePlacement,
|
|
19
|
+
description = _ref.description,
|
|
20
|
+
tags = _ref.tags,
|
|
21
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
|
+
var _otherProps = otherProps || {};
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24
|
+
className: "teletext-list__panel__item",
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, _otherProps), image && imagePlacement === 'left' ? convertChildren(children, 'image') : null, /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "teletext-list__panel__item__text"
|
|
28
|
+
}, convertChildren(children, 'title'), convertChildren(children, 'content'), tags ? /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "teletext-list__panel__item__text__tags"
|
|
30
|
+
}, tags === null || tags === void 0 ? void 0 : tags.map(function (tag, tagIndex) {
|
|
31
|
+
return convertChildren(children, 'teletext-tagc-1');
|
|
32
|
+
})) : null), image && imagePlacement === 'right' ? convertChildren(children, 'image') : null);
|
|
33
|
+
};
|
|
34
|
+
TeletextListItem.displayName = 'TeletextListItem';
|
|
35
|
+
export 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: flex-start;
|
|
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
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 标签列表
|
|
21
|
+
*/
|
|
22
|
+
tags?: {
|
|
23
|
+
/**
|
|
24
|
+
* 标签名称
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* 标签颜色
|
|
29
|
+
*/
|
|
30
|
+
color: string;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export interface TeletextListProps {
|
|
34
|
+
/**
|
|
35
|
+
* 标题
|
|
36
|
+
*/
|
|
37
|
+
title?: string;
|
|
38
|
+
/**
|
|
39
|
+
* 数据
|
|
40
|
+
*/
|
|
41
|
+
dataList?: DataProps[];
|
|
42
|
+
/**
|
|
43
|
+
* 点击事件
|
|
44
|
+
* @param e
|
|
45
|
+
*/
|
|
46
|
+
onClick?: (e: any) => void;
|
|
47
|
+
/**
|
|
48
|
+
* 子节点
|
|
49
|
+
*/
|
|
50
|
+
children: React.ReactChild;
|
|
51
|
+
/**
|
|
52
|
+
* 图片位置
|
|
53
|
+
*/
|
|
54
|
+
imagePlacement?: "left" | "right" | "none";
|
|
55
|
+
}
|
|
56
|
+
declare const TeletextList: React.FC<TeletextListProps>;
|
|
57
|
+
export default TeletextList;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["title", "dataList", "onClick", "children", "imagePlacement"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./index.scss";
|
|
6
|
+
import { default as TeletextListItem } from "./teletext-list-item";
|
|
7
|
+
import { convertChildren } from "../../utils/children-node-handle";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 数据
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
var DEFAULT_DATA_1 = {
|
|
14
|
+
image: 'https://img.alicdn.com/tps/TB16TQvOXXXXXbiaFXXXXXXXXXX-120-120.svg',
|
|
15
|
+
imagePlacement: 'left',
|
|
16
|
+
title: '标题名称',
|
|
17
|
+
description: '说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字',
|
|
18
|
+
tags: [{
|
|
19
|
+
name: '报名火热',
|
|
20
|
+
color: 'orange'
|
|
21
|
+
}, {
|
|
22
|
+
name: '人数众多',
|
|
23
|
+
color: 'blue'
|
|
24
|
+
}]
|
|
25
|
+
};
|
|
26
|
+
var DEFAULT_DATA_2 = {
|
|
27
|
+
image: 'https://img.alicdn.com/tps/TB16TQvOXXXXXbiaFXXXXXXXXXX-120-120.svg',
|
|
28
|
+
imagePlacement: 'right',
|
|
29
|
+
title: '标题名称',
|
|
30
|
+
description: '说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字',
|
|
31
|
+
tags: [{
|
|
32
|
+
name: '报名火热',
|
|
33
|
+
color: 'orange'
|
|
34
|
+
}, {
|
|
35
|
+
name: '人数众多',
|
|
36
|
+
color: 'blue'
|
|
37
|
+
}]
|
|
38
|
+
};
|
|
39
|
+
var DEFAULT_DATA_3 = {
|
|
40
|
+
title: '标题名称',
|
|
41
|
+
description: '说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字说明文字',
|
|
42
|
+
tags: [{
|
|
43
|
+
name: '报名火热',
|
|
44
|
+
color: 'orange'
|
|
45
|
+
}, {
|
|
46
|
+
name: '人数众多',
|
|
47
|
+
color: 'blue'
|
|
48
|
+
}]
|
|
49
|
+
};
|
|
50
|
+
var TeletextList = function TeletextList(_ref) {
|
|
51
|
+
var _ref$title = _ref.title,
|
|
52
|
+
title = _ref$title === void 0 ? '标题标题' : _ref$title,
|
|
53
|
+
dataList = _ref.dataList,
|
|
54
|
+
_ref$onClick = _ref.onClick,
|
|
55
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
56
|
+
children = _ref.children,
|
|
57
|
+
_ref$imagePlacement = _ref.imagePlacement,
|
|
58
|
+
imagePlacement = _ref$imagePlacement === void 0 ? 'left' : _ref$imagePlacement,
|
|
59
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
60
|
+
var _otherProps = otherProps || {};
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
62
|
+
className: "teletext-list__panel"
|
|
63
|
+
}, _otherProps), convertChildren(children, 'box-title'), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: "teletext-list__panel__item-list"
|
|
65
|
+
}, dataList ? dataList.map(function (item, index) {
|
|
66
|
+
return /*#__PURE__*/React.createElement(TeletextListItem, _extends({
|
|
67
|
+
key: index,
|
|
68
|
+
onClick: onClick,
|
|
69
|
+
children: children,
|
|
70
|
+
imagePlacement: imagePlacement
|
|
71
|
+
}, item));
|
|
72
|
+
}) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E")));
|
|
73
|
+
};
|
|
74
|
+
TeletextList.displayName = 'TeletextList';
|
|
75
|
+
export default TeletextList;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["title"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./title-1.scss";
|
|
6
|
+
var Title1 = function Title1(_ref) {
|
|
7
|
+
var _ref$title = _ref.title,
|
|
8
|
+
title = _ref$title === void 0 ? '标题标题' : _ref$title,
|
|
9
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
|
+
var _otherProps = otherProps || {};
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
12
|
+
className: "custom-title-1"
|
|
13
|
+
}, _otherProps), /*#__PURE__*/React.createElement("span", null, title));
|
|
14
|
+
};
|
|
15
|
+
Title1.displayName = 'Title1';
|
|
16
|
+
export default Title1;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@import '../../variables.scss';
|
|
2
|
+
|
|
3
|
+
.custom-title-1 {
|
|
4
|
+
font-size: 17px;
|
|
5
|
+
font-weight: 500;
|
|
6
|
+
color: #000000;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
& > span {
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
&::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
bottom: -2px;
|
|
15
|
+
left: 0;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 5px;
|
|
18
|
+
background: linear-gradient(-30deg, #95CDFE, #61A0FE);
|
|
19
|
+
border-radius: 5px;
|
|
20
|
+
opacity: 0.6;
|
|
21
|
+
z-index: 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -0,0 +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;
|