lx / jquery-bundle
该包已被弃用且不再维护。未建议替代包。
此包的最新版本(dev-master)没有可用的许可信息。
此包提供多个jQuery库,例如jQuery本身、jQuery UI和jQuery mobile。
dev-master
2016-03-17 10:04 UTC
This package is not auto-updated.
Last update: 2022-02-01 12:22:12 UTC
README
此包的支持已停止。了解原因: http://matznermatzner.de/en/bernd/2013/11/dont-use-my-symfony2-bundles/
jQueryBundle
此包提供多个jQuery库,例如jQuery本身、jQuery UI和jQuery mobile。
## 安装 将包添加到您的 AppKernel::registerBundles() 方法中,并运行 assets:install。
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new lx\jQueryBundle\lxjQueryBundle, ); } }
## 使用 要使用组件,您必须在twig中使用assetic将其包含在内。
{% javascripts filter='?yui_js' output='js/application.js' '@lxjQueryBundle/jQuery-latest.js' '@lxjQueryBundle/ui/jquery.ui.core.js' '@lxjQueryBundle/ui/jquery.ui.widget.js' '@lxjQueryBundle/ui/jquery.ui.mouse.js' '@lxjQueryBundle/ui/jquery.ui.position.js'%} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
只需选择您项目需要的文件,包含它们并开始使用!
Note: Watch out for the dependencies of the components. For example, widget and mouse need the core component.
过滤器属性是可选的,但我们强烈建议使用它,因为没有对javascript和css文件进行压缩,这是出于开发原因。我们还建议阅读Symfony2文档中有关assetic的文章。 -> https://symfony.ac.cn/doc/2.0/cookbook/assetic/asset_management.html
## 文件 jQueryBundle/ mobile/ js/ css/ ui/ js/ css/ Resources/ public/ mobile/ images/ ui/ images/
请注意:这只是一个由jQuery.com、jqueryui.com和jquerymobile.com的维护者编写的javascript & css库的“摘要”。