release: v2.9.2

pull/1464/head^2 v2.9.2
贤心 2023-12-17 16:26:05 +08:00 committed by GitHub
commit b998f239f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 215 additions and 139 deletions

View File

@ -1,67 +0,0 @@
name: 😇 问题反馈
description: 使用 Layui 过程中遇到的 Bug、异常或其他困惑。
body:
- type: markdown
attributes:
value: |
**系统提示**:此处只接受 Layui 相关技术问题,其他如 layuiAdmin 或 LayIM 等主题相关问题请勿在此反馈。
- type: checkboxes
attributes:
label: 议题条件
options:
- label: 我确认已查看官方使用文档:**https://layui.dev** ,但没有找到相关解决方案。
required: true
- label: 我确认已在 **Issues** 中搜索过类似的问题,但没有找到相关解决方案。
required: true
- type: input
attributes:
label: 版本号
placeholder: 请提供您当前使用的 Layui 版本号
description: 若不清楚,可打开 `layui.js`,头部注释有对应的版本号
validations:
required: true
- type: input
attributes:
label: 浏览器
placeholder: Chrome x.x.x.x正式版本64 位)
validations:
required: true
- type: dropdown
id: type
attributes:
label: 问题类型
options:
- 疑是 BUG
- 报错提示
- 功能困惑
validations:
required: true
- type: textarea
attributes:
label: 问题描述
placeholder: 请提供详细的问题描述和操作步骤等信息,以便我们也能够更轻松地将问题复现。
validations:
required: true
- type: textarea
attributes:
label: 业务代码
description: 直接粘贴问题对应的 `HTML,CSS,JavaScript` 等代码到下面的文本框,无需书写 `Markdown`
placeholder: 请提供与该问题对应的业务代码片段,以便我们更好地排查问题。
render: auto
validations:
required: true
- type: textarea
attributes:
label: 截图补充
placeholder: 如上述仍然无法准确地表述问题,可提供必要的截图(可直接粘贴上传)
- type: input
attributes:
label: 演示地址
description: 若能提供 Stackblitz, CodePen 或自主搭建的页面演示地址,将更有助于解决问题
placeholder: URL
- type: checkboxes
attributes:
label: 友好承诺
options:
- label: 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
required: true

View File

@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 😄 创建议题
url: https://github.com/layui/layui/issues/new?template=bug.yml
about: 为了加强 Issue 规范、提升沟通效率Layui Issues 已统一在 Github 受理
- name: 📄 官方文档
url: https://layui.dev/
about: 建议在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。

View File

@ -1,59 +1,56 @@
name: 😇 问题反馈
description: 使用 Layui 过程中遇到的 Bug、异常或其他困惑
name: 😄 创建议题
description: 此处只受理 Bug 报告、功能请求。若是其他业务相关的问题建议在 Discussions 寻求社区帮助
body:
- type: markdown
attributes:
value: |
**系统提示**:此处只接受 Layui 相关技术问题,其他如 layuiAdmin 或 LayIM 等主题相关问题请勿在此反馈。
- type: checkboxes
attributes:
label: 议题条件
description: 在你开始之前,请花几分钟时间确保你已如实完成以下工作,以便让我们更高效地沟通。
options:
- label: 我确认已查看官方使用文档:**https://layui.dev** ,但没有找到相关解决方案。
- label: 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
required: true
- label: 我确认已在 **Issues** 中搜索过类似的问题,但没有找到相关解决方案。
- label: 我确认已在 [Issues](https://github.com/layui/layui/issues?q=is%3Aissue ) 中搜索过类似的问题,但没有找到相关解决方案。
required: true
- label: 我已仔细阅读: 🍀[ Layui Issue 规范指南](https://github.com/layui/layui/blob/main/CONTRIBUTING.md)
required: true
- type: input
attributes:
label: 版本号
placeholder: 请提供您当前使用的 Layui 版本号
description: 若不清楚,可打开 `layui.js`,头部注释有对应的版本号
validations:
required: true
- type: input
attributes:
label: 浏览器
placeholder: Chrome x.x.x.x正式版本64 位)
validations:
required: true
- type: dropdown
id: type
attributes:
label: 题类型
label: 议题类型
options:
- 疑是 BUG
- 报错提示
- 功能困惑
- 功能请求
validations:
required: true
- type: input
attributes:
label: 使用版本
description: 请提供您当前使用的 Layui 版本号。若不清楚,可打开 `layui.js` 查看头部注释。
placeholder: v2.8.18
validations:
required: true
- type: textarea
attributes:
label: 问题描述
placeholder: 请提供详细的问题描述和操作步骤等信息,以便我们也能够更轻松地将问题复现。
description: 请提供详细的问题描述和操作步骤等信息,以便我们也能够更轻松地将问题复现。
validations:
required: true
- type: textarea
attributes:
label: 业务代码
description: 直接粘贴问题对应的 `HTML,CSS,JavaScript` 等代码到下面的文本框,无需书写 `Markdown`
placeholder: 请提供与该问题对应的业务代码片段,以便我们更好地排查问题。
description: 请提供与该问题对应的业务代码片段,以便我们更好地排查问题。此处直接粘贴代码到文本框即可,无需书写 `Markdown`
render: auto
validations:
required: true
- type: textarea
attributes:
label: 截图补充
placeholder: 如上述仍然无法准确地表述问题,可提供必要的截图(可直接粘贴上传)
description: 如上述仍然无法准确地表述问题,可提供必要的截图(可直接粘贴上传)
- type: input
attributes:
label: 浏览器
placeholder: Chrome x.x.x.x正式版本64 位)
validations:
required: true
- type: input
attributes:
label: 演示地址

View File

@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: 📄 官方文档
url: https://layui.dev/
about: 建议在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
about: 在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
- name: 🔎 Gitee Issues
url: https://gitee.com/layui/layui/issues
about: 过往的 6000+ Issues 中搜索相似议题,主要适用于 2.x 版本
about: Gitee 平台的 6000+ Issues 中搜索相似议题,找到可供参考的解决方案。适用于 2.x 版本。

131
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,131 @@
# Contributor Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@ -1,21 +1,45 @@
# 🍀 提 Issue 的正确方式
# 🍀 Layui Issue 规范指南
## 自助
为了提升沟通效率,请花几分钟时间仔细阅读本文档。遵循这些指南有助于表达您尊重管理和开发这个开源项目的贡献者。作为回报,他们也会以同样的尊重来处理或评估您的问题和功能请求。
创建 Issue 前,为了避免议题重复而造成大家不必要的消耗,您可以先尝试通过以下渠道寻找解决方案:
### 创建 Issue
- 仔细查看 Layui 官方文档大部分问题都能通过文档找到答案https://layui.dev
- 在 Issues 中搜索类似问题,基本上都有相关回复
Layui 的 issue 只受理 「Bug 报告」和「新功能请求」。如果是关于如何使用、功能疑惑或其他业务相关的问题建议在 Discussions 寻找社区帮助。若 issue 不符合规定或违背社区行为准则,它将会被立即关闭。
## 创建
**在正式创建 Issue 之前,您应当确保已完成以下前置工作**
若上述渠道未能找到解决方案,那么创建 Issue 时,**请按照表单模板规范逐一填写**。
其中,标题应尽量言简意赅(一句话概括议题),其他表单项则尽量将您所遇到的问题描述详细。
- 仔细查看 Layui 官方文档和每个版本的更新日志https://layui.dev
- 在 Issues 中搜索相似问题,找到解决方案,但应避免在旧的 Issue 中留言。
- 通过其他技术社区搜索相关资料、或充分利用当前主流的人工智能大模型
> **若 Issue 未遵循模板规范仔细填写,可能将无法获得相关回答,敬请知晓和理解**
> 更多细节可参考1. [**提问的智慧**](https://github.com/tvvocold/How-To-Ask-Questions-The-Smart-Way)、2. [**请提供最小重现**](https://antfu.me/posts/why-reproductions-are-required-zh)
**为什么要有严格的 issue 规定**
## 对接
维护开源项目是一项艰辛的工作,它崇高而又略显卑微。加上 Layui 的使用门槛相对较低随着受众的广为推崇我们每天疲于应对各种技术反馈包括bug 报告,功能需求和 Pull Requests。
- 在 Issue 交流过程中,若议题已经得到解决,或 Issue 并非项目相关问题,请在 Issue 右上角将状态设置为:已完成
- 大家本着相互尊重、理解和友善的态度进行交流,共同维护好 Layui 来之不易的良好的社区氛围。谢谢
作为一个免费使用的开源项目Layui 的维护人手是有限的。这意味着想要让项目可持续发展,我们必须:
1. 给予更具体的工作、更高的优先级(如 bug 修复和新功能的开发);
2. 提高 issue 处理的效率。
针对 (1),我们决定将 GitHub issue 严格地限制在有具体目标和内容的工作。问题和讨论应当发送到更适合它们的场合。比如关于「如何使用」,建议发到 Layui 讨论区,或者把它细化成更具体的 Bug 和 Feature Request。这两者的区别是「如何使用」是一个未经思考和调研的问句而 Bug 和 Feature Request 需要提问者进一步明确这是一个缺陷或者未支持的特性。
针对 (2),我们发现影响 issue 处理效率最大两点因素是a) 用户开 issue 之前并没有做好前置工作,这导致大量重复且初级的 issue 不断出现b) 用户开 issue 时没有提供足够有效的信息,这导致我们需要花费大量的时间去跟用户来回沟通,只为了获得一些基本信息好让我们对 issue 进行真正的分析。因此,为了减少不必要的资源消耗,严格要求 Issue 规定是迫切和必要的。尤其对于 Layui 核心维护者,应当让他们的主要精力投入到项目更重要的工作中去。
**最重要的是请明白一件事开源项目的用户和维护者之间并不是甲方和乙方的关系issue 也不是客服。在开 issue 的时候,请抱着「一起合作来解决这个问题」的心态,避免期待社区单方面地为你服务。**
> 以上概述借鉴了 Ant Design 社区的成熟经验,并做了适用于 Layui 社区的相关修改。
### 正式创建 issue
当您已对上述事项充分阅读并理解,在正式创建过程中,您应当遵循 Issue 提供表达规范仔细填写,尽可能将您所遇到的 Bug 或 Feature Request 描述详细。
### 创建 issue 之后
- 在 issue 交流过程中,若议题已经得到解决,请主动关闭 issue。
- 大家应本着相互尊重、理解和友善的态度,共同维护 Layui 来之不易的良好的社区氛围,谢谢 💖。
### 其他参考资料
1. [**贡献者行为准则**](CODE_OF_CONDUCT.md)
2. [**提问的智慧**](https://github.com/tvvocold/How-To-Ask-Questions-The-Smart-Way) @tvvocold
3. [**为什么需要最小重现**](https://antfu.me/posts/why-reproductions-are-required-zh) @antfu

View File

@ -9,7 +9,7 @@ currently being supported with security updates.
| ------- | ------------------ |
| 2.9.x | :white_check_mark: |
| 2.8.x | :white_check_mark: |
| < 2.8.0 | :x: |
| < 2.8.0 | :x: |
## Reporting a Vulnerability

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

2
dist/layui.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -9,14 +9,17 @@ toc: true
<h2 id="2.9.x" lay-toc="{title: '2.9.x'}"></h2>
<h2 id="v2.9.2-rc.2" class="ws-anchor">
v2.9.2-rc.2
<h2 id="v2.9.2" class="ws-anchor">
v2.9.2
<!-- <span class="layui-badge-rim" style="color: #16b777;">稳定版</span> -->
<span class="layui-badge-rim">2023-12-16</span>
<span class="layui-badge-rim">2023-12-18</span>
</h2>
`2.9.x` 是对 `2.8.18` 的进一步完善,旨在打造一个可长期用于生产环境的稳定版本。对 `2.8.x` 向下兼容,可覆盖升级。
- #### 移动端的改进
- 新增 slider, layer, carousel, laydate, rate, colorpicker 手势操作支持 #1446 @Sight-wcg
- 新增 `slider,layer,carousel,laydate,rate,colorpicker` 手势操作支持 #1446 @Sight-wcg
- 新增 `lay` 模块中针对手势操作的多个基础方法 #1446 @Sight-wcg
- #### table
- 修复 IE 下的报错问题 #1453 @Sight-wcg
- #### form
@ -24,7 +27,7 @@ toc: true
- #### dropdown
- 增强 `delay` 选项,支持设置 显示/隐藏 的延迟时间 #1454 @Sight-wcg
### 下载: [layui-v2.9.2-rc.2.zip](https://gitee.com/layui/layui/attach_files/1615403/download)
### 下载: [layui-v2.9.2.zip](https://gitee.com/layui/layui/attach_files/1615568/download)
---
@ -33,8 +36,6 @@ toc: true
<span class="layui-badge-rim">2023-12-11</span>
</h2>
`2.9.x` 是对 `2.8.18` 的进一步完善,旨在打造一个可长期用于生产环境的稳定版本。对 `2.8.x` 向下兼容,可覆盖升级。
- #### table
- 增强 `height` 选项,支持函数 #1437 @Sight-wcg
- 增强 `table.setRowChecked()` 方法,支持批量选中 [7c12ddf]

View File

@ -4,13 +4,10 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>完整库使用 - layui</title>
<link rel="stylesheet" href="../dist/css/layui.css">
<style>
body{padding: 10px;}
</style>
</head>
<body>

View File

@ -2,21 +2,11 @@
<html>
<head>
<meta charset="utf-8">
<title>按钮 - layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<title>按钮 - layui</title>
<link rel="stylesheet" href="../src/css/layui.css">
<style>
body{padding: 10px;}
</style>
</head>
<body>
<body class="layui-padding-3">
<div class="layui-container">
<span>按钮色系:</span>

View File

@ -97,7 +97,7 @@ exports.cp = gulp.series(() => del(copyDest), () => {
// 复制 css js
gulp.src(`${src}.{css,js}`)
.pipe(replace(/\n\/(\*|\/)\#[\s\S]+$/, '')) // 过滤 cssjs 的 map 特定注释
.pipe(replace(/\n\/(\*|\/)\#[\s\S]+$/, '')) // 过滤 css,js 的 map 特定注释
.pipe(gulp.dest(copyDest));
// 复制其他文件
@ -105,7 +105,7 @@ exports.cp = gulp.series(() => del(copyDest), () => {
src,
`!${src}.{css,js,map}` // 过滤 map 文件
])
.pipe(replace(/\n\/(\*|\/)\#[\s\S]+$/, '')) // 过滤 cssjs 的 map 特定注释
.pipe(replace(/\n\/(\*|\/)\#[\s\S]+$/, '')) // 过滤 css,js 的 map 特定注释
.pipe(gulp.dest(copyDest));
});

View File

@ -1,6 +1,6 @@
{
"name": "layui",
"version": "2.9.2-rc.2",
"version": "2.9.2",
"description": "Classic modular Front-End UI library",
"keywords": [
"layui",

View File

@ -16,7 +16,7 @@
};
var Layui = function(){
this.v = '2.9.2-rc.2'; // Layui 版本号
this.v = '2.9.2'; // Layui 版本号
};
// 识别预先可能定义的指定全局对象