A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/bootstrap-vue/bootstrap-vue/commit/79784ae6e03f90ee14ce90f8f5e02d0249eb5c4a below:

clean up props inheritance (#6265) · bootstrap-vue/bootstrap-vue@79784ae · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+34

-32

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+34

-32

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

@@ -7,7 +7,9 @@

7 7

// in-place after the transition completes

8 8

import { Vue, mergeData } from '../../../vue'

9 9

import { NAME_COLLAPSE_HELPER } from '../../../constants/components'

10 +

import { PROP_TYPE_BOOLEAN } from '../../../constants/props'

10 11

import { getBCR, reflow, removeStyle, requestAF, setStyle } from '../../../utils/dom'

12 +

import { makeProp } from '../../../utils/props'

11 13 12 14

// --- Helper methods ---

13 15

@@ -62,17 +64,18 @@ const TRANSITION_HANDLERS = {

62 64 63 65

// --- Main component ---

64 66 67 +

export const props = {

68 +

// // If `true` (and `visible` is `true` on mount), animate initially visible

69 +

appear: makeProp(PROP_TYPE_BOOLEAN, false)

70 +

}

71 + 72 +

// --- Main component ---

73 + 65 74

// @vue/component

66 75

export const BVCollapse = /*#__PURE__*/ Vue.extend({

67 76

name: NAME_COLLAPSE_HELPER,

68 77

functional: true,

69 -

props: {

70 -

appear: {

71 -

// If `true` (and `visible` is `true` on mount), animate initially visible

72 -

type: Boolean,

73 -

default: false

74 -

}

75 -

},

78 +

props,

76 79

render(h, { props, data, children }) {

77 80

return h(

78 81

'transition',

Original file line number Diff line number Diff line change

@@ -4,16 +4,18 @@ import { EVENT_NAME_CLICK } from '../../constants/events'

4 4

import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props'

5 5

import { requestAF } from '../../utils/dom'

6 6

import { omit, sortKeys } from '../../utils/object'

7 -

import { makeProp, makePropsConfigurable } from '../../utils/props'

7 +

import { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props'

8 8

import { attrsMixin } from '../../mixins/attrs'

9 9

import { normalizeSlotMixin } from '../../mixins/normalize-slot'

10 10

import { BLink, props as BLinkProps } from '../link/link'

11 11 12 12

// --- Props ---

13 13 14 +

const linkProps = omit(BLinkProps, ['event', 'routerTag'])

15 + 14 16

export const props = makePropsConfigurable(

15 17

sortKeys({

16 -

...omit(BLinkProps, ['event', 'routerTag']),

18 +

...linkProps,

17 19

linkClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),

18 20

variant: makeProp(PROP_TYPE_STRING)

19 21

}),

@@ -69,7 +71,7 @@ export const BDropdownItem = /*#__PURE__*/ Vue.extend({

69 71

{

70 72

staticClass: 'dropdown-item',

71 73

class: [linkClass, { [`text-${variant}`]: variant && !(active || disabled) }],

72 -

props: this.$props,

74 +

props: pluckProps(linkProps, this.$props),

73 75

attrs: this.computedAttrs,

74 76

on: { click: onClick },

75 77

ref: 'item'

Original file line number Diff line number Diff line change

@@ -2,14 +2,16 @@ import { Vue, mergeData } from '../../vue'

2 2

import { NAME_NAV_FORM } from '../../constants/components'

3 3

import { PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props'

4 4

import { omit, sortKeys } from '../../utils/object'

5 -

import { makeProp, makePropsConfigurable } from '../../utils/props'

5 +

import { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props'

6 6

import { BForm, props as BFormProps } from '../form/form'

7 7 8 8

// --- Props ---

9 9 10 +

const formProps = omit(BFormProps, ['inline'])

11 + 10 12

export const props = makePropsConfigurable(

11 13

sortKeys({

12 -

...omit(BFormProps, ['inline']),

14 +

...formProps,

13 15

formClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)

14 16

}),

15 17

NAME_NAV_FORM

@@ -28,7 +30,7 @@ export const BNavForm = /*#__PURE__*/ Vue.extend({

28 30

{

29 31

class: props.formClass,

30 32

props: {

31 -

...props,

33 +

...pluckProps(formProps, props),

32 34

inline: true

33 35

},

34 36

attrs: data.attrs,

Original file line number Diff line number Diff line change

@@ -2,14 +2,16 @@ import { Vue, mergeData } from '../../vue'

2 2

import { NAME_NAV_ITEM } from '../../constants/components'

3 3

import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_OBJECT } from '../../constants/props'

4 4

import { omit, sortKeys } from '../../utils/object'

5 -

import { makeProp, makePropsConfigurable } from '../../utils/props'

5 +

import { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props'

6 6

import { BLink, props as BLinkProps } from '../link/link'

7 7 8 8

// --- Props ---

9 9 10 +

const linkProps = omit(BLinkProps, ['event', 'routerTag'])

11 + 10 12

export const props = makePropsConfigurable(

11 13

sortKeys({

12 -

...omit(BLinkProps, ['event', 'routerTag']),

14 +

...linkProps,

13 15

linkAttrs: makeProp(PROP_TYPE_OBJECT, {}),

14 16

linkClasses: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)

15 17

}),

@@ -36,7 +38,7 @@ export const BNavItem = /*#__PURE__*/ Vue.extend({

36 38

staticClass: 'nav-link',

37 39

class: props.linkClasses,

38 40

attrs: props.linkAttrs,

39 -

props,

41 +

props: pluckProps(linkProps, props),

40 42

on: listeners

41 43

},

42 44

children

Original file line number Diff line number Diff line change

@@ -1,7 +1,5 @@

1 1

import { Vue, mergeData } from '../../vue'

2 -

import { PROP_TYPE_BOOLEAN } from '../../constants/props'

3 2

import { omit } from '../../utils/object'

4 -

import { makeProp } from '../../utils/props'

5 3

import { kebabCase, pascalCase, trim } from '../../utils/string'

6 4

import { BVIconBase, props as BVIconBaseProps } from './icon-base'

7 5

@@ -24,10 +22,7 @@ export const makeIcon = (name, content) => {

24 22

return /*#__PURE__*/ Vue.extend({

25 23

name: iconName,

26 24

functional: true,

27 -

props: {

28 -

...omit(BVIconBaseProps, ['content', 'stacked']),

29 -

stacked: makeProp(PROP_TYPE_BOOLEAN, false)

30 -

},

25 +

props: omit(BVIconBaseProps, ['content']),

31 26

render(h, { data, props }) {

32 27

return h(

33 28

BVIconBase,

Original file line number Diff line number Diff line change

@@ -1,9 +1,9 @@

1 1

import { Vue, mergeData } from '../vue'

2 2

import { NAME_ICON } from '../constants/components'

3 -

import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../constants/props'

3 +

import { PROP_TYPE_STRING } from '../constants/props'

4 4

import { RX_ICON_PREFIX } from '../constants/regex'

5 5

import { omit, sortKeys } from '../utils/object'

6 -

import { makeProp, makePropsConfigurable } from '../utils/props'

6 +

import { makeProp, makePropsConfigurable, pluckProps } from '../utils/props'

7 7

import { pascalCase, trim } from '../utils/string'

8 8

import { BIconBlank } from './icons'

9 9

import { props as BVIconBaseProps } from './helpers/icon-base'

@@ -21,11 +21,12 @@ const findIconComponent = (ctx, iconName) => {

21 21 22 22

// --- Props ---

23 23 24 +

const iconProps = omit(BVIconBaseProps, ['content'])

25 + 24 26

export const props = makePropsConfigurable(

25 27

sortKeys({

26 -

...omit(BVIconBaseProps, ['content', 'stacked']),

27 -

icon: makeProp(PROP_TYPE_STRING),

28 -

stacked: makeProp(PROP_TYPE_BOOLEAN, false)

28 +

...iconProps,

29 +

icon: makeProp(PROP_TYPE_STRING)

29 30

}),

30 31

NAME_ICON

31 32

)

@@ -47,7 +48,7 @@ export const BIcon = /*#__PURE__*/ Vue.extend({

47 48

// If not registered, we render a blank icon

48 49

return h(

49 50

icon ? findIconComponent(parent, `BIcon${icon}`) || BIconBlank : BIconBlank,

50 -

mergeData(data, { props: { ...props, icon: null } })

51 +

mergeData(data, { props: pluckProps(iconProps, props) })

51 52

)

52 53

}

53 54

})

Original file line number Diff line number Diff line change

@@ -23,10 +23,7 @@ export const BIconstack = /*#__PURE__*/ Vue.extend({

23 23

BVIconBase,

24 24

mergeData(data, {

25 25

staticClass: 'b-iconstack',

26 -

props: {

27 -

...props,

28 -

stacked: false

29 -

}

26 +

props

30 27

}),

31 28

children

32 29

)

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