mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
refactor(layout): avoid prop overlap
This commit is contained in:
parent
34ad7226ca
commit
5c698a7911
@ -7,7 +7,7 @@
|
||||
[`n-${syntheticTheme}-theme`]: syntheticTheme,
|
||||
[`n-layout--${siderCollapseMode}-collapse-mode`]: siderCollapseMode
|
||||
}"
|
||||
:style="syntheticStyle"
|
||||
:style="syntheticLayoutStyle"
|
||||
>
|
||||
<n-scrollbar
|
||||
v-if="!useNativeScrollbar"
|
||||
@ -51,10 +51,6 @@ export default {
|
||||
scrollContainerStyle: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
themedStyle: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@ -81,12 +77,11 @@ export default {
|
||||
}
|
||||
return null
|
||||
},
|
||||
syntheticStyle () {
|
||||
const themedStyle = this.themedStyle
|
||||
syntheticLayoutStyle () {
|
||||
return Object.assign({
|
||||
marginLeft: this.styleMarginLeft,
|
||||
transition: this.transitionDisabled ? 'none' : null
|
||||
}, themedStyle ? themedStyle[this.syntheticTheme] : null)
|
||||
}, this.syntheticStyle)
|
||||
},
|
||||
transitionDisabled () {
|
||||
if (this.NLayout && this.NLayout.childLayoutTransitionDisabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user