Drupal8模板中替換系統的jquery庫

[php] view plain copyprint?在CODE上查看代碼片派生到我的代碼片
    function mytheme_js_alter(&$javascript, \Drupal\Core\Asset\AttachedAssetsInterface $assets) {  
      // Swap out jQuery to use an updated version of the library.  
      $javascript['core/assets/vendor/jquery/jquery.min.js']['data'] = drupal_get_path('theme', 'mytheme').'/bower_components/jquery/dist/jquery.min.js';  
    }  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章