版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zch3210/article/details/84666792
图片上传 http://www.yii-china.com/post/detail/15.html
富文本编辑器 http://www.yii-china.com/post/detail/3.html
标签 :1.下载地址https://download.csdn.net/download/zch3210/10820154
2.将下载的yii2-tags-master 修改 tags (注意:修改成其他文件名请修改插件内对应的命名空间),将文件放在 根目录/common/widgets 下即可
3.views渲染图片上传界面
<?=$form->field($model,'tags')->widget('common\widgets\tags\TagWidget')?>
4. 标签样式添加 :frontend\web\css\site.css
.select2-container--default .select2-selection--multiple {
background-color: white;
border: 1px solid #aaa;
cursor: text;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: 1px solid #2b542c;
outline: 0 none;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #5cb85c;
color:#fff;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
color:#fff;
}