idux
idux copied to clipboard
feat(comp:spin): add IxSpinProvider
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?
IxSpinProvider
IxSpinProviderMethods
| 名称 | 说明 | 参数类型 | 备注 |
|---|---|---|---|
open |
打开 | (options: SpinOptions) => SpinRef |
target不传,默认为target为body |
update |
更新 | (options: SpinOptions) => void |
target不传,默认为target为body |
destroy |
销毁 | (target?: TargetType | TargetType[]) => void |
target不传,默认为target为body |
destroyAll |
销毁全部 | () => void |
- |
export type SpinOptions = Partial<
Omit<SpinProps, 'spinning'> & {
tip: string
target: string | HTMLElement | (() => string | HTMLElement)
zIndex: number
}
>
export interface SpinRef {
update: (options: SpinRefUpdateOptions) => void
destroy: () => void
}
Other information
This preview will be available after the AzureCI is passed.
Codecov Report
Merging #1199 (b2b1005) into next (da09bd5) will decrease coverage by
3.93%. The diff coverage is94.46%.
@@ Coverage Diff @@
## next #1199 +/- ##
==========================================
- Coverage 96.63% 92.69% -3.94%
==========================================
Files 317 319 +2
Lines 30953 29278 -1675
Branches 2833 2389 -444
==========================================
- Hits 29910 27139 -2771
- Misses 1043 2139 +1096
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/components/spin/src/useSpin.ts | 72.72% <72.72%> (ø) |
|
| packages/components/spin/src/SpinProvider.tsx | 95.48% <95.48%> (ø) |
|
| packages/components/spin/src/Spin.tsx | 96.81% <100.00%> (-3.19%) |
:arrow_down: |
| packages/components/spin/src/token.ts | 100.00% <100.00%> (ø) |
|
| packages/components/spin/src/types.ts | 100.00% <100.00%> (ø) |
|
| packages/pro/search/src/ProSearch.tsx | 17.41% <0.00%> (-82.59%) |
:arrow_down: |
| packages/pro/textarea/src/IndexColumn.tsx | 20.63% <0.00%> (-79.37%) |
:arrow_down: |
| packages/components/watermark/src/Watermark.tsx | 28.98% <0.00%> (-71.02%) |
:arrow_down: |
| packages/pro/form/src/ProForm.tsx | 30.26% <0.00%> (-69.74%) |
:arrow_down: |
| packages/components/time-picker/src/TimePicker.tsx | 30.52% <0.00%> (-69.48%) |
:arrow_down: |
| ... and 106 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.