mro1127 / yii-admin Goto Github PK
View Code? Open in Web Editor NEWyii2 + adminlte
License: Other
yii2 + adminlte
License: Other
YII2的前端资源用asset来管理,一开始接触觉得略麻烦,渐渐感觉还好,配合bower管理各种前端的组件,一下是本系统的前端资源方案
'Adminlte' => [
'class' => 'common\assets\AdminlteAsset'
]
'BootstrapTable'=> [
'class' => 'yii\web\AssetBundle',
'sourcePath' => '@bower/bootstrap-table/dist',
'css' => ['bootstrap-table.min.css'],
'js' => ['bootstrap-table.min.js'],
'depends' => ['Bootstrap']
]
$this->registerAssetBundle('BootstrapTable');
$this->registerJsFile('@web/js/app.js');
$this->registerCssFile('@web/css/app.css');
官方推荐方式是:
安装 composer插件 "fxp/composer-asset-plugin:^1.4.1"
将bower包写进composer.json,这样在composer update时就可以安装bower依赖了
官方文档
中文文档(比较不全)
但在安装admin-lte过程中,其中一个包就除了问题,alphashack/eve,报了这个包没有找到bower.json,
而bower安装正常,猜测是 "fxp/composer-asset-plugin:^1.4.1"有问题
而直接使用bower,也并不麻烦,只要安装了bower,前端资源包放在bower.json管理即可。
为了避免未知的麻烦,直接使用bower。
yii高级模板默认配置了backend.dev 跟 fontend.dev 两个域名,在新版chrome下,dev域名默认会被跳转到https,无懈可击。
Chrome 63 forces .dev domains to HTTPS via preloaded HSTS
国内相关讨论
windows下可以做个证书并信任证书,到了mac就不那么简单了。搞了一晚上,未果。
果断的换其他域名。。。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.