2
0
Эх сурвалжийг харах

respect scope for one-time prop

Evan You 10 жил өмнө
parent
commit
071f6fdd23

+ 1 - 2
src/compiler/compile-props.js

@@ -130,8 +130,7 @@ function makePropsLinkFn (props) {
         if (vm._context) {
           if (prop.mode === propBindingModes.ONE_TIME) {
             // one time binding
-            // TODO respect scope here
-            value = vm._context.$get(prop.parentPath)
+            value = (scope || vm._context).$get(prop.parentPath)
             _.initProp(vm, prop, value)
           } else {
             // dynamic binding