refactor(space): support vue3

This commit is contained in:
07akioni 2020-09-30 00:24:27 +08:00
parent c4da888a05
commit 2618453027
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import getDefaultSlot from '../../_utils/vue/getDefaultSlot'
import { h } from 'vue'
import { flatten, getSlot } from '../../_utils/vue'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
@ -60,7 +61,7 @@ export default {
default: 'medium'
}
},
render (h) {
render () {
const {
size,
vertical,
@ -68,7 +69,7 @@ export default {
inline,
justify
} = this
const children = getDefaultSlot(this)
const children = flatten(getSlot(this))
const horizontalMargin = typeof size === 'number' ? size + 'px' : HORIZONTAL_MARGIN[size]
const verticalMargin = typeof size === 'number' ? size + 'px' : VERTICAL_MARGIN[size]
const marginRight = !vertical ? horizontalMargin : null

View File

@ -175,6 +175,7 @@ placeable 进行了大调整
- [x] scrollbar
- [ ] select
- [ ] slider
- [x] space
- [x] spin
- [x] statistic
- [x] steps