File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,23 @@ export default {
18
18
props,
19
19
inject: {
20
20
progress: {
21
- default: null
21
+ default: undefined
22
22
}
23
23
},
24
24
computed: {
25
+ directlyDeclaredProps () {
26
+ return Object .keys (this .$options .propsData )
27
+ },
28
+ injectedProps () {
29
+ return this .progress && this .progress .props ? this .progress .props : {}
30
+ },
25
31
props () {
26
- return Object .keys (props).reduce ((props , key ) => {
27
- const propUndefined = ! Object .keys (this .$options .propsData ).includes (key)
28
- const propInheritedFromProgress = propUndefined && this .progress .props [key]
29
- props[key] = propInheritedFromProgress ? this .progress .props [key] : this [key]
30
- return props
32
+ return Object .keys (props).reduce ((computedProps , key ) => {
33
+ const propIsDirectlyDeclared = this .directlyDeclaredProps .includes (key)
34
+ const parentPropExists = this .injectedProps [key] !== undefined
35
+ const propIsInherited = parentPropExists && ! propIsDirectlyDeclared
36
+ computedProps[key] = propIsInherited ? this .injectedProps [key] : this [key]
37
+ return computedProps
31
38
}, {})
32
39
},
33
40
progressBarClasses () {
You can’t perform that action at this time.
0 commit comments