select2

Yii2 模态框遮挡select2下拉列表问题

核能气质少年 提交于 2019-11-30 11:01:48
问题:模态框遮挡select2下拉列表 解决方案: $css = <<<CSS.select2-drop { z-index: 10050 !important; } .select2-search-choice-close { margin-top: 0 !important; right: 2px !important; min-height: 10px; } .select2-search-choice-close:before { color: black !important; } /*防止select2不会自动失去焦点*/ .select2-container { z-index: 16000 !important; } .select2-drop-mask { z-index: 15990 !important; } .select2-drop-active { z-index: 15995 !important; }CSS;$this->registerCss($css,['type'=>'text/css']); 来源: https://www.cnblogs.com/gavinguo/p/11580519.html

select2的多选下拉框上传

丶灬走出姿态 提交于 2019-11-30 10:35:31
1.加入multiple: true,属性实现多选下拉框样式 2.下拉框选择后的值是数组类型不要经过数据处理才能进行表单提交 提交的时候原下拉框所在的标签不提交,而是将多选后的值存入页面中的一个隐藏标签中,将这个隐藏标签进行提交 提交时获取选中的下拉框的所有的值,并遍历这些值,将这些值分别以(值 逗号)的形式存入一个变量中,并在遍历完成后去掉最后一个逗号, 最终的格式类似 1,4,6,7 这样 页面初始化时,假如值传入,就将数据处理成数组并通过&(“#aa”).val(arr).trigger('change')绑定进多选下拉框中 来源: https://www.cnblogs.com/clsl/p/11579157.html

Select2 jquery plugin show number of selected items in the result instead of tags

女生的网名这么多〃 提交于 2019-11-30 02:33:24
问题 I am using Select2 jQuery Plugin . https://select2.github.io/ for reference When I am using the multiple dropdown option. The result of selected items is shown as tags in a box but, I just want to show the number of items selected. Is it possible with Select2 jQuery plugin HTML <select multiple style="width:100%"> <option value="1">Name1</option> <option value="2">Name2</option> <option value="3">Name3</option> <option value="4">Name4</option> <option value="5">Name5</option> <option value="6

Capture events of underlying element in component

本秂侑毒 提交于 2019-11-29 16:02:40
Trying to use this component. <select2 v-model="value" :options="options" @change="onChange()"></select2> The @change callback is not getting called. I know that I can use watch: { value: function () { ... } but, is there a way to capture underlying tag events? In the current version, select2 component does not handle on-change function. For this, you have to modify the select2 component, you have to add one more prop: onChange and inside component execute the function passed in this prop, changes will be something like following: Vue.component('select2', { props: ['options', 'value',

How to automatically increase the height of select2 input box (multiple)

做~自己de王妃 提交于 2019-11-29 15:45:44
I have a select2 input box for multiselet option in which, user can select as many options as he wants, if the selected options are occupying more space than available width then I wanted to increase the height of the select box automatically (don't want scroll option, all options should be in viewable space) and get the remaining options in next line. Currently options are coming in the next line but the height of the select box is not increased. If I remove the height property in the .select2-container--default .select2-selection--multiple class, it is working. But I want this height

Easy UI combobox实现类似 Select2的效果,下拉带搜索框

给你一囗甜甜゛ 提交于 2019-11-29 09:47:44
一直在开发一个新系统,其中用Easy UI作为前端框架,少不了用 combobox做为一个 下拉控件,它支持 可编辑 模糊本地数据过滤,也可支持 不可编辑 下拉 选择的功能; $('#ID' ).combobox({ data: CommonSelect.Return_Company('All'), valueField: 'ID', textField: 'Company_Name', prompt: '选择对应公司', editable: false/true }); 效果就是如下: 但 实际需求中,对于下拉 又不想让他们编辑,但又方便他们查找 下拉数据,这时候 下拉 带搜索的 功能孕育出来了! Easy UI有组合控件一说,所以得用到这个,实现如下: $('#ID' ).combobox({ data: CommonSelect.Return_Company('All'), valueField: 'ID', textField: 'Company_Name', prompt: '选择对应公司', editable: false, onBeforeLoad: function () { var panel = $('#ID' ).combo('panel') $("<input type=\"text\" placeholder=\" 输入查询内容\" style=\

angularjs完整demo例子

怎甘沉沦 提交于 2019-11-29 05:39:46
 AngularJS的主要特点是 mvc 数据双向绑定 分模块 依赖注入      mvc m: $Scope 变量 V:视图 c:controller=function(){} 控制器 方法      Angularjs的用法 1.在一个有起始标签的元素开始标签内使用 ng-app来指定angularjs的作用范围 2.angularJS的表达式是双大括号 {{}} 里面可以显示变量,数学运算,执行方法 3.ng-model=“变量名” 在输入框内可以绑定一个变量,此变量前端输入的值和js代码中的值是双向绑定的,一个变了都变了,并且使用此变量的地方都发生改变 4.ng-init=“变量名=‘变量值’” 一般加在body的起始标签内 初始化变量 也可以初始化方法 相当于onload方法      通常一个项目有一个angularJS模块,一个页面又一个angularJS的控制器 ng-app=“模块名” ng-app后面也可以指定模块名,如果定义控制器必须先定义模块对象,模块对象必须有名字 如果不定义控制器简单实用angularJS则直接ng-app指定作用范围也可      定义模块及定义控制器需要在js代码块中完成 在body属性里只能指定模块的名字和控制器的名字以及简单的使用      var app=angular.module(‘模块名’,[‘引入的模块名’])

Select2 Default values for multiple select and allowed tags

纵然是瞬间 提交于 2019-11-29 04:14:13
I have a select 2 multi-select option <select multiple name="event_type[]" class="form-control" id="selectEvents"> @foreach ($eTypes as $type) <option>{{$type}}</option> @endforeach </select> I want to set some default values just in case the user is editing the form. I have successfully done that by doing this var s2 = $("#selectEvents").select2({ placeholder: "Choose event type", tags: true }); s2.val(["Trade Fair", "CA", "Party"]).trigger("change"); //CA doesn't show as a default But the problem is i am allowing user generated options using the tags: true option for select2. When I set a

BootStrap之X-editable插件使用

走远了吗. 提交于 2019-11-28 22:29:33
项目背景 刚加入公司的新项目,主要在做开发工作。由于是新手,本周的工作是配合另外一个同事写前台页面。前台框架是Bootstrap,本文主要介绍一下项目需求的一个功能——表格行内编辑事件。 使用X-editable插件实现的。 效果图:点击表格就会出现下拉框。 步骤 1、jsp中添加引用 <link type= "text/css" href= "${ctx}/static/comp/jquery-ui-bootstrap/css/bootstrap-editable.css" rel= "stylesheet"> < script src= "${ctx}/static/comp/jquery-ui-bootstrap/js/bootstrap-editable.js" type= "text/javascript"> </ script> 2、在jsp中编写代码 1)表格数据如下: <c:forEach items= "${page.result}" var= "m" varStatus= "status"> < tr> < td columnName= "operator"> < a href= "#" class= "employee" value= "" data-pk= "operator" data-type= "select2">${m.employeeNo} </

php开发常用插件

ぃ、小莉子 提交于 2019-11-28 17:38:07
font awesome 简介: font awesome是一套绝佳的图标字体库和CSS框架 网址: http://fontawesome.dashgame.com/ layer 简介: layer是一款近年来备受青睐的web弹层组件 网址: http://layer.layui.com/ raty 简介: raty是一款jquery评分插件 网址: http://www.jq22.com/jquery-info6430 select2 简介: Select2是一款可以对HTML的标签进行功能优化的jQuery插件,支持对列表进行检索,从远程数据源获取列表项等各种功能. 网址: https://select2.org/ highcharts 简介: 兼容 IE6+、完美支持移动端、图表类型丰富、方便快捷的 HTML5 交互性图表库 网址: https://www.hcharts.cn/ ueditor 简介: UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于MIT协议,允许自由使用和修改代码… 网址: http://ueditor.baidu.com/website/ Boostrap Tags Input 简介: Boostrap Tags Input 插件基于Bootstrap实现了如:打Tag 和