1
1
/**
2
- * Vue.js v0.11.2
2
+ * Vue.js v0.11.3
3
3
* (c) 2014 Evan You
4
4
* Released under the MIT License.
5
5
*/
@@ -1628,6 +1628,7 @@ return /******/ (function(modules) { // webpackBootstrap
1628
1628
1629
1629
exports . _compile = function ( el ) {
1630
1630
var options = this . $options
1631
+ var parent = options . _parent
1631
1632
if ( options . _linkFn ) {
1632
1633
this . _initElement ( el )
1633
1634
options . _linkFn ( this , el )
@@ -1637,20 +1638,26 @@ return /******/ (function(modules) { // webpackBootstrap
1637
1638
// separate container element and content
1638
1639
var content = options . _content = _ . extractContent ( raw )
1639
1640
// create two separate linekrs for container and content
1641
+ var parentOptions = parent . $options
1642
+
1643
+ // hack: we need to skip the paramAttributes for this
1644
+ // child instance when compiling its parent container
1645
+ // linker. there could be a better way to do this.
1646
+ parentOptions . _skipAttrs = options . paramAttributes
1640
1647
var containerLinkFn =
1641
- compile ( raw , options , true , true )
1648
+ compile ( raw , parentOptions , true , true )
1649
+ parentOptions . _skipAttrs = null
1650
+
1642
1651
if ( content ) {
1643
1652
var contentLinkFn =
1644
- compile ( content , options , true , true )
1653
+ compile ( content , parentOptions , true )
1645
1654
// call content linker now, before transclusion
1646
- this . _contentUnlinkFn =
1647
- contentLinkFn ( options . _parent , content )
1655
+ this . _contentUnlinkFn = contentLinkFn ( parent , content )
1648
1656
}
1649
1657
// tranclude, this possibly replaces original
1650
1658
el = transclude ( el , options )
1651
1659
// now call the container linker on the resolved el
1652
- this . _containerUnlinkFn =
1653
- containerLinkFn ( options . _parent , el )
1660
+ this . _containerUnlinkFn = containerLinkFn ( parent , el )
1654
1661
} else {
1655
1662
// simply transclude
1656
1663
el = transclude ( el , options )
@@ -4612,7 +4619,8 @@ return /******/ (function(modules) { // webpackBootstrap
4612
4619
* @param {Element|DocumentFragment } el
4613
4620
* @param {Object } options
4614
4621
* @param {Boolean } partial
4615
- * @param {Boolean } asParent
4622
+ * @param {Boolean } asParent - compiling a component
4623
+ * container as its parent.
4616
4624
* @return {Function }
4617
4625
*/
4618
4626
@@ -5102,6 +5110,10 @@ return /******/ (function(modules) { // webpackBootstrap
5102
5110
*/
5103
5111
5104
5112
function collectAttrDirective ( el , name , value , options ) {
5113
+ if ( options . _skipAttrs &&
5114
+ options . _skipAttrs . indexOf ( name ) > - 1 ) {
5115
+ return
5116
+ }
5105
5117
var tokens = textParser . parse ( value )
5106
5118
if ( tokens ) {
5107
5119
var def = options . directives . attr
0 commit comments