mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
fix(steps): transition not disabled when mounted
This commit is contained in:
parent
2ffe26881a
commit
29d135faee
@ -43,13 +43,24 @@ export default {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
transitionDisabled: true
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick().then(() => {
|
||||
this.transitionDisabled = false
|
||||
})
|
||||
},
|
||||
render (h) {
|
||||
return h('div', {
|
||||
staticClass: 'n-steps',
|
||||
class: {
|
||||
[`n-${this.syntheticTheme}-theme`]: this.syntheticTheme,
|
||||
[`n-steps--${this.size}-size`]: true,
|
||||
'n-steps--vertical': this.vertical
|
||||
'n-steps--vertical': this.vertical,
|
||||
'n-steps--transition-disabled': this.transitionDisabled
|
||||
}
|
||||
}, stepsWithIndex({ ...this.$props }, this.$slots.default))
|
||||
}
|
||||
|
@ -134,7 +134,7 @@
|
||||
}
|
||||
@include m(transition-disabled) {
|
||||
@include b(radio-button) {
|
||||
transition: none;
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
height: 28px;
|
||||
|
@ -80,7 +80,9 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@include b(step-splitor) {
|
||||
transition: color .3s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier;
|
||||
transition:
|
||||
color .3s $--n-ease-in-out-cubic-bezier,
|
||||
background-color .3s $--n-ease-in-out-cubic-bezier;
|
||||
height: 1px;
|
||||
flex: 1;
|
||||
align-self: flex-start;
|
||||
@ -107,7 +109,9 @@
|
||||
}
|
||||
}
|
||||
@include b(step-indicator) {
|
||||
transition: background-color .3s $--n-ease-in-out-cubic-bezier, box-shadow .3s $--n-ease-in-out-cubic-bezier;
|
||||
transition:
|
||||
background-color .3s $--n-ease-in-out-cubic-bezier,
|
||||
box-shadow .3s $--n-ease-in-out-cubic-bezier;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -128,6 +132,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@include m(transition-disabled) {
|
||||
@include b(step-indicator) {
|
||||
@include b(step-indicator-slot) {
|
||||
@include e(index) {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@include m(vertical) {
|
||||
flex-direction: column;
|
||||
$step-margin-bottom: 16px;
|
||||
|
Loading…
Reference in New Issue
Block a user