Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sentsim committed Apr 5, 2021
1 parent 74e8842 commit b0646a2
Show file tree
Hide file tree
Showing 35 changed files with 283 additions and 119 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "layui",
"main": "dist/layui.js",
"version": "2.6.2",
"version": "2.6.3",
"homepage": "https://github.com/sentsin/layui",
"authors": [
"sentsin <xu@sentsin.com>"
Expand Down
2 changes: 1 addition & 1 deletion dist/css/modules/laydate/default/laydate.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/layui.js

Large diffs are not rendered by default.

35 changes: 21 additions & 14 deletions examples/all.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>完整库使用 - layui</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>完整库使用 - layui</title>

<link rel="stylesheet" href="../src/css/layui.css">
<link rel="stylesheet" href="../src/css/layui.css">

<style>
body{padding: 10px;}
</style>
<style>
body{padding: 10px;}
</style>

</head>
<body>

Expand All @@ -25,6 +26,7 @@

</textarea>


<div id="demo1"></div>
<button class="layui-btn demo" test-active="test-form">测试弹出式 Form</button>
<button class="layui-btn demo" test-active="test-use">测试是否重复加载内置组件</button>
Expand All @@ -39,7 +41,14 @@
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
内容1
<div class="layui-form">
<select name="city" lay-verify="">
<option value="">请选择一个城市</option>
<option value="010">北京</option>
<option value="021">上海</option>
<option value="0571">杭州</option>
</select>
</div>
</div>
<div class="layui-tab-item">
<div id="test2" class="demo-transfer"></div>
Expand All @@ -53,7 +62,7 @@

<script src="../dist/layui.js"></script>
<script>
;!function(){
layui.use(function(){
var $ = layui.jquery
,layer = layui.layer
,form = layui.form
Expand All @@ -62,15 +71,13 @@
,transfer = layui.transfer
,util = layui.util;

layer.ready(function(){
layer.msg('hello');
});
layer.msg('hello');

laypage.render({
elem: 'demo1'
,count: 100 //总页数
});


//测试加载非内置模块
layui.config({
Expand Down Expand Up @@ -143,7 +150,7 @@
});
}
});
}();
});
</script>
</body>
</html>
6 changes: 4 additions & 2 deletions examples/extends/mod1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

layui.define(['mod2', 'layer'], function(exports){
/**
扩展模块,且依赖 mod2
**/
layui.define('mod2', function(exports){
var $ = layui.jquery;

console.log(layui.mod2, layui.layer, layui.form)
Expand Down
9 changes: 7 additions & 2 deletions examples/extends/mod2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/**
扩展模块,只依赖内置模块
**/

layui.define(['jquery', 'form'], function(exports){
console.log(layui.$)
layui.define(function(exports){
console.log('mod2.js')

layer.alert(1)

exports('mod2', {
name: 'mod2'
Expand Down
5 changes: 3 additions & 2 deletions examples/laydate.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@
elem: '#test1' //指定元素
,type: 'datetime'
,trigger: 'click'
,lang: 'en'
//,lang: 'en'
//,theme: 'grid'
,range: true //开启日期范围,默认使用“_”分割
,value: '2021-03-27 00:00:00 - 2021-02-27 00:00:00'
//,value: '2021-03-27 00:00:00 - 2021-02-27 00:00:00'
,done: function(value, date, endDate){
console.log(value, date, endDate);
}
Expand Down
3 changes: 2 additions & 1 deletion examples/layer.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句


layer.msg('hello');
var index = layer.msg('hello');
//layer.close(index);

//触发事件
var active = {
Expand Down
5 changes: 2 additions & 3 deletions examples/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
<script>
layui.use('table', function(){
var table = layui.table;
//return;

//全局设定某参数
table.set({
Expand Down Expand Up @@ -228,7 +227,7 @@
,{field:'sex', title:'性别', width:80, edit: 'text', sort: true}
,{field:'city', title:'城市', width:120, templet: '#cityTpl1'}
,{field:'sign', title:'签名'}
,{field:'experience', title:'积分', width:80, sort: true, totalRow: true, templet: '<div>{{ d.experience }} 分</div>'}
,{field:'experience', title:'积分', width:80, sort: true, totalRow: '{{ d.TOTAL_NUMS }} 分', templet: '<div>{{ d.experience }} 分</div>'}
,{field:'ip', title:'IP', width:120}
,{field:'logins', title:'登入次数', width:100, sort: true, totalRow: true}
,{field:'joinTime', title:'加入时间', width:120}
Expand Down Expand Up @@ -319,7 +318,7 @@
break;
case 'reload':
//深度重载
table.reload('test', {
var instReload = table.reload('test', {

where: {
abc: 123
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var argv = require('minimist')(process.argv.slice(2), {
//聚合 JS 文件
alljs: function(ver){
var src = [
'./src/**/{layui,all,'+ mods +'}.js'
'./src/**/{layui,layui.all,'+ mods +'}.js'
]
,dir = destDir(ver);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "layui-src",
"realname": "layui",
"version": "2.6.2",
"version": "2.6.3",
"description": "Classic modular front-end component library",
"main": "dist/layui.js",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/css/modules/laydate/default/laydate.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
.layui-laydate-content{border-top: none 0; border-bottom: none 0;}
.layui-laydate-content th{color: #333;}
.layui-laydate-content td{color: #666;}
.layui-laydate-content td.laydate-selected{background-color: #00F7DE;}
.layui-laydate-content td.laydate-selected{background-color: #B5FFF8;}
.laydate-selected:hover{background-color: #00F7DE !important;}
.layui-laydate-content td:hover,
.layui-laydate-list li:hover{background-color: #eaeaea; color: #333;}
.layui-laydate-list li:hover{background-color: #eee; color: #333;}
.laydate-time-list li ol{margin: 0; padding: 0; border: 1px solid #e2e2e2; border-left-width: 0;}
.laydate-time-list li:first-child ol{border-left-width: 1px;}
.laydate-time-list>li:hover{background: none;}
Expand Down
Loading

0 comments on commit b0646a2

Please sign in to comment.