@@ -5895,9 +5895,9 @@ var attrs$3 = {
58955895 } else if ( key === 'v-show' ) {
58965896 attrs [ 'hidden' ] = "{{!(" + val + ")}}" ;
58975897 } else if ( / ^ v \- o n \: / i. test ( key ) ) {
5898- attrs = this$1 . event ( key , val , attrs , tag ) ;
5898+ attrs = this$1 . event ( key , val , attrs , tag , log ) ;
58995899 } else if ( / ^ v \- b i n d \: / i. test ( key ) ) {
5900- attrs = this$1 . bind ( key , val , attrs , tag , attrsMap [ 'wx :key' ] ) ;
5900+ attrs = this$1 . bind ( key , val , attrs , tag , attrsMap [ 'a :key' ] ) ;
59015901 } else if ( / ^ v \- m o d e l / . test ( key ) ) {
59025902 attrs = this$1 . model ( key , val , attrs , tag , log ) ;
59035903 } else if ( directiveMap$3 [ key ] ) {
@@ -5941,7 +5941,7 @@ var attrs$3 = {
59415941 return ast
59425942 } ,
59435943
5944- event : function event ( key , val , attrs , tag ) {
5944+ event : function event ( key , val , attrs , tag , log ) {
59455945 // 小程序能力所致,bind 和 catch 事件同时绑定时候,只会触发 bind ,catch 不会被触发。
59465946 // .stop 的使用会阻止冒泡,但是同时绑定了一个非冒泡事件,会导致该元素上的 catchEventName 失效!
59475947 // .prevent 可以直接干掉,因为小程序里没有什么默认事件,比如submit并不会跳转页面
@@ -5968,7 +5968,7 @@ var attrs$3 = {
59685968 var eventType = 'on' ;
59695969 var isStop = eventNameMap . includes ( 'stop' ) ;
59705970 if ( eventNameMap . includes ( 'capture' ) ) {
5971- eventType = isStop ? 'capture-catch:' : 'capture-bind:' ;
5971+ log ( '支付宝小程序不支持事件捕获' ) ;
59725972 } else if ( isStop ) {
59735973 eventType = 'catch' ;
59745974 }
@@ -5983,28 +5983,12 @@ var attrs$3 = {
59835983 var name = key . replace ( / ^ v \- b i n d \: / i, '' ) ;
59845984
59855985 if ( isIf && name === 'key' ) {
5986- attrs [ 'wx :key' ] = val ;
5986+ attrs [ 'a :key' ] = val ;
59875987 }
59885988
5989- node . tag = 'template' ;
5990- node . attrsMap . name = slotId ;
5991- delete node . attrsMap . slot ;
5992- // 缓存,会集中生成一个 slots 文件
5993- slots [ slotId ] = { node : convertAst$1 ( node , options , util ) , name : slotName , slotId : slotId } ;
5994- wxmlAst . slots [ slotName ] = slotId ;
5995- } ) ;
5996- // 清理当前组件下的节点信息,因为 slot 都被转移了
5997- children . length = 0 ;
5998- wxmlAst . children . length = 0 ;
5999- }
6000-
6001- wxmlAst . attrsMap = attrs$1 . format ( wxmlAst . attrsMap ) ;
6002- wxmlAst = tag$1 ( wxmlAst , options ) ;
6003- wxmlAst = convertFor$1 ( wxmlAst , options ) ;
6004- wxmlAst = attrs$1 . convertAttr ( wxmlAst , log ) ;
6005- if ( children && ! isSlot ) {
6006- wxmlAst . children = children . map ( function ( k ) { return convertAst$1 ( k , options , util ) ; } ) ;
6007- }
5989+ if ( tag === 'template' ) {
5990+ return attrs
5991+ }
60085992
60095993 if ( name === 'href' ) {
60105994 attrs [ 'url' ] = "{{" + val + "}}" ;
@@ -6046,18 +6030,17 @@ var attrs$3 = {
60466030 attrs [ 'value' ] = "{{" + val + "}}" ;
60476031 if ( key === 'v-model.lazy' ) {
60486032 if ( isFormInput ) {
6049- attrs [ 'bindblur ' ] = 'handleProxy' ;
6033+ attrs [ 'onBlur ' ] = 'handleProxy' ;
60506034 } else {
6051- attrs [ 'bindchange ' ] = 'handleProxy' ;
6035+ attrs [ 'onChange ' ] = 'handleProxy' ;
60526036 }
60536037 } else {
60546038 if ( isFormInput ) {
6055- attrs [ 'bindinput ' ] = 'handleProxy' ;
6039+ attrs [ 'onInput ' ] = 'handleProxy' ;
60566040 } else {
6057- attrs [ 'bindchange ' ] = 'handleProxy' ;
6041+ attrs [ 'onChange ' ] = 'handleProxy' ;
60586042 }
60596043 }
6060-
60616044 return attrs
60626045 }
60636046} ;
@@ -6146,9 +6129,11 @@ var convertFor$3 = function (ast) {
61466129 attrsMap [ astMap$3 [ 'alias' ] ] = alias ;
61476130 }
61486131
6149- // 引用子模版
6150- var importCode = Object . keys ( deps ) . map ( function ( k ) { return components [ k ] ? ( "<import src=\"" + ( components [ k ] . src ) + "\" />" ) : '' ; } ) . join ( '' ) ;
6151- code = importCode + "<template name=\"" + ( options . name ) + "\">" + code + "</template>" ;
6132+ delete attrsMap [ 'v-for' ] ;
6133+ }
6134+
6135+ return ast
6136+ } ;
61526137
61536138function mpmlAst$3 ( compiled , options , log ) {
61546139 if ( options === void 0 ) options = { } ;
0 commit comments