-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: radio/checkbox选中判断改回正则 (#2927) * fix(table): row-edit event not trigger (#2934) * fix(statistic): fix with missing default precision (#2933) * fix(radio): 选项内容变化后样式问题修复 (#2936) fix #2930 * feat: cascader value-display (#2938) * feat: 增加 cascader 对 valueDisplay 的支持 * test: update snap * fix(pagination): when total is 0 and pageSize change, current value is 0 (#2937) * fix(tree): tree 节点禁用状态逻辑改进 (#2935) * test(tree): 完善 tree 组件的禁用示例 * fix(tree): tree 组件, 禁用状态过滤函数不再仅生效于UI层,将传递到模型侧参与状态计算 * fix(tree): tree 组件完善禁用逻辑 * fix(tree): tree 组件添加 refresh 方法刷新节点状态 * test(tree): tree 组件,完善 disabled 相关示例 * fix(tree): tree 组件,完善半选状态下的状态切换 * test(tree): tree 组件,完善操作示例,提供 disabled 状态与其他状态的整合演示 * chore(tree): tree 组件,更新 common 依赖 * test(tree): tree 组件,添加禁用状态相关测试 * chore(tree): tree 组件,更新 common 依赖,补充文档 * test(tree): tree 组件,update snapshot * fix(auto-complete): using lodash escapeRegExp transform keyword text (#2943) * fix(auto-complete): using lodash escapeRegExp transform keyword text * docs(auto-complete): update auto-complete custom filter example * chore: update contributing (#2950) * chore: update contributing * chore: update docs * fix(tree): tree 组件, value, active, expanded 属性, 支持数组操作触发视图变更 (#2951) * fix(tree): tree 组件, value, active, expanded 属性, 支持数组操作触发视图变更 * refactor(tree): tree 组件,改进属性监听代码结构 * fix(tree): tree 组件,解决 value 传递 undefined,可能导致视图操作报错的问题 * ci: add workflow for issue label (#2953) * fix(table): pagination (#2954) * fix(image-viewer): 修改键盘事件绑定对象 (#2958) * feat(Table): fix some pagination problems (#2962) * feat(table): pagination * feat: code save * fix(table): pagination * fix: row select and drag sort * docs(table): demo * feat(menu): close menu after clicking (#2963) * feat(tabs): scroll to better position when active tab is in middle (#2964) * chore: release 1.8.1 (#2965) * chore: release 1.8.1 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat(upload): uploadPastedFiles (#2966) * fix(tree): the height attribute does not work (#2968) * fix(tree): the height attribute does not work * test(tree): the height attribute does not work * chore: update publish frequency descriptions (#2969) * chore: update Publish.md * chore: fix table test * chore: update PUBLISH.md * fix(image-viewer): 滚轮缩放符合操作直觉 (#2974) 自然滚动与标准滚动对图片放大缩小的操作均符合直觉 #2825 * fix(date-range-picker): 修复12月时选择同一个月内的日期后,第一次打开面板左右月份一样的问题 (#2972) * fix(drawer): unable to close by click on escape (#2967) * chore: fix ssr error (#2985) * chore: release 1.8.2 (#2986) * chore: release 1.8.2 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: release 1.8.3 (#2988) * chore: release 1.8.3 * chore: release 1.8.3 * chore: release 1.8.3 * chore: release 1.8.3-naruto --------- Co-authored-by: liweijie0812 <[email protected]> Co-authored-by: sheepluo <[email protected]> Co-authored-by: 李江辰 <[email protected]> Co-authored-by: hkaikai <[email protected]> Co-authored-by: PY <[email protected]> Co-authored-by: betavs <[email protected]> Co-authored-by: TabSpace <[email protected]> Co-authored-by: kang <[email protected]> Co-authored-by: Y <[email protected]> Co-authored-by: sinbadmaster <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Lyan-u <[email protected]>
- Loading branch information
1 parent
1d04334
commit e92a880
Showing
63 changed files
with
3,447 additions
and
1,457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## IssueShoot | ||
- 预估时长: {{ .duration }} | ||
- 期望完成时间: {{ .deadline }} | ||
- 开发难度: {{ .level }} | ||
- 参与人数: 1 | ||
- 验收标准: 实现期望改造效果,提 PR 并通过验收无误 | ||
- 备注: 最终激励以实际提交 `pull request` 并合并为准 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: issue on label | ||
on: | ||
issues: | ||
types: ['labeled'] | ||
jobs: | ||
add-issueshoot-template: | ||
runs-on: ubuntu-latest | ||
if: contains(fromJSON('["easy", "middle", "hard"]'), github.event.label.name) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Get token | ||
id: token | ||
run: | | ||
label=${{ github.event.label.name }} | ||
if [[ $label = "easy" ]] | ||
then | ||
echo "level=低" >> $GITHUB_OUTPUT | ||
echo "duration=1" >> $GITHUB_OUTPUT | ||
deadline=$(date -d "+3 days" +'%Y-%m-%d') | ||
echo "deadline=${deadline}" >> $GITHUB_OUTPUT | ||
elif [[ $label = "middle" ]] | ||
then | ||
echo "level=中" >> $GITHUB_OUTPUT | ||
echo "duration=3" >> $GITHUB_OUTPUT | ||
deadline=$(date -d "+7 days" +'%Y-%m-%d') | ||
echo "deadline=${deadline}" >> $GITHUB_OUTPUT | ||
else | ||
echo "level=高" >> $GITHUB_OUTPUT | ||
echo "duration=5" >> $GITHUB_OUTPUT | ||
deadline=$(date -d "+10 days" +'%Y-%m-%d') | ||
echo "deadline=${deadline}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create template | ||
id: template | ||
uses: chuhlomin/[email protected] | ||
with: | ||
template: .github/issue-shoot.md | ||
vars: | | ||
level: ${{ steps.token.outputs.level }} | ||
duration: ${{ steps.token.outputs.duration }} | ||
deadline: ${{ steps.token.outputs.deadline }} | ||
- name: Update issue | ||
uses: actions-cool/issues-helper@v3 | ||
with: | ||
actions: 'update-issue' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.issue.number }} | ||
body: ${{ steps.template.outputs.result }} | ||
update-mode: 'append' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
# CONTRIBUTING | ||
|
||
`tdesign-vue` 包含 `vue` 代码和一个子仓库,子仓库指向 `tdesign-common`仓库 | ||
`tdesign-vue` 包含 `vue` 代码和一个子仓库,子仓库指向 `tdesign-common` 仓库 | ||
|
||
## 开发 | ||
|
||
### 安装依赖 | ||
建议使用 node 18 版本进行开发 | ||
|
||
### 1.初始化子仓库 | ||
|
||
```bash | ||
git submodule init && git submodule update | ||
``` | ||
|
||
### 2.安装依赖 | ||
|
||
```bash | ||
npm i | ||
``` | ||
|
||
### 本地开发 | ||
### 3.本地开发 | ||
|
||
```bash | ||
npm run start | ||
``` | ||
|
||
浏览器访问 <http://127.0.0.1:16000> | ||
完成以上 3 个步骤,浏览器访问 <http://127.0.0.1:16000> 即可调该框架的任何内容 | ||
|
||
### 目录结构 | ||
## 目录结构 | ||
|
||
```text | ||
├── script // 构建代码 | ||
|
@@ -33,7 +41,7 @@ npm run start | |
|
||
### 组件页路由配置 | ||
|
||
每一个组件页,都是一个 md 文件,参考 `/site/config/index.js` 已有定义,直接按照模板添加即可 | ||
每一个组件都有自己的路由,页面配置都是一个 markdown 文件,如`button.md`,具体路径可参考 `/site/site.config.mjs`。如果有新增组件,直接按照模板添加即可 | ||
|
||
```js | ||
{ | ||
|
@@ -43,21 +51,21 @@ npm run start | |
{ | ||
title: 'Button 按钮', | ||
name: 'button', | ||
component: () => import(`@/examples/components/button/button.md`), | ||
component: () => import(`tdesign-vue/button/button.md`), | ||
}, | ||
{ | ||
title: 'Icon 图标', | ||
name: 'icon', | ||
component: () => import(`@/examples/components/icon/icon.md`), | ||
component: () => import(`tdesign-vue/icon/icon.md`), | ||
}, | ||
... | ||
], | ||
}, | ||
``` | ||
|
||
### Markdown 文件 demo 引用 | ||
### Markdown 文件的 demo 引用 | ||
|
||
文档 demo 排列与 common 仓库中的 UI demo 展示一致 | ||
文档 demo 排列与 common 子仓库中的 UI demo 展示一致,如 button 组件页面的展示顺序,由子仓库的 docs/web/api/button.md 内的顺序决定。 | ||
|
||
```markdown | ||
{{ base }} | ||
|
@@ -66,60 +74,31 @@ npm run start | |
|
||
### Demo 调试 | ||
|
||
当一个 md 文件插入了很多个 demo 之后,一些组件生命周期方法调试起来会变得困难,若想对某个 demo 单独调试,可以访问路由:/demos/组件名/demo 名, | ||
|
||
例如:<http://127.0.0.1:16000/vue/demos/button/base> | ||
|
||
### 单元测试 & e2e 测试文档 | ||
|
||
[组件测试文档](./test/README.md) | ||
我们可以通过打开组件的路由页进行开发调试, | ||
|
||
## git | ||
如 button,则打开<http://127.0.0.1:16000/vue/components/button> 进行开发调试; | ||
|
||
### 分支 | ||
但当组件的 markdown 文件插入了很多个 demo 之后,一些组件生命周期方法调试起来会变得困难,若想对某个 demo 单独调试,可以访问路由:/demos/组件名/demo 名, | ||
|
||
主仓库遵循使用 `git flow` 规范,新组件分支从 `develop checkout`:[https://nvie.com/posts/a-successful-git-branching-model/](https://nvie.com/posts/a-successful-git-branching-model/) | ||
如:<http://127.0.0.1:16000/vue/demos/button/base> | ||
|
||
如果是贡献组件,则从 `develop checkout` 分支如:`feature/button`,记得如果同时要在子仓库开发 UI,子仓库也要 `checkout` 同名分支 | ||
|
||
> 关于 fork | ||
以下内容处理 `fork` 仓库后,远端仓库的更新如何同步到 `fork` 仓库 | ||
|
||
```bash | ||
# 建立 upstream remote | ||
git remote add upstream [email protected]:Tencent/tdesign-vue.git | ||
|
||
# 更新 upstream | ||
git fetch upstream develop | ||
|
||
# 合并 upstream develop 到本地 | ||
git checkout develop | ||
|
||
git merge upstream/develop | ||
``` | ||
|
||
## 提交说明 | ||
|
||
项目使用基于 angular 提交规范:[https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) | ||
|
||
每次提交会自动触发提交验证 | ||
### 单元测试 & e2e 测试文档 | ||
|
||
- 使用工具 commitizen 协助规范 git commit 信息 | ||
- fix & feat 的提交会被用来生成 changelog | ||
- 提交会触发 git pre-commit 检查,修复提示的 eslint 错误, | ||
[组件测试文档](./test/README.md) | ||
|
||
## 公共子仓库 tdesign-common | ||
## 子仓库 tdesign-common | ||
|
||
本项目以子仓库的形式引入 `tdesign-common` 公共仓库,对应 `src/\_common` 文件夹 | ||
TDesign 的项目都会以子仓库的形式引入 `tdesign-common` 公共仓库,对应 `src/\_common` 文件夹, | ||
公共仓库中包含 | ||
|
||
- 一些公共的工具函数 | ||
- 组件库 `UI` 开发内容,既 `html` 结构和 `css` 样式(React/Vue 共用) | ||
- 部分组件的一些框架无关的公共的工具函数 | ||
- `组件库UI`,既 `html` 结构和 `css` 样式(多框架共用) | ||
|
||
大部分的功能和改动都只需要调整主仓库的代码即可,但涉及部分公共函数、样式或者部分文档的调整,需要改动子仓库的代码。 | ||
|
||
### 初始化子仓库 | ||
|
||
- 初次克隆代码后需要初始化子仓库: `git submodule init && git submodule update` | ||
- 如开发部分提到的,初次克隆代码后需要初始化子仓库: `git submodule init && git submodule update` | ||
- git submodule update 之后子仓库不指向任何分支,只是一个指向某一个提交的游离状态 | ||
|
||
### 子仓库开发 | ||
|
@@ -129,9 +108,10 @@ git merge upstream/develop | |
- 先进入 `src/\_common` 文件夹,正常将样式修改添加提交 | ||
- 回到主仓库,此时应该会看到 `src/\_common` 文件夹是修改状态,按照正常步骤添加提交即可 | ||
|
||
## 关于组件库 UI | ||
### 组件库 UI | ||
|
||
UI 开发(HTML & CSS)是多个框架共用的,比如 React-web/Vue-web/Vue-next web。各个框架组件实现应该要复用 UI 开发的 html 结构,引用其组件 CSS 与 Demo CSS(本仓库已在入口处引用了),UI 开发一般可由单独的 UI 开发同学认领完成或各框架组件开发同学的其中一名同学完成 | ||
UI 是多个框架共用的,比如 PC 端的 react/vue/vue-next 都是复用子仓库的 UI 代码。 | ||
各个框架组件实现应该要复用 UI 开发的 html 结构,引用其组件 CSS 与 Demo CSS(本仓库已在入口处引用了),UI 开发一般可由单独的 UI 开发同学认领完成或各框架组件开发同学的其中一名同学完成 | ||
|
||
- 如果开发前已有某个组件的 UI 开发内容,直接在主仓库使用即可 | ||
- 如果没有,且你也负责 UI 开发:参考 UI 开发规范完成 UI 开发内容、然后再开发主仓库组件 | ||
|
@@ -151,24 +131,51 @@ UI 开发(HTML & CSS)是多个框架共用的,比如 React-web/Vue-web/Vue | |
import './button.less'; | ||
``` | ||
|
||
## 开发规范 | ||
## 分支规范 | ||
|
||
### 分支 | ||
|
||
遵循使用 `git flow` 规范,新组件分支从 `develop checkout`:[https://nvie.com/posts/a-successful-git-branching-model/](https://nvie.com/posts/a-successful-git-branching-model/) | ||
|
||
UI 开发规范参考子仓库 README [子仓库 README](https://github.com/Tencent/tdesign-common/blob/main/style/web/README.md) | ||
如果是贡献组件,则从 `develop checkout` 分支如:`feature/button`,记得如果同时要在子仓库开发 UI,子仓库也要 `checkout` 同名分支 | ||
|
||
### 新建组件 | ||
> 关于 fork | ||
```shell | ||
npm run generate:component | ||
以下内容处理 `fork` 仓库后,远端仓库的更新如何同步到 `fork` 仓库 | ||
|
||
```bash | ||
# 建立 upstream remote | ||
git remote add upstream [email protected]:Tencent/tdesign-vue.git | ||
|
||
# 更新 upstream | ||
git fetch upstream develop | ||
|
||
# 合并 upstream develop 到本地 | ||
git checkout develop | ||
|
||
git merge upstream/develop | ||
``` | ||
|
||
### 提交说明 | ||
|
||
项目使用基于 angular 提交规范:[https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) | ||
|
||
每次提交会自动触发提交验证 | ||
|
||
- 使用工具 commitizen 协助规范 git commit 信息 | ||
- fix & feat 的提交会被用来生成 changelog | ||
- 提交会触发 git pre-commit 检查,修复提示的 eslint 错误, | ||
|
||
## 开发规范 | ||
|
||
### API 规范 | ||
|
||
API 由 API 平台统一管理生成 https://github.com/tdesignoteam/tdesign-api | ||
API 由 API 平台统一管理生成,如果涉及组件文档的改动(如`src/button/type.ts`的内容),都需要同时在 API 平台提交 PR,进行统一维护管理 https://github.com/tdesignoteam/tdesign-api | ||
|
||
### 前缀 | ||
### 前缀规范 | ||
|
||
组件和 `CSS` 前缀以 `t-` 开头,无论 `js` 还是 `css` 都使用变量定义前缀,方便后续替换 | ||
|
||
### CSS | ||
### CSS 规范 | ||
|
||
组件样式在 `common` 子仓库开发,遵循 [tdesign-common 仓库 UI 开发规范](https://github.com/Tencent/tdesign-common/blob/main/style/web/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule _common
updated
22 files
+4 −0 | docs/web/api/card.en-US.md | |
+5 −0 | docs/web/api/card.md | |
+4 −0 | docs/web/api/date-picker.en-US.md | |
+4 −0 | docs/web/api/date-picker.md | |
+6 −0 | docs/web/api/time-picker.en-US.md | |
+6 −0 | docs/web/api/time-picker.md | |
+1 −0 | js/color-picker/color.ts | |
+9 −8 | js/common.ts | |
+11 −7 | js/date-picker/utils.ts | |
+10 −0 | js/statistic/utils.ts | |
+19 −9 | js/tree/tree-node-model.ts | |
+174 −49 | js/tree/tree-node.ts | |
+2 −0 | js/tree/tree-store.ts | |
+9 −1 | js/tree/types.ts | |
+1 −0 | style/mobile/components/side-bar/v2/_index.less | |
+7 −34 | style/web/components/dropdown/_index.less | |
+4 −0 | style/web/components/input/_mixin.less | |
+6 −1 | style/web/components/tag-input/_index.less | |
+1 −0 | style/web/components/tag/_index.less | |
+0 −1 | style/web/components/upload/_index.less | |
+86 −0 | test/unit/tree/checkable.test.js | |
+226 −20 | test/unit/tree/disabled.test.js |
Oops, something went wrong.