yireo-training / magento2-example-js-component3
0.0.1
2017-01-14 11:51 UTC
Requires
- php: >=5.6.0
- magento/framework: 100.*
Requires (Dev)
- composer/composer: *@dev
- phpunit/phpunit: *
This package is auto-updated.
Last update: 2024-09-19 21:56:08 UTC
README
此存储库包含一个用于演示如何使用 RequireJS 和一个简单的 JS 组件的 Magento 2 模块,该组件演示了 JS 组件如何加载其配置。
安装
使用以下 composer 命令进行安装
composer require yireo-training/magento2-example-js-component3:dev-master
然后启用该模块
bin/magento module:enable Yireo_ExampleJsComponent3
bin/magento setup:upgrade
并刷新缓存
bin/magento cache:clean
概念验证
安装模块后,主容器应包含一个通过 JS 组件更新的框,显示来自 Block 类的文本。
可选地,通过修改 Block 类的 $_template
变量来在 PHTML 模板之间切换。