这次我可能犯了愚蠢的错误,但我得到的却是什么。我从反应路由器v4开始,但我的路由没有发生。我尝试手动点击网址以及点击按钮没有结果。这是我的路线配置。和我在使用LinkContaier重定向
tell application "System Events" to tell process "QuickTime Player"
#Set volume to 100%
click button 1 of window 1
#To open dialog to show available cameras
click button 3 of window 1
#To select our device
click menu item "Gangzheng's iPhone" of menu 1 of button 3 of window 1
end tell
这是我的容器
tell application "Finder"
set bigBounds to (get bounds of window of desktop)
end tell
tell application "QuickTime Player"
activate
start
#Start new recording cmd + option + N
tell application "System Events" to key code 45 using {option down, command down}
set iBounds to (get bounds of front window)
if bigBounds = iBounds then
delay 1
else
#Full screen only if is not already at full screen control + cmd + F
tell application "System Events" to key code 3 using {control down, command down}
delay 1
end if
tell application "System Events" to tell process "QuickTime Player"
#Set volume to 100%
click button 1 of window 1
#To open dialog to show available cameras
click button 3 of window 1
#To select our device
click menu item "iPhone de User" of menu 1 of button 3 of window 1
end tell
#To move mouse to the right side of the screen
set mouseToolsPath to "/Users/Shared/MouseTools"
set x to (item 3 of bigBounds) - 1
set y to (item 4 of bigBounds) / 2
#Por si el archivo no existe...
try
do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x as text) & " -y " & (y as text)
on error errMsg number errNum
display dialog "An unknown error occurred: " & errNum as text
end try
end tell
我按下了program-profile / 3的url,但在控制台中也没有任何错误
答案 0 :(得分:0)
请勿在浏览器路由器中使用开关:
ReactDOM.render(
<Provider store={store}>
<BrowserRouter >
<div>
<Route exact path="/" component={HeaderContainer}/>
<Route path="/program-profile/:program_id" component={ProgramProfileContainer}/>
</div>
</BrowserRouter>
</Provider>, document.getElementById('root')
);
答案 1 :(得分:0)
你的回答似乎没问题。但这就是我正常做的事情。
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import promise from 'redux-promise';
import reducers from './reducers';
import ProgramProfileContainer from "./containers/ProgramProfileContainer"
const store = configureStore();
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<div>
<Switch>
<Route path="program-profile/:program_id" component={ProgramProfileContainer} />
<Route path="/" component={IndexPage} />
</Switch>
</div>
</BrowserRouter>
</Provider>
, document.querySelector('.container'));
当您使用Link
时,它应该是这样的。
<Link to={`/posts/${post.id}`}>
{post.title}
</Link>
如果您在控制台中有任何错误消息,请发布它们,以便我们为您提供进一步的帮助。希望这可以帮助。快乐的编码。