component-shipinlv 2.0.9 → 2.0.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.
@@ -5,6 +5,7 @@ interface Props {
5
5
  subtitle?: string;
6
6
  productType: string;
7
7
  env?: Global.Env;
8
+ onLink?: (url: string) => void;
8
9
  }
9
10
  declare const VideoStudyPage: React.FC<Props>;
10
11
  export default VideoStudyPage;
@@ -13,7 +13,8 @@ var VideoStudyPage = function VideoStudyPage(_ref) {
13
13
  var title = _ref.title,
14
14
  subtitle = _ref.subtitle,
15
15
  productType = _ref.productType,
16
- env = _ref.env;
16
+ env = _ref.env,
17
+ onLink = _ref.onLink;
17
18
  var _useState = useState([]),
18
19
  _useState2 = _slicedToArray(_useState, 2),
19
20
  listData = _useState2[0],
@@ -50,7 +51,11 @@ var VideoStudyPage = function VideoStudyPage(_ref) {
50
51
  className: "itemCard",
51
52
  onClick: function onClick() {
52
53
  Tool.toast('已经开始下载');
53
- Tool.openWindow(items.videoUrl);
54
+ if (typeof onLink == 'function') {
55
+ onLink(items.videoUrl);
56
+ } else {
57
+ Tool.openWindow(items.videoUrl);
58
+ }
54
59
  },
55
60
  children: /*#__PURE__*/_jsxs("a", {
56
61
  children: [/*#__PURE__*/_jsx(PlayCircleFilled, {}), " ", index + 1, " ", items.title]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",