目标:
访问引导模式
modal()
反应中的代码。
有一个带有引导程序v4的React应用程序。
包.json
:
{
...
"dependencies": {
"bootstrap": "^4.1.1",
"jquery": "^3.3.1",
"popper.js": "^1.14.3",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-router-dom": "^4.2.2",
"react-scripts-ts": "2.8.0"
},
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
},
"devDependencies": {
"@types/jest": "^22.2.3",
"@types/node": "^9.6.18",
"@types/react": "^16.3.14",
"@types/react-dom": "^16.0.5",
"@types/react-router-dom": "^4.2.6"
},
...
}
现在想得到
模式()
通过chrome dev工具提供:
所以看起来:
-
它
可以
见jquery;
-
它
不能
认出
foo
作为引导程序的模式
模式()
;
如何使jquery识别
福
作为
模式()
?