有一天,当我在sencha touch 2.2中检查我的应用程序时,它的布局已完全打破。我意识到我的Chrome已从28自动更新到29.它在chrome 28及更早版本,任何其他webkit浏览器中都能完美运行当我检查样品应用程序来自sencha touch包时,它似乎也被破坏了。我的客户也使用chrome 29.如何修复chrome 29的布局问题?
答案 0 :(得分:4)
我有同样的问题而且我已经修好了。
转到
您应用中的 touch/resources/themes/stylesheets/sencha-touch/base/mixins/_Class.scss
用以下内容替换mixin st-box
并使用指南针重新编译您的CSS:
@mixin st-box($important: no) {
@if $important == important {
display: flex !important;
display: -webkit-box !important;
display: -ms-flexbox !important;
} @else {
display: flex;
display: -webkit-box;
display: -ms-flexbox;
}
}
答案 1 :(得分:1)
我也有问题,我成功更新到sencha 2.2.1。您可以使用sencha cmd命令使用sencha cmd轻松升级项目。 http://docs-origin.sencha.com/touch/2.2.1/#!/guide/command
答案 2 :(得分:0)
在触摸框架文件夹中打开以下Sass mixin: 资源/主题/样式表/煎茶触摸/碱/混入/ _Class.scss
搜索st-box mixin,并替换以下代码: //修复chrome 29 bug。 - 它只是切换订单 //显示规则
@mixin st-box($important: no) {
@if $important == important {
display: flex !important;
display: -webkit-box !important;
display: -ms-flexbox !important;
} @else {
display: flex;
display: -webkit-box;
display: -ms-flexbox;
}
}
接下来要做的就是编译Sass样式表。 你需要Sass& Compass(和Ruby)已安装在您的计算机上。 在命令行上,浏览到该文件夹: 触摸/资源/ SASS 并运行以下行: 罗盘手表
这可以修复最新Chrome浏览器的Sencha Touch问题! (如果您没有安装Sass / Compass并且您只想要生成的app.css,请随时从此处下载。 http://www.ladysign-apps.com/developer/wp-content/uploads/2013/08/app.css