本文介绍了在播放框架 2.4 中无法识别 twitterBootstrap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 Play 框架 2.4.我尝试按照 https://www.playframework.com/documentation/2.0/ScalaFormHelpers.
I'm using Play framework 2.4. I tried to use bootstrap as guided at https://www.playframework.com/documentation/2.0/ScalaFormHelpers.
在我的模板中,我使用了 import 语句:
In my template, I used the import statement:
@import helper.twitterBootstrap._
但是我得到了一个编译错误:
But I got a compilation error:
object twitterBootstrap is not a member of package views.html.helper
我错过了什么吗?
推荐答案
也许它已被删除,如下所述:https://www.playframework.com/documentation/2.3.3/Migration23
Maybe it has beed removed as mentioned here:https://www.playframework.com/documentation/2.3.3/Migration23
The in-built Twitter Bootstrap field constructor has been deprecated, and will be removed in a future version of Play.
There are a few reasons for this, one is that we have found that Bootstrap changes too drastically between versions and too frequently, such that any in-built support provided by Play quickly becomes stale and incompatible with the current Bootstrap version.
对于那些使用 play 2.4 的人
For those who use play 2.4
这篇关于在播放框架 2.4 中无法识别 twitterBootstrap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!