mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
fix(form-item): feedback animation not triggered when it existed at first.
This commit is contained in:
parent
37feb27e98
commit
9c8380854f
@ -7,8 +7,7 @@
|
||||
[`n-form-item--${syntheticLabelPlacement}-labelled`]: syntheticLabelPlacement,
|
||||
[`n-form-item--${syntheticLabelAlign}-label-aligned`]: syntheticLabelAlign,
|
||||
[`n-form-item--required`]: syntheticRequired && syntheticShowRequireMark,
|
||||
[`n-form-item--no-label`]: !(label || $scopedSlots.label),
|
||||
[`n-form-item--has-feedback`]: hasFeedback
|
||||
[`n-form-item--no-label`]: !(label || $scopedSlots.label)
|
||||
}"
|
||||
>
|
||||
<label
|
||||
@ -184,7 +183,6 @@ export default {
|
||||
return {
|
||||
explains: [],
|
||||
validationErrored: false,
|
||||
hasFeedback: false,
|
||||
feedbackTransitionDisabled: true
|
||||
}
|
||||
},
|
||||
@ -283,6 +281,9 @@ export default {
|
||||
this._initData()
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.feedbackTransitionDisabled = false
|
||||
},
|
||||
created () {
|
||||
/**
|
||||
* This is buggy!
|
||||
@ -295,7 +296,6 @@ export default {
|
||||
_initData () {
|
||||
this.explains = []
|
||||
this.validationErrored = false
|
||||
this.hasFeedback = false
|
||||
this.disableFeedbackTransition()
|
||||
},
|
||||
handleBeforeLeave (feedback) {
|
||||
@ -443,10 +443,8 @@ export default {
|
||||
},
|
||||
handleBeforeEnter () {
|
||||
this.feedbackTransitionDisabled = false
|
||||
this.hasFeedback = true
|
||||
},
|
||||
handleAfterLeave () {
|
||||
this.hasFeedback = false
|
||||
this.feedbackTransitionDisabled = false
|
||||
}
|
||||
}
|
||||
|
@ -105,9 +105,6 @@ $form-item-label-height: (
|
||||
}
|
||||
}
|
||||
}
|
||||
@include m(has-feedback) {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
@include b(form-item-blank) {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
|
Loading…
Reference in New Issue
Block a user