mirror of https://github.com/layui/layui
**调整** dropdown 的 `data.title` 属性,对其进行 HTML 转义处理,若不转义,可通过 `templet` 属性实现
parent
8f2fb6e5e3
commit
e42b687393
|
@ -3,11 +3,12 @@
|
||||||
* 下拉菜单组件
|
* 下拉菜单组件
|
||||||
*/
|
*/
|
||||||
|
|
||||||
layui.define(['jquery', 'laytpl', 'lay'], function(exports){
|
layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var laytpl = layui.laytpl;
|
var laytpl = layui.laytpl;
|
||||||
|
var util = layui.util;
|
||||||
var hint = layui.hint();
|
var hint = layui.hint();
|
||||||
var device = layui.device();
|
var device = layui.device();
|
||||||
var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');
|
var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');
|
||||||
|
@ -175,7 +176,7 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){
|
||||||
: laytpl(templet).render(item);
|
: laytpl(templet).render(item);
|
||||||
}
|
}
|
||||||
return title;
|
return title;
|
||||||
}(item.title);
|
}(util.escape(item.title));
|
||||||
|
|
||||||
// 初始类型
|
// 初始类型
|
||||||
var type = function(){
|
var type = function(){
|
||||||
|
|
Loading…
Reference in New Issue