mirror of https://github.com/layui/layui
更新 code 用例
parent
d792678f89
commit
796a064e09
|
@ -191,27 +191,24 @@ layui.use(['code', 'dropdown'], function(){
|
|||
'full',
|
||||
{
|
||||
title: ['文字换行'],
|
||||
type: 'form'
|
||||
},
|
||||
{
|
||||
title: ['切换高亮主题'],
|
||||
type: 'theme'
|
||||
}
|
||||
],
|
||||
toolsEvent: function(obj) {
|
||||
if (obj.type === 'form') {
|
||||
type: 'form',
|
||||
event: function(obj) {
|
||||
dropdown.render({
|
||||
elem: obj.elem,
|
||||
data: [{title: '自动换行', wordWrap: true}, {title: '不自动换行', wordWrap: false}],
|
||||
show: true,
|
||||
click: function(data, othis) {
|
||||
codeInst.reload({
|
||||
wordWrap: data.wordWrap,
|
||||
content: [+new Date()]
|
||||
wordWrap: data.wordWrap
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (obj.type === 'theme') {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: ['切换高亮主题'],
|
||||
type: 'theme',
|
||||
event: function(obj) {
|
||||
dropdown.render({
|
||||
elem: obj.elem,
|
||||
data: themeData,
|
||||
|
@ -248,6 +245,7 @@ layui.use(['code', 'dropdown'], function(){
|
|||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// 仅重载 code
|
||||
|
|
Loading…
Reference in New Issue