gpt4 book ai didi

widget - 如何覆盖小部件 Assets ? (yii2)

转载 作者:行者123 更新时间:2023-12-05 00:19:34 27 4
gpt4 key购买 nike

我有位于vendor/vova07/yii2-imperavi-widget/src/Asset.php我想覆盖它,因为我想使用更改 redactor.min.js文件位于 web/js/redactor.min.js我试图将此代码放在 web.php 中的组件中:`

'assetManager' => [
'bundles' => [
'vova07\imperavi' => [
'sourcePath' => 'vova07\imperavi\assets',
'js' => ['redactor.min.js', '@app/web/js/redactor.min.js']
]
]
],

但它不起作用

最佳答案

试试:

'assetManager' => [
'bundles' => [
'vova07\imperavi\Asset' => [
'sourcePath' => null,
'js' => [
'js/redactor.min.js'
],
],
],
],

Customizing Asset Bundles 部分:

You can configure multiple asset bundles similarly through yii\web\AssetManager::$bundles. The array keys should be the class names (without the leading backslash) of the asset bundles, ...

关于widget - 如何覆盖小部件 Assets ? (yii2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35568188/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com