wangzhoubin 2017-12-05 11:56:50 2183次浏览 0条评论 0 0 0
<?php

use admin\assets\AppAsset;
use yii\bootstrap\Html;

AppAsset::register($this);
$this->context->layout = FALSE;
?>

<?php $this->beginPage() ?>
<html>
<head>
    <meta charset="UTF-8"/>
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode('ssssss') ?></title>
    <?php $this->head() ?>
</head>

<body>
<?php $this->beginBody() ?>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>

如果禁用了layout布局,要想手动加载资源文件,就需要手动触发,$this->head 这个调用后会加载css,$this->beginBody()调用加载js,$this->startPage()这个对必须要哈,这里不说代码内部实现,自己要详细了解,debug跳进方法就知道了哈。

    没有找到数据。
您需要登录后才可以评论。登录 | 立即注册