mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
feat(layout): themed-style
This commit is contained in:
parent
1b08fe1bfe
commit
3f9a052c7b
@ -7,10 +7,7 @@
|
||||
[`n-${syntheticTheme}-theme`]: syntheticTheme,
|
||||
[`n-layout--${siderCollapseMode}-collapse-mode`]: siderCollapseMode
|
||||
}"
|
||||
:style="{
|
||||
marginLeft: styleMarginLeft,
|
||||
transition: transitionDisabled ? 'none' : null
|
||||
}"
|
||||
:style="syntheticStyle"
|
||||
>
|
||||
<n-scrollbar
|
||||
v-if="!useNativeScrollbar"
|
||||
@ -54,6 +51,10 @@ export default {
|
||||
scrollContainerStyle: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
themedStyle: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@ -80,6 +81,13 @@ export default {
|
||||
}
|
||||
return null
|
||||
},
|
||||
syntheticStyle () {
|
||||
const themedStyle = this.themedStyle
|
||||
return Object.assign({
|
||||
marginLeft: this.styleMarginLeft,
|
||||
transition: this.transitionDisabled ? 'none' : null
|
||||
}, themedStyle ? themedStyle[this.syntheticTheme] : null)
|
||||
},
|
||||
transitionDisabled () {
|
||||
if (this.NLayout && this.NLayout.childLayoutTransitionDisabled) {
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user