@tarojs/shared
Advanced tools
Comparing version 3.1.0-beta.0 to 3.1.0-beta.1
@@ -427,2 +427,3 @@ 'use strict'; | ||
['view', -1], | ||
['catch-view', -1], | ||
['cover-view', -1], | ||
@@ -435,3 +436,4 @@ ['block', -1], | ||
['form', 4], | ||
['scroll-view', 4] | ||
['scroll-view', 4], | ||
['swiper', 4] | ||
]); | ||
@@ -621,3 +623,3 @@ | ||
return Object.keys(attrs) | ||
.map(function (k) { return (k + "=\"" + (k.startsWith('bind') || k.startsWith('on') ? attrs[k] : ("{" + (this$1.getAttrValue(attrs[k], k, nodeName)) + "}")) + "\" "); }) | ||
.map(function (k) { return (k + "=\"" + (k.startsWith('bind') || k.startsWith('on') || k.startsWith('catch') ? attrs[k] : ("{" + (this$1.getAttrValue(attrs[k], k, nodeName)) + "}")) + "\" "); }) | ||
.join(''); | ||
@@ -667,2 +669,14 @@ }; | ||
} | ||
if (compName === 'view') { | ||
var reg = /^(bind|on)(touchmove|TouchMove)$/; | ||
var comp = Object.assign({}, newComp); | ||
Object.keys(comp).forEach(function (originKey) { | ||
if (!reg.test(originKey)) | ||
{ return; } | ||
var key = originKey.replace(reg, 'catch$2'); | ||
comp[key] = comp[originKey]; | ||
delete comp[originKey]; | ||
}); | ||
result['catch-view'] = comp; | ||
} | ||
if (compName === 'slot' || compName === 'slot-view') { | ||
@@ -734,3 +748,3 @@ result[compName] = { | ||
} | ||
var nodeName = comp.nodeName === 'slot' || comp.nodeName === 'slot-view' ? 'view' : comp.nodeName; | ||
var nodeName = comp.nodeName === 'slot' || comp.nodeName === 'slot-view' || comp.nodeName === 'catch-view' ? 'view' : comp.nodeName; | ||
var res = "\n<template name=\"tmpl_" + level + "_" + (comp.nodeName) + "\">\n <" + nodeName + " " + (this.buildAttribute(comp.attributes, comp.nodeName)) + " id=\"{{i.uid}}\">" + children + "</" + nodeName + ">\n</template>\n"; | ||
@@ -737,0 +751,0 @@ if (isFunction(this.modifyTemplateResult)) { |
@@ -410,2 +410,3 @@ function isString(o) { | ||
['view', -1], | ||
['catch-view', -1], | ||
['cover-view', -1], | ||
@@ -418,3 +419,4 @@ ['block', -1], | ||
['form', 4], | ||
['scroll-view', 4] | ||
['scroll-view', 4], | ||
['swiper', 4] | ||
]); | ||
@@ -616,3 +618,3 @@ | ||
return Object.keys(attrs) | ||
.map(k => `${k}="${k.startsWith('bind') || k.startsWith('on') ? attrs[k] : `{${this.getAttrValue(attrs[k], k, nodeName)}}`}" `) | ||
.map(k => `${k}="${k.startsWith('bind') || k.startsWith('on') || k.startsWith('catch') ? attrs[k] : `{${this.getAttrValue(attrs[k], k, nodeName)}}`}" `) | ||
.join(''); | ||
@@ -662,2 +664,14 @@ } | ||
} | ||
if (compName === 'view') { | ||
const reg = /^(bind|on)(touchmove|TouchMove)$/; | ||
const comp = Object.assign({}, newComp); | ||
Object.keys(comp).forEach(originKey => { | ||
if (!reg.test(originKey)) | ||
return; | ||
const key = originKey.replace(reg, 'catch$2'); | ||
comp[key] = comp[originKey]; | ||
delete comp[originKey]; | ||
}); | ||
result['catch-view'] = comp; | ||
} | ||
if (compName === 'slot' || compName === 'slot-view') { | ||
@@ -749,3 +763,3 @@ result[compName] = { | ||
} | ||
const nodeName = comp.nodeName === 'slot' || comp.nodeName === 'slot-view' ? 'view' : comp.nodeName; | ||
const nodeName = comp.nodeName === 'slot' || comp.nodeName === 'slot-view' || comp.nodeName === 'catch-view' ? 'view' : comp.nodeName; | ||
let res = ` | ||
@@ -752,0 +766,0 @@ <template name="tmpl_${level}_${comp.nodeName}"> |
{ | ||
"name": "@tarojs/shared", | ||
"version": "3.1.0-beta.0", | ||
"version": "3.1.0-beta.1", | ||
"description": "> TODO: description", | ||
@@ -28,3 +28,3 @@ "author": "yuche <i@yuche.me>", | ||
}, | ||
"gitHead": "f2d5e8d39a92420e08fbc3c55d627dd12f524cfd" | ||
"gitHead": "7ce7766636615057256252fe41033d5876b3436f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193217
2156