Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "karas", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "鸦", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -51,3 +51,3 @@ import Event from '../util/Event'; | ||
this.__traverse(o.ctx, o.defs, this.root.renderMode); | ||
this.__init(true); | ||
this.__init(); | ||
this.root.refreshTask(cb); | ||
@@ -94,3 +94,3 @@ } | ||
// 组件传入的样式需覆盖shadowRoot的 | ||
__init(isSetState) { | ||
__init() { | ||
let sr = this.shadowRoot; | ||
@@ -129,5 +129,6 @@ // 返回text节点特殊处理,赋予基本样式 | ||
// 防止重复 | ||
if(isSetState) { | ||
if(this.__hasInit) { | ||
return; | ||
} | ||
this.__hasInit = true; | ||
[ | ||
@@ -134,0 +135,0 @@ 'x', |
@@ -11,3 +11,3 @@ import Dom from '../node/Dom'; | ||
function getDom(dom) { | ||
if(util.isString(dom)) { | ||
if(util.isString(dom) && dom) { | ||
let o = document.querySelector(dom); | ||
@@ -138,3 +138,3 @@ if(!o) { | ||
this.__uuid = util.isNil(this.__node.__uuid) ? uuid++ : this.__node.__uuid; | ||
this.__defs = this.node.__od || Defs.getInstance(this.__uuid); | ||
this.__defs = this.node.__defs || Defs.getInstance(this.__uuid); | ||
this.__defs.clear(); | ||
@@ -214,3 +214,3 @@ // 没有设置width/height则采用css计算形式 | ||
if(this.node.__karasInit) { | ||
diff(this.node, this.node.__ovd, nvd); | ||
diff(this.node, this.node.__vd, nvd); | ||
} | ||
@@ -220,3 +220,4 @@ else { | ||
} | ||
this.node.__ovd = nvd; | ||
this.node.__vd = nvd; | ||
this.node.__defs = nd; | ||
} | ||
@@ -223,0 +224,0 @@ this.__task.forEach(cb => { |
Sorry, the diff of this file is too big to display
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
761231
12371