File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 10
10
' md-app-content'
11
11
]
12
12
13
+ function normilizeTagName (tagName ) {
14
+ return tagName .replace (/ ([a-z ] )([A-Z ] )/ g , ' $1-$2' ).toLowerCase ()
15
+ }
16
+
13
17
function isValidChild (componentOptions ) {
14
- return componentOptions && componentTypes .includes (componentOptions .tag )
18
+ return componentOptions && componentTypes .includes (normilizeTagName ( componentOptions .tag ) )
15
19
}
16
20
17
21
function isRightDrawer (propsData ) {
42
46
const componentOptions = child .componentOptions
43
47
44
48
if (shouldRenderSlot (data, componentOptions)) {
45
- const slotName = data .slot || componentOptions .tag
49
+ const slotName = data .slot || normilizeTagName ( componentOptions .tag )
46
50
child .data .slot = slotName
47
51
48
52
if (slotName === ' md-app-drawer' ) {
79
83
80
84
function getDrawers (children ) {
81
85
const drawerVnodes = children .filter (child => {
82
- const tag = child .data .slot || child .componentOptions .tag
86
+ const tag = child .data .slot || normilizeTagName ( child .componentOptions .tag )
83
87
return tag === ' md-app-drawer'
84
88
})
85
89
return drawerVnodes .length ? drawerVnodes : []
You can’t perform that action at this time.
0 commit comments