4cd4fd28
郭伟龙
feat: 初始化项目
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { extend, mergeData } from '../../vue'
import { NAME_DROPDOWN_DIVIDER } from '../../constants/components'
import { PROP_TYPE_STRING } from '../../constants/props'
import { makeProp, makePropsConfigurable } from '../../utils/props'
import { omit } from '../../utils/object'
// --- Props ---
export const props = makePropsConfigurable(
{
tag: makeProp(PROP_TYPE_STRING, 'hr')
},
NAME_DROPDOWN_DIVIDER
)
// --- Main component ---
// @vue/component
export const BDropdownDivider = /*#__PURE__*/ extend({
name: NAME_DROPDOWN_DIVIDER,
functional: true,
props,
render(h, { props, data }) {
return h('li', mergeData(omit(data, ['attrs']), { attrs: { role: 'presentation' } }), [
h(props.tag, {
staticClass: 'dropdown-divider',
attrs: {
...(data.attrs || {}),
role: 'separator',
'aria-orientation': 'horizontal'
},
ref: 'divider'
})
])
}
})
|