update version num

This commit is contained in:
dntzhang 2018-10-28 21:55:48 +08:00
parent fa4b5a7859
commit a1fea57e58
5 changed files with 21 additions and 15 deletions

View File

@ -77,7 +77,7 @@ Object.defineProperty(exports, "__esModule", {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/**
* omi v4.0.11 http://omijs.org
* omi v4.0.12 http://omijs.org
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/Tencent/omi
@ -1407,6 +1407,17 @@ function cloneElement(vnode, props) {
return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);
}
function getHost(ele) {
var p = ele.parentNode;
while (p) {
if (p.host) {
return p.host;
} else {
p = p.parentNode;
}
}
}
var omi = {
tag: tag,
WeElement: WeElement,
@ -1416,11 +1427,12 @@ var omi = {
options: options,
define: define,
observe: observe,
cloneElement: cloneElement
cloneElement: cloneElement,
getHost: getHost
};
options.root.Omi = omi;
options.root.Omi.version = "4.0.11";
options.root.Omi.version = "4.0.12";
exports.default = omi;
exports.tag = tag;
@ -1432,6 +1444,7 @@ exports.options = options;
exports.define = define;
exports.observe = observe;
exports.cloneElement = cloneElement;
exports.getHost = getHost;
//# sourceMappingURL=omi.esm.js.map
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))

View File

@ -27,7 +27,7 @@
"webpack": "^3.4.1"
},
"dependencies": {
"omi": "^4.0.10"
"omi": "latest"
},
"author": "dntzhang <dntzhang@qq.com>",
"license": "MIT",

View File

@ -1,4 +1,4 @@
import { WeElement, define } from "omi";
import { WeElement, define, getHost } from "omi";
class OmiTap extends WeElement {
@ -8,14 +8,7 @@ class OmiTap extends WeElement {
this._x = null
this._y = null
this._scrollTop = null
let p = this.parentNode
while (p && !this.css) {
if(p.host){
this.css = p.host.css
}else{
p = p.parentNode
}
}
this.css = getHost(this).css
}
_handleTouchStart(evt) {

View File

@ -1,6 +1,6 @@
{
"name": "omi-tap",
"version": "2.0.1",
"version": "2.0.2",
"description": "Support tap event in your Omi project.",
"main": "index.js",
"scripts": {

View File

@ -102,7 +102,7 @@
"mocha": "^5.0.4",
"npm-run-all": "^4.0.0",
"omi-mobx": "^0.2.2",
"omi-tap": "^2.0.1",
"omi-tap": "^2.0.2",
"omi-transform": "^2.0.1",
"rimraf": "^2.5.3",
"rollup": "^0.57.1",