mirror of https://github.com/layui/layui
Merge branch '2.x' of github.com:layui/layui into 2.x
commit
ba066ed776
|
@ -65,6 +65,9 @@ Layui 是一套开源的 Web UI 组件库,采用自身轻量级模块化规范
|
||||||
## 项目参与
|
## 项目参与
|
||||||
[项目参与者](https://github.com/layui/layui/graphs/contributors)
|
[项目参与者](https://github.com/layui/layui/graphs/contributors)
|
||||||
|
|
||||||
|
## 在 Cloud IDE 中预览
|
||||||
|
[https://idegithub.com/layui/layui](https://idegithub.com/layui/layui)
|
||||||
|
|
||||||
## 破旧立新 🌱
|
## 破旧立新 🌱
|
||||||
Layui 原官网已于2021年10月13日下线。详见:
|
Layui 原官网已于2021年10月13日下线。详见:
|
||||||
> 1. <a href="https://unpkg.com/outeres@0.0.7/img/layui/notice-2021.png" target="_blank">Layui 原官网下线公告</a> 2. <a href="https://www.zhihu.com/question/488668647/answer/2159962082" target="_blank">Layui 原官网为什么要下线?</a>
|
> 1. <a href="https://unpkg.com/outeres@0.0.7/img/layui/notice-2021.png" target="_blank">Layui 原官网下线公告</a> 2. <a href="https://www.zhihu.com/question/488668647/answer/2159962082" target="_blank">Layui 原官网为什么要下线?</a>
|
||||||
|
@ -72,4 +75,4 @@ Layui 原官网已于2021年10月13日下线。详见:
|
||||||
---
|
---
|
||||||
|
|
||||||
鉴于 Layui 相对庞大的受众群体,从此 Github 和 Gitee 平台将支撑起 Layui 的后续。<br>
|
鉴于 Layui 相对庞大的受众群体,从此 Github 和 Gitee 平台将支撑起 Layui 的后续。<br>
|
||||||
**Layui 将继续陪伴着所有为之热爱的人们,共同去探索和论证「Layui 开发模式的可行性」**
|
**Layui 将继续陪伴着所有为之热爱的人们,共同去探索和论证「Layui 开发模式的可行性」**
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
# preview.yml
|
||||||
|
autoOpen: true # 打开工作空间时是否自动开启所有应用的预览
|
||||||
|
apps:
|
||||||
|
- port: 3000 # 应用的端口
|
||||||
|
run: # 应用的启动命令
|
||||||
|
command: # 使用此命令启动服务,且不执行run
|
||||||
|
preview: /examples/all.html # 预览文件
|
||||||
|
root: ./ # 应用的启动目录
|
||||||
|
name: layui # 应用名称
|
||||||
|
description: Classic modular Front-End UI library # 应用描述
|
||||||
|
autoOpen: true # 打开工作空间时是否自动开启预览(优先级高于根级 autoOpen)
|
|
@ -1715,7 +1715,8 @@
|
||||||
if(td.hasClass(DISABLED)) return;
|
if(td.hasClass(DISABLED)) return;
|
||||||
|
|
||||||
var that = this
|
var that = this
|
||||||
,options = that.config;
|
,options = that.config
|
||||||
|
,panelIndex = index; // 记录点击的是哪一个面板的
|
||||||
|
|
||||||
if (that.rangeLinked) {
|
if (that.rangeLinked) {
|
||||||
if (that.endState || !that.startDate) {
|
if (that.endState || !that.startDate) {
|
||||||
|
@ -1780,7 +1781,7 @@
|
||||||
if (that.endState && that.autoCalendarModel.auto) {
|
if (that.endState && that.autoCalendarModel.auto) {
|
||||||
isChange = that.autoCalendarModel();
|
isChange = that.autoCalendarModel();
|
||||||
}
|
}
|
||||||
if (that.rangeLinked && that.endState && that.newDate(that.startDate) > that.newDate(that.endDate)) {
|
if ((isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate)) {
|
||||||
var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;
|
var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;
|
||||||
// 判断是否反选
|
// 判断是否反选
|
||||||
var startDate = that.startDate;
|
var startDate = that.startDate;
|
||||||
|
@ -1795,7 +1796,21 @@
|
||||||
}
|
}
|
||||||
isChange && (options.dateTime = lay.extend({}, that.startDate));
|
isChange && (options.dateTime = lay.extend({}, that.startDate));
|
||||||
}
|
}
|
||||||
that.calendar(null, that.rangeLinked ? null : index, isChange || that.rangeLinked ? 'init' : null).done(null, 'change');
|
if (that.rangeLinked) {
|
||||||
|
var dateTimeTemp = lay.extend({}, dateTime);
|
||||||
|
if (panelIndex && !index && !isChange) { // 处理可能出现的联动面板中点击右面板但是判定为开始日期这个时候点击头部的切换上下月第一次没有反应的问题
|
||||||
|
// 选择了右面板但是判断之后作为开始时间
|
||||||
|
var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');
|
||||||
|
lay.extend(options.dateTime, {
|
||||||
|
year: YM[0]
|
||||||
|
,month: YM[1]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
that.calendar(dateTimeTemp, panelIndex, isChange ? 'init' : null);
|
||||||
|
} else {
|
||||||
|
that.calendar(null, index, isChange ? 'init' : null);
|
||||||
|
}
|
||||||
|
that.endState && that.done(null, 'change');
|
||||||
} else if(options.position === 'static'){ //直接嵌套的选中
|
} else if(options.position === 'static'){ //直接嵌套的选中
|
||||||
that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调
|
that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调
|
||||||
} else if(options.type === 'date'){
|
} else if(options.type === 'date'){
|
||||||
|
|
Loading…
Reference in New Issue