You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in strict asset resolve mode, I have no idea how to repeat component. For example as followed, the console will report that the inner component cannot be resolved.
<outer><templatev-repeat="item in data"><innerprop={{item.prop}}>{{item.value}}</inner></template></outer>
Because when resolving the inner, the resolveAsset is checking the options._parent, not the _context...the modified code is something like:
// for util/options/resolveAssetwhile(!asset&&(!config.strict||options._repeat)){if(options._repeat){if(!options._context){break}options=options._context.$options}else{if(!options._parent){break}options=options._parent.$options}assets=options[type]asset=assets[id]||assets[camelizedId]||assets[pascalizedId]}
Of course, we can try another approach if only one component and no needs to pass repeated data to component, but the ability to repeat block will be lost. For example
<outer><innerv-repeat="item in data">{{item}}</inner></outer>
However, the code above can work without any errors, but the result is wrong...the {{item}} will always be empty (undefined)... Because the {{item}} is linked within the _context, even if the item is set into the inner instance...
The text was updated successfully, but these errors were encountered:
When in strict asset resolve mode, I have no idea how to repeat component. For example as followed, the console will report that the
inner
component cannot be resolved.Because when resolving the
inner
, theresolveAsset
is checking theoptions._parent
, not the_context
...the modified code is something like:Of course, we can try another approach if only one component and no needs to pass repeated data to component, but the ability to repeat block will be lost. For example
However, the code above can work without any errors, but the result is wrong...the
{{item}}
will always be empty (undefined
)... Because the{{item}}
is linked within the_context
, even if theitem
is set into theinner
instance...The text was updated successfully, but these errors were encountered: