asialong 2015-12-24 10:34:25 2583次浏览 1条回复 0 0 0

在main的文件里设置如下

 'assetManager' => [
	'forceCopy' => YII_DEBUG ? true : false,
	'bundles' => [
		'yii\web\JqueryAsset' => [
			'jsOptions'=>[
				'position'=>\yii\web\View::POS_HEAD,
			],
			//'sourcePath' => '@webroot/metronic453/global/plugins',
			'js' => [
				YII_DEBUG ? 'jquery.min.js' : 'http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js',
			]
		],
		'yii\bootstrap\BootstrapAsset' => [
			'sourcePath' => '@webroot/metronic453/global/plugins/bootstrap/css',
			'css' => [
				YII_DEBUG ? 'bootstrap.min.css' : 'https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css',
			]
		],
		'yii\bootstrap\BootstrapPluginAsset' => [
			'sourcePath' => '@webroot/metronic453/global/plugins/bootstrap/js',
			'js' => [
				YII_DEBUG ? 'bootstrap.min.js' : 'https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js',
			]
		],
	],
],
  • 回复于 2016-05-28 17:16 举报

    改成
    'sourcePath' => null,
    要不然应该是从网上下载文件下来再复制到\assets目录里

    1 条回复
    回复于 2016-05-28 23:03 回复

    好的,谢谢

您需要登录后才可以回复。登录 | 立即注册