A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuematerial/vue-material/commit/05b4744 below:

normalized component's tag before checking to match slot … · vuematerial/vue-material@05b4744 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+7

-3

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+7

-3

lines changed Original file line number Diff line number Diff line change

@@ -10,8 +10,12 @@

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,7 +46,7 @@

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,7 +83,7 @@

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4