uz / yii2-momentjs
为 Yii2 提供的 MomentJS 资产
v1.0.2
2017-10-19 14:50 UTC
Requires
- bower-asset/moment: *
- yiisoft/yii2: ~2
This package is not auto-updated.
Last update: 2024-09-15 05:08:01 UTC
README
提供资产包以便将 moment 简单集成到您的 Yii2 应用程序中。
安装
安装此扩展的首选方式是通过 composer。
运行以下命令
composer require --prefer-dist "uz/yii2-momentjs:*"
或者将以下内容添加到您的 composer.json
文件的 require
部分中。
"uz/yii2-momentjs": "*"
使用方法
在视图文件中注册资产
// Register only core momentjs with no locale data \uz\momentjs\MomentJsAsset::register($this); // Register core momentjs with current app locale. Current locale is activated on DOM ready. \uz\momentjs\MomentJsLocaleAsset::register($this); // Register core momentjs with all locales supported by the momentjs. \uz\momentjs\MomentJsAllLocalesAsset::register($this);
许可证
MIT 许可证。请参阅 许可证文件 以获取更多信息。