diff --git a/src/components/lineChart/lineChart.module.scss b/src/components/lineChart/lineChart.module.scss index ed31596..e8f31d7 100644 --- a/src/components/lineChart/lineChart.module.scss +++ b/src/components/lineChart/lineChart.module.scss @@ -3,7 +3,7 @@ align-items: flex-end; justify-content: left; flex-wrap: nowrap; - height: 400px; + height: 420px; } .columnBox { diff --git a/src/components/lineChart/lineChart.tsx b/src/components/lineChart/lineChart.tsx index f8e7780..9dac5bf 100644 --- a/src/components/lineChart/lineChart.tsx +++ b/src/components/lineChart/lineChart.tsx @@ -30,6 +30,7 @@ const LineChart: FC = ({data}) => { lineChartList.map(d => + {d.value} {d.time} diff --git a/src/components/video/video.tsx b/src/components/video/video.tsx index 955375c..4afa044 100644 --- a/src/components/video/video.tsx +++ b/src/components/video/video.tsx @@ -7,14 +7,14 @@ import unique_ident from "@/hooks/unique_ident"; const deviation: number = 1 const HVideo: FC = (opt: HVideoOptions) => { - let video - try { - video = Taro.createVideoContext('myVideo') - } catch (e) { + let video: Taro.VideoContext - } const [currentTime, setCurrentTime] = useState(0) + try { + video = Taro.createVideoContext('myVideo') + } catch (e) {} + function onTimeUpdate(event: BaseEventOrig) { // if (opt.preview) return; const time = event.detail.currentTime @@ -53,10 +53,16 @@ const HVideo: FC = (opt: HVideoOptions) => { } Taro.useDidHide(() => { - video?.stop() + video?.pause() unique_ident.put(Number(currentTime.toFixed(2)), Date.now()) }) + Taro.useDidShow(()=>{ + if(!video){ + video = Taro.createVideoContext('myVideo') + video.play() + } + }) return (