@myun/gimi-chat 0.3.8 → 0.3.9
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/dist/components/knowledge-trace/index.d.ts +1 -0
- package/dist/components/knowledge-trace/index.js +4 -2
- package/dist/components/knowledge-trace/videoList.d.ts +1 -0
- package/dist/components/knowledge-trace/videoList.js +8 -11
- package/dist/components/templates/index.module.css +0 -1
- package/dist/types/chat.d.ts +1 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,8 @@ var KonwledgeTrace = function KonwledgeTrace(_ref) {
|
|
|
22
22
|
chatList = _ref.chatList,
|
|
23
23
|
isOverFlow = _ref.isOverFlow,
|
|
24
24
|
className = _ref.className,
|
|
25
|
-
style = _ref.style
|
|
25
|
+
style = _ref.style,
|
|
26
|
+
onCurrentTraceVideoClick = _ref.onCurrentTraceVideoClick;
|
|
26
27
|
var showKonwledgeTrace = useAppSelector(function (state) {
|
|
27
28
|
return state.gimiMenu.showKonwledgeTrace;
|
|
28
29
|
});
|
|
@@ -107,7 +108,8 @@ var KonwledgeTrace = function KonwledgeTrace(_ref) {
|
|
|
107
108
|
switch (activeKey) {
|
|
108
109
|
case 'video':
|
|
109
110
|
return /*#__PURE__*/React.createElement(VideoList, {
|
|
110
|
-
list: videoSliceList
|
|
111
|
+
list: videoSliceList,
|
|
112
|
+
onCurrentTraceVideoClick: onCurrentTraceVideoClick
|
|
111
113
|
});
|
|
112
114
|
case 'product':
|
|
113
115
|
return /*#__PURE__*/React.createElement(ClassList, {
|
|
@@ -3,10 +3,11 @@ import styles from "./index.module.css";
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { knowledgeConstants } from "../../constants";
|
|
5
5
|
import { Toast, Tooltip } from '@douyinfe/semi-ui';
|
|
6
|
-
import { useAppSelector
|
|
6
|
+
import { useAppSelector } from "../../store/hooks";
|
|
7
7
|
var VideoItem = function VideoItem(_ref) {
|
|
8
8
|
var _konwledgeTraceState$;
|
|
9
|
-
var item = _ref.item
|
|
9
|
+
var item = _ref.item,
|
|
10
|
+
onClick = _ref.onClick;
|
|
10
11
|
var konwledgeTraceState = useAppSelector(function (state) {
|
|
11
12
|
return state.gimiMenu.konwledgeTraceState;
|
|
12
13
|
});
|
|
@@ -21,7 +22,6 @@ var VideoItem = function VideoItem(_ref) {
|
|
|
21
22
|
}),
|
|
22
23
|
gradeId = _useAppSelector.gradeId,
|
|
23
24
|
teachModuleId = _useAppSelector.teachModuleId;
|
|
24
|
-
var dispatch = useAppDispatch();
|
|
25
25
|
var handleClick = function handleClick() {
|
|
26
26
|
if (item.isDelete === 1) return;
|
|
27
27
|
if (platform !== 'myun') return Toast.warning('当前平台不支持溯源跳转');
|
|
@@ -29,12 +29,7 @@ var VideoItem = function VideoItem(_ref) {
|
|
|
29
29
|
if (item.isJoinClass) {
|
|
30
30
|
// 如果溯源就是当前视频,直接跳转到溯源的进度
|
|
31
31
|
if (gradeId === item.gradeId && teachModuleId === item.id) {
|
|
32
|
-
|
|
33
|
-
type: 'smartClassState/setTimeFromSider',
|
|
34
|
-
payload: {
|
|
35
|
-
timeFromSider: item.startedAtSecond
|
|
36
|
-
}
|
|
37
|
-
});
|
|
32
|
+
onClick === null || onClick === void 0 || onClick(item.startedAtSecond);
|
|
38
33
|
} else {
|
|
39
34
|
// 如果不是当前视频,新开一个学习页面
|
|
40
35
|
window.open("/learningPage?".concat(searchParams, "&startedAt=").concat(item.startedAtSecond));
|
|
@@ -76,7 +71,8 @@ var VideoItem = function VideoItem(_ref) {
|
|
|
76
71
|
}, "\u89C6\u9891\u5931\u6548")));
|
|
77
72
|
};
|
|
78
73
|
var VideoList = function VideoList(_ref2) {
|
|
79
|
-
var list = _ref2.list
|
|
74
|
+
var list = _ref2.list,
|
|
75
|
+
onCurrentTraceVideoClick = _ref2.onCurrentTraceVideoClick;
|
|
80
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
81
77
|
className: styles.knowledgeList
|
|
82
78
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -84,7 +80,8 @@ var VideoList = function VideoList(_ref2) {
|
|
|
84
80
|
}, "\u672C\u5BF9\u8BDD\u5171".concat((list === null || list === void 0 ? void 0 : list.length) || 0, "\u4E2A\u89C6\u9891")), list.map(function (item) {
|
|
85
81
|
return /*#__PURE__*/React.createElement(VideoItem, {
|
|
86
82
|
item: item,
|
|
87
|
-
key: item.id
|
|
83
|
+
key: item.id,
|
|
84
|
+
onClick: onCurrentTraceVideoClick
|
|
88
85
|
});
|
|
89
86
|
}));
|
|
90
87
|
};
|
package/dist/types/chat.d.ts
CHANGED