第一次谷歌点击:http ://www.yiiframework.com/wiki/259/serve-jquery-and-jquery-ui-from-google-s-cdn/
除了覆盖 clientScript 配置,您可能还想覆盖 widgetFactory 配置:
<?php
return array(
// other config
'components'=>array(
'clientScript'=>array(
'packages'=>array(
'jquery'=>array(
'baseUrl'=>'//ajax.googleapis.com/ajax/libs/jquery/1/',
'js'=>array('jquery.min.js'),
)
),
// other clientScript config
),
'widgetFactory'=>array(
'widgets'=>array(
'CJui<WidgetName>'=>array( // where <WidgetName> is the name of the JUI Widget (Tabs, DatePicker, etc.). Each CJuiWidget used must be declared
'scriptUrl'=>'//ajax.googleapis.com/ajax/libs/jqueryui/1/',
'theme'=>JUI-THEME,
'themeUrl'=>'//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/',
),
// Repeat for other CJuiWidgets
),
),
// other component config
),
// other config
);