1
如何覆盖vendor/magento/module-product-video/view/adminhtml/web/js/get-video-information.js文件。我需要从Magento 2 admin的产品页面删除视频URL验证。如何覆盖magento中的admin js文件2
如何覆盖vendor/magento/module-product-video/view/adminhtml/web/js/get-video-information.js文件。我需要从Magento 2 admin的产品页面删除视频URL验证。如何覆盖magento中的admin js文件2
如果你有一个自定义模块,我相信你可以通过文件requirejs-config.js做
创建[YourNamespace]/[YourModule] /视图/ adminhtml /这个文件用下面的代码:
var config = {
map: {
'*': {
'Magento_ProductVideo/js/get-video-information':
'[YourNamespace]_[YourModule]/js/get-video-information'
}
}
};
你的JavaScript文件应放在[YourNamespace]/[YourModule] /视图/ adminhtml /网络/ JS/
你只是需要重写特定的功能。 –