fix
This commit is contained in:
parent
4a38f4daf8
commit
78c0d3d265
33
src/App.tsx
33
src/App.tsx
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import React, { useEffect } from 'react'
|
||||
import { Routes, Route } from 'react-router-dom'
|
||||
import Layout from './components/Layout'
|
||||
import HomePage from './pages/HomePage'
|
||||
|
|
@ -17,7 +17,38 @@ import KVTestPage from './pages/KVTestPage'
|
|||
import TextVideoGeneratorPage from './pages/TextVideoGeneratorPage'
|
||||
import PythonCoreTestPage from './pages/PythonCoreTestPage'
|
||||
import PythonEnvManagerPage from './pages/PythonEnvManagerPage'
|
||||
import * as path from '@tauri-apps/api/path';
|
||||
import { convertFileSrc } from '@tauri-apps/api/core'
|
||||
|
||||
function App() {
|
||||
async function testPath(){
|
||||
console.log({
|
||||
appCacheDir: await path.appCacheDir(),
|
||||
appConfigDir: await path.appConfigDir(),
|
||||
appDataDir: await path.appDataDir(),
|
||||
appLocalDataDir: await path.appLocalDataDir(),
|
||||
audioDir: await path.audioDir(),
|
||||
cacheDir: await path.cacheDir(),
|
||||
configDir: await path.configDir(),
|
||||
dataDir: await path.dataDir(),
|
||||
desktopDir: await path.desktopDir(),
|
||||
documentDir: await path.documentDir(),
|
||||
downloadDir: await path.downloadDir(),
|
||||
executableDir: await path.executableDir(),
|
||||
fontDir: await path.fontDir(),
|
||||
homeDir: await path.homeDir(),
|
||||
localDataDir: await path.localDataDir(),
|
||||
pictureDir: await path.pictureDir(),
|
||||
publicDir: await path.publicDir(),
|
||||
})
|
||||
|
||||
const mp4 = await path.join(await path.publicDir(), '1.mp4')
|
||||
const url = convertFileSrc(mp4)
|
||||
console.log({mp4, url})
|
||||
}
|
||||
useEffect(()=>{
|
||||
testPath()
|
||||
}, [])
|
||||
return (
|
||||
<Routes>
|
||||
{/* 项目详情页 - 无侧边栏布局 */}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import React, { useState, useRef, useEffect } from 'react'
|
||||
import { Play, Pause, Volume2, VolumeX, Maximize2, X, AlertCircle } from 'lucide-react'
|
||||
import { convertFileSrc, invoke } from '@tauri-apps/api/core'
|
||||
|
||||
interface VideoPlayerProps {
|
||||
videoPath: string
|
||||
isOpen: boolean
|
||||
|
|
|
|||
Loading…
Reference in New Issue