Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(time-picker): add actions prop #463

Merged
merged 8 commits into from
Jul 23, 2021

Conversation

Volankey
Copy link
Collaborator

@Volankey Volankey commented Jul 9, 2021

Fix #401

@vercel
Copy link

vercel bot commented Jul 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/H7LGGoU6ToDYETDMtJZVvAMhpXiA
✅ Preview: https://naive-ui-git-fork-volankey-time-picker-actions-tusimple.vercel.app

@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #463 (3860d18) into main (9570c56) will decrease coverage by 0.59%.
The diff coverage is 0.00%.

❗ Current head 3860d18 differs from pull request most recent head 88ea41a. Consider uploading reports for the commit 88ea41a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
- Coverage   37.75%   37.15%   -0.60%     
==========================================
  Files         507      507              
  Lines       12246    12204      -42     
  Branches     3394     3367      -27     
==========================================
- Hits         4623     4534      -89     
- Misses       6752     6806      +54     
+ Partials      871      864       -7     
Impacted Files Coverage Δ
src/time-picker/src/Panel.tsx 0.00% <0.00%> (ø)
src/time-picker/src/TimePicker.tsx 23.83% <ø> (ø)
src/list/src/ListItem.tsx 0.00% <0.00%> (-66.67%) ⬇️
src/_utils/vue/get-v-node-children.ts 0.00% <0.00%> (-66.67%) ⬇️
src/descriptions/src/Descriptions.tsx 29.41% <0.00%> (-57.13%) ⬇️
src/descriptions/src/utils.ts 25.00% <0.00%> (-25.00%) ⬇️
src/list/src/List.tsx 76.92% <0.00%> (-23.08%) ⬇️
src/menu/src/MenuOptionContent.tsx 69.23% <0.00%> (-16.49%) ⬇️
src/dialog/src/DialogEnvironment.tsx 22.22% <0.00%> (-13.27%) ⬇️
src/modal/src/Modal.tsx 24.63% <0.00%> (-4.53%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9570c56...88ea41a. Read the comment docs.

Comment on lines 3 to 15
## Pending

### Feats

- `n-time-picker` add `actions` prop, closes [#401](https://github.com/TuSimple/naive-ui/issues/401).

## 2.15.4 (2021-07-09)

### Feats

- `n-steps` add icon customization in `'finish'` and `'error'` status.
- `n-tree` exports `TreeDragInfo` & `TreeDropInfo` type.
- `n-empty` export `icon` slot.
- `useDialog` option add `maskClosable` prop, closes [#420](https://github.com/TuSimple/naive-ui/issues/420).
- `n-time-picker` add `actions` prop, closes [#401](https://github.com/TuSimple/naive-ui/issues/401).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我记得我提交后还看了一遍竟然没发现这个问题🥲

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这还是没解决啊😂


### Feats

- `n-time-picker` 增加 `actions` 属性, 关闭 [#401](https://github.com/TuSimple/naive-ui/issues/401).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `n-time-picker` 增加 `actions` 属性, 关闭 [#401](https://github.com/TuSimple/naive-ui/issues/401).
- `n-time-picker` 增加 `actions` 属性, 关闭 [#401](https://github.com/TuSimple/naive-ui/issues/401)

@@ -15,6 +15,7 @@ format

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| actions | `Array<'now'> \| null` | `['now']` | Operations supported in Time Picker. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把 confirm 也加进来,未来可能更新 updateValueOnClose,如果现在让用户传了 null 未来更新两个按钮就一起没了。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那现在就是允许让用户传入confirm但是并没有什么用吗,我当时也想了要不要加confirm,我觉得加了的话就得做update- on-close 那我这周末再把这个也做了吧

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是加上吧,updateValueOnClose 倒是不着急,关键是为了未来的 API 考虑,这个 null 就是表示什么都不加。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不加 confirm 的话以后不好控制

CHANGELOG.zh-CN.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow to remove the now button from n-time-picker
3 participants