Browse Source

优化 layer 示例文件多余空白符 (vscode)

pull/1426/head
贤心 1 year ago
parent
commit
9b4fc5da8e
  1. 26
      examples/layer.html

26
examples/layer.html

@ -62,9 +62,9 @@ var runTest = function(run, $, layer){
var timer = setInterval(function(){ var timer = setInterval(function(){
//location.reload(); //location.reload();
}, 1000); }, 1000);
layer.alert(123); layer.alert(123);
$.ajax({ $.ajax({
url: './all.html' url: './all.html'
,beforeSend: function(){ ,beforeSend: function(){
@ -91,12 +91,12 @@ layui.use(['layer', 'util'], function(layer, util){
var $ = layui.jquery; var $ = layui.jquery;
var util = layui.util; var util = layui.util;
//return //return
var index = layer.msg('Hello World'); var index = layer.msg('Hello World');
//layer.close(index); //layer.close(index);
//runTest(1, $, layer); //runTest(1, $, layer);
// 触发事件 // 触发事件
util.on('lay-on', { util.on('lay-on', {
test: function(){ test: function(){
@ -136,8 +136,8 @@ layui.use(['layer', 'util'], function(layer, util){
layer.open({ layer.open({
title:'自定义页面层', title:'自定义页面层',
type: 1, type: 1,
skin: 'layui-layer-border', skin: 'layui-layer-border',
area: ['1000px', '580px'], area: ['1000px', '580px'],
content: $('#test11111'), content: $('#test11111'),
maxmin: true, maxmin: true,
shade: false, shade: false,
@ -179,13 +179,13 @@ layui.use(['layer', 'util'], function(layer, util){
layer.tab({ layer.tab({
area: ['600px', '300px'], area: ['600px', '300px'],
tab: [{ tab: [{
title: 'TAB1', title: 'TAB1',
content: '内容1' content: '内容1'
}, { }, {
title: 'TAB2', title: 'TAB2',
content: '内容2' content: '内容2'
}, { }, {
title: 'TAB3', title: 'TAB3',
content: '内容3' content: '内容3'
}] }]
}); });
@ -230,17 +230,17 @@ layui.use(['layer', 'util'], function(layer, util){
}); });
} }
}); });
// 相册层 // 相册层
layer.photos({ layer.photos({
photos: '#photos', // $('#photos') photos: '#photos', // $('#photos')
// toolbar: false, // toolbar: false,
// footer: false // footer: false
}); });
//动态追加 //动态追加
$('#photos').append('<li class="list"><img src="https://unpkg.com/outeres/demo/3.jpg"></li>'); $('#photos').append('<li class="list"><img src="https://unpkg.com/outeres/demo/3.jpg"></li>');
}); });
</script> </script>
</body> </body>

Loading…
Cancel
Save