fix scoped style bug
This commit is contained in:
parent
e290ed8b29
commit
669c67b969
|
@ -1510,6 +1510,9 @@ Nuclear._mixObj = function (obj) {
|
|||
}
|
||||
};
|
||||
|
||||
obj._nuclearSetStyleData=function(){
|
||||
this.node&&this.node.querySelector('style').setAttribute('data-nuclearId',this._ncInstanceId);
|
||||
}
|
||||
|
||||
obj._nuclearRender = function (item) {
|
||||
var isFirstRender = false;
|
||||
|
@ -1550,7 +1553,7 @@ Nuclear._mixObj = function (obj) {
|
|||
this._nuclearFix();
|
||||
if (this.onRefresh) this.onRefresh();
|
||||
}
|
||||
|
||||
this._nuclearSetStyleData();
|
||||
//刷新局部样式
|
||||
if (!isFirstRender) {
|
||||
Nuclear.refreshStyle(this._ncInstanceId);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<div id="todoListContainer"></div>
|
||||
<script src="http://alloyteam.github.io/Nuclear/js/nuclear.min.js"></script>
|
||||
<script src="../dist/nuclear.min.js"></script>
|
||||
|
||||
<script>
|
||||
var todoTpl = document.querySelector("#myTemplate").innerHTML;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "alloynuclear",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"description": "made UI super easy.",
|
||||
"main": "nuclear.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -141,6 +141,9 @@ Nuclear._mixObj = function (obj) {
|
|||
}
|
||||
};
|
||||
|
||||
obj._nuclearSetStyleData=function(){
|
||||
this.node&&this.node.querySelector('style').setAttribute('data-nuclearId',this._ncInstanceId);
|
||||
}
|
||||
|
||||
obj._nuclearRender = function (item) {
|
||||
var isFirstRender = false;
|
||||
|
@ -181,7 +184,7 @@ Nuclear._mixObj = function (obj) {
|
|||
this._nuclearFix();
|
||||
if (this.onRefresh) this.onRefresh();
|
||||
}
|
||||
|
||||
this._nuclearSetStyleData();
|
||||
//刷新局部样式
|
||||
if (!isFirstRender) {
|
||||
Nuclear.refreshStyle(this._ncInstanceId);
|
||||
|
|
Loading…
Reference in New Issue