@@ -5895,9 +5895,9 @@ var attrs$3 = {
5895
5895
} else if ( key === 'v-show' ) {
5896
5896
attrs [ 'hidden' ] = "{{!(" + val + ")}}" ;
5897
5897
} 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 ) ;
5899
5899
} 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' ] ) ;
5901
5901
} else if ( / ^ v \- m o d e l / . test ( key ) ) {
5902
5902
attrs = this$1 . model ( key , val , attrs , tag , log ) ;
5903
5903
} else if ( directiveMap$3 [ key ] ) {
@@ -5941,7 +5941,7 @@ var attrs$3 = {
5941
5941
return ast
5942
5942
} ,
5943
5943
5944
- event : function event ( key , val , attrs , tag ) {
5944
+ event : function event ( key , val , attrs , tag , log ) {
5945
5945
// 小程序能力所致,bind 和 catch 事件同时绑定时候,只会触发 bind ,catch 不会被触发。
5946
5946
// .stop 的使用会阻止冒泡,但是同时绑定了一个非冒泡事件,会导致该元素上的 catchEventName 失效!
5947
5947
// .prevent 可以直接干掉,因为小程序里没有什么默认事件,比如submit并不会跳转页面
@@ -5968,7 +5968,7 @@ var attrs$3 = {
5968
5968
var eventType = 'on' ;
5969
5969
var isStop = eventNameMap . includes ( 'stop' ) ;
5970
5970
if ( eventNameMap . includes ( 'capture' ) ) {
5971
- eventType = isStop ? 'capture-catch:' : 'capture-bind:' ;
5971
+ log ( '支付宝小程序不支持事件捕获' ) ;
5972
5972
} else if ( isStop ) {
5973
5973
eventType = 'catch' ;
5974
5974
}
@@ -5983,28 +5983,12 @@ var attrs$3 = {
5983
5983
var name = key . replace ( / ^ v \- b i n d \: / i, '' ) ;
5984
5984
5985
5985
if ( isIf && name === 'key' ) {
5986
- attrs [ 'wx :key' ] = val ;
5986
+ attrs [ 'a :key' ] = val ;
5987
5987
}
5988
5988
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
+ }
6008
5992
6009
5993
if ( name === 'href' ) {
6010
5994
attrs [ 'url' ] = "{{" + val + "}}" ;
@@ -6046,18 +6030,17 @@ var attrs$3 = {
6046
6030
attrs [ 'value' ] = "{{" + val + "}}" ;
6047
6031
if ( key === 'v-model.lazy' ) {
6048
6032
if ( isFormInput ) {
6049
- attrs [ 'bindblur ' ] = 'handleProxy' ;
6033
+ attrs [ 'onBlur ' ] = 'handleProxy' ;
6050
6034
} else {
6051
- attrs [ 'bindchange ' ] = 'handleProxy' ;
6035
+ attrs [ 'onChange ' ] = 'handleProxy' ;
6052
6036
}
6053
6037
} else {
6054
6038
if ( isFormInput ) {
6055
- attrs [ 'bindinput ' ] = 'handleProxy' ;
6039
+ attrs [ 'onInput ' ] = 'handleProxy' ;
6056
6040
} else {
6057
- attrs [ 'bindchange ' ] = 'handleProxy' ;
6041
+ attrs [ 'onChange ' ] = 'handleProxy' ;
6058
6042
}
6059
6043
}
6060
-
6061
6044
return attrs
6062
6045
}
6063
6046
} ;
@@ -6146,9 +6129,11 @@ var convertFor$3 = function (ast) {
6146
6129
attrsMap [ astMap$3 [ 'alias' ] ] = alias ;
6147
6130
}
6148
6131
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
+ } ;
6152
6137
6153
6138
function mpmlAst$3 ( compiled , options , log ) {
6154
6139
if ( options === void 0 ) options = { } ;
0 commit comments