mirror of https://github.com/layui/layui
				
				
				
			update
							parent
							
								
									ff70a461fb
								
							
						
					
					
						commit
						e13e7a61ac
					
				
							
								
								
									
										24
									
								
								README.md
								
								
								
								
							
							
						
						
									
										24
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -38,24 +38,24 @@ layui 是一套开源的 Web UI 组件库,采用自身经典的模块化规范
 | 
			
		|||
<head>
 | 
			
		||||
  <meta charset="utf-8">
 | 
			
		||||
  <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
  <title>开始使用 layui</title>
 | 
			
		||||
  <title>开始使用 Layui</title>
 | 
			
		||||
  <link rel="stylesheet" href="./layui/css/layui.css">
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
 
 | 
			
		||||
<!-- 你的 HTML 代码 -->
 | 
			
		||||
  <!-- 你的 HTML 代码 -->
 | 
			
		||||
   
 | 
			
		||||
<script src="./layui/layui.js"></script>
 | 
			
		||||
<script>
 | 
			
		||||
//一般直接写在一个 js 文件中
 | 
			
		||||
layui.use(['layer', 'form'], function(){
 | 
			
		||||
  var layer = layui.layer
 | 
			
		||||
  ,form = layui.form;
 | 
			
		||||
  <script src="./layui/layui.js"></script>
 | 
			
		||||
  <script>
 | 
			
		||||
    // 使用组件
 | 
			
		||||
    layui.use(['layer', 'form'], function(){
 | 
			
		||||
      var layer = layui.layer;
 | 
			
		||||
      var form = layui.form;
 | 
			
		||||
      
 | 
			
		||||
  //欢迎语
 | 
			
		||||
  layer.msg('Hello World');
 | 
			
		||||
});
 | 
			
		||||
</script> 
 | 
			
		||||
      // 欢迎语
 | 
			
		||||
      layer.msg('Hello World');
 | 
			
		||||
    });
 | 
			
		||||
  </script> 
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,7 +136,7 @@ layui.use(['table', 'dropdown'], function(){
 | 
			
		|||
        var td = obj.td(this.field); //获取当前 td
 | 
			
		||||
        return td.find('select').val();
 | 
			
		||||
      }}
 | 
			
		||||
      ,{field:'sign', title:'签名'}
 | 
			
		||||
      ,{field:'sign', title:'签名', edit: 'textarea'}
 | 
			
		||||
      ,{field: 'experience', title: '积分', width:80, sort: true, align:'center', totalRow: '{{ d.TOTAL_NUMS }} 😊', templet: '<div>{{ d.experience }} 分</div>'}
 | 
			
		||||
      ,{field:'ip', title:'IP', width: 120}
 | 
			
		||||
      ,{field:'logins', title:'登入次数', width: 100, sort: true, totalRow: '{{ parseInt(d.TOTAL_NUMS) }} 次'}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -420,4 +420,3 @@
 | 
			
		|||
  }
 | 
			
		||||
  
 | 
			
		||||
}(window, window.document);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1409,12 +1409,12 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
 | 
			
		|||
          }
 | 
			
		||||
        break;
 | 
			
		||||
        case 'LAYTABLE_PRINT': //打印
 | 
			
		||||
          var printWin = window.open('打印窗口', '_blank')
 | 
			
		||||
          var printWin = window.open('about:blank', '_blank')
 | 
			
		||||
          ,style = ['<style>'
 | 
			
		||||
            ,'body{font-size: 12px; color: #666;}'
 | 
			
		||||
            ,'body{font-size: 12px; color: #5F5F5F;}'
 | 
			
		||||
            ,'table{width: 100%; border-collapse: collapse; border-spacing: 0;}'
 | 
			
		||||
            ,'th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #666;}'
 | 
			
		||||
            ,'a{color: #666; text-decoration:none;}'
 | 
			
		||||
            ,'th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #5F5F5F;}'
 | 
			
		||||
            ,'a{color: #5F5F5F; text-decoration:none;}'
 | 
			
		||||
            ,'*.layui-hide{display: none}'
 | 
			
		||||
          ,'</style>'].join('')
 | 
			
		||||
          ,html = $(that.layHeader.html()); //输出表头
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue