File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1010 ' md-app-content'
1111 ]
1212
13+ function normilizeTagName (tagName ) {
14+ return tagName .replace (/ ([a-z ] )([A-Z ] )/ g , ' $1-$2' ).toLowerCase ()
15+ }
16+
1317 function isValidChild (componentOptions ) {
14- return componentOptions && componentTypes .includes (componentOptions .tag )
18+ return componentOptions && componentTypes .includes (normilizeTagName ( componentOptions .tag ) )
1519 }
1620
1721 function isRightDrawer (propsData ) {
4246 const componentOptions = child .componentOptions
4347
4448 if (shouldRenderSlot (data, componentOptions)) {
45- const slotName = data .slot || componentOptions .tag
49+ const slotName = data .slot || normilizeTagName ( componentOptions .tag )
4650 child .data .slot = slotName
4751
4852 if (slotName === ' md-app-drawer' ) {
7983
8084 function getDrawers (children ) {
8185 const drawerVnodes = children .filter (child => {
82- const tag = child .data .slot || child .componentOptions .tag
86+ const tag = child .data .slot || normilizeTagName ( child .componentOptions .tag )
8387 return tag === ' md-app-drawer'
8488 })
8589 return drawerVnodes .length ? drawerVnodes : []
You can’t perform that action at this time.
0 commit comments