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(comp:modal): add draggable props (#905) #966

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

tuchg
Copy link
Contributor

@tuchg tuchg commented Jun 20, 2022

feat(cdk:drag-drop): add handle&reset api

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

Other information

@idux-bot
Copy link

idux-bot bot commented Jun 20, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #966 (00f8737) into main (437a6ce) will decrease coverage by 0.09%.
The diff coverage is 83.22%.

@@            Coverage Diff             @@
##             main     #966      +/-   ##
==========================================
- Coverage   92.89%   92.79%   -0.10%     
==========================================
  Files         700      703       +3     
  Lines       68541    68808     +267     
  Branches     8025     8039      +14     
==========================================
+ Hits        63668    63848     +180     
- Misses       4873     4960      +87     
Impacted Files Coverage Δ
...ages/cdk/drag-drop/src/composables/useDroppable.ts 25.40% <0.00%> (ø)
...es/cdk/drag-drop/src/composables/withDragHandle.ts 84.37% <84.37%> (ø)
...ages/cdk/drag-drop/src/composables/useDraggable.ts 92.00% <93.84%> (+2.48%) ⬆️
...ages/cdk/drag-drop/src/composables/withDragFree.ts 100.00% <100.00%> (ø)
packages/components/modal/src/ModalWrapper.tsx 82.64% <100.00%> (+1.56%) ⬆️
packages/components/modal/src/types.ts 100.00% <100.00%> (ø)
packages/cdk/drag-drop/index.ts 96.00% <0.00%> (ø)
packages/cdk/drag-drop/src/utils.ts 96.87% <0.00%> (+6.25%) ⬆️
... and 1 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 437a6ce...00f8737. Read the comment docs.

@tuchg tuchg linked an issue Jun 20, 2022 that may be closed by this pull request
1 task
@danranVm danranVm marked this pull request as ready for review June 21, 2022 01:09
@tuchg tuchg requested a review from danranVm June 21, 2022 01:54
sourceElement.setAttribute('draggable', 'true')
sourceElement.classList.add('cdk-draggable')

!options?.handle && sourceElement.classList.add('cdk-draggable')
Copy link
Member

Choose a reason for hiding this comment

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

其实我感觉这里干脆去掉吧,这种 composable 尽可能更加纯粹些,少一些 dom 相关的操作吧。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

由用户去定义吗

packages/cdk/drag-drop/src/composables/withDragHandle.ts Outdated Show resolved Hide resolved
packages/components/modal/src/ModalWrapper.tsx Outdated Show resolved Hide resolved
feat(cdk:drag-drop): add handle&reset api
@danranVm danranVm merged commit d81b99f into IDuxFE:main Jun 22, 2022
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.

[comp:modal] modal弹窗支持全屏拖动
2 participants