Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Jul 14, 2016
1 parent 266079f commit 22b790d
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/avalon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* built in 2016-7-14:20 version 2.16 by 司徒正美
* built in 2016-7-15:0 version 2.16 by 司徒正美
* 修正注释节点包括HTML结构(里面有引号),节点对齐算法崩溃的BUG
* 修正tap事件误触发BUG
* 升级ms-widget的slot机制,让它们的值也放到组件VM中
Expand Down Expand Up @@ -6888,7 +6888,7 @@ return /******/ (function(modules) { // webpackBootstrap
collectNodes(node, stack, ret)
if (rmsForEnd.test(nodeValue)) {
var p = stack.last()
var nodes = p.children
var nodes = p ? p.children: ret
markeRepeatRange(nodes, nodes.pop())
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/avalon.modern.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* built in 2016-7-14:20 version 2.16 by 司徒正美
* built in 2016-7-15:0 version 2.16 by 司徒正美
* 修正注释节点包括HTML结构(里面有引号),节点对齐算法崩溃的BUG
* 修正tap事件误触发BUG
* 升级ms-widget的slot机制,让它们的值也放到组件VM中
Expand Down Expand Up @@ -4661,7 +4661,7 @@ return /******/ (function(modules) { // webpackBootstrap
collectNodes(node, stack, ret)
if (rmsForEnd.test(nodeValue)) {
var p = stack.last()
var nodes = p.children
var nodes = p ? p.children: ret
markeRepeatRange(nodes, nodes.pop())
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/avalon.next.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* built in 2016-7-14:20 version 2.16 by 司徒正美
* built in 2016-7-15:0 version 2.16 by 司徒正美
* 修正注释节点包括HTML结构(里面有引号),节点对齐算法崩溃的BUG
* 修正tap事件误触发BUG
* 升级ms-widget的slot机制,让它们的值也放到组件VM中
Expand Down Expand Up @@ -4662,7 +4662,7 @@ return /******/ (function(modules) { // webpackBootstrap
collectNodes(node, stack, ret)
if (rmsForEnd.test(nodeValue)) {
var p = stack.last()
var nodes = p.children
var nodes = p ? p.children: ret
markeRepeatRange(nodes, nodes.pop())
}
}
Expand Down
6 changes: 3 additions & 3 deletions dist/avalon.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* built in 2016-7-14:20 version 2.16 by 司徒正美
* built in 2016-7-15:0 version 2.16 by 司徒正美
* 修正注释节点包括HTML结构(里面有引号),节点对齐算法崩溃的BUG
* 修正tap事件误触发BUG
* 升级ms-widget的slot机制,让它们的值也放到组件VM中
Expand Down Expand Up @@ -78,7 +78,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) {

/*!
* built in 2016-7-14:20 version 2.16 by 司徒正美
* built in 2016-7-15:0 version 2.16 by 司徒正美
* 修正注释节点包括HTML结构(里面有引号),节点对齐算法崩溃的BUG
* 修正tap事件误触发BUG
* 升级ms-widget的slot机制,让它们的值也放到组件VM中
Expand Down Expand Up @@ -4740,7 +4740,7 @@ return /******/ (function(modules) { // webpackBootstrap
collectNodes(node, stack, ret)
if (rmsForEnd.test(nodeValue)) {
var p = stack.last()
var nodes = p.children
var nodes = p ? p.children: ret
markeRepeatRange(nodes, nodes.pop())
}
}
Expand Down
43 changes: 43 additions & 0 deletions karma/directives/for.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,4 +565,47 @@ describe('for', function () {
done()
}, 150)
})

it('注解for指令嵌套问题', function (done) {
div.innerHTML = heredoc(function () {
/*
<style>
.c-red {
color: red;
}
.c-green {
color: green;
}
.c-blue {
color: blue;
}
</style>
<div ms-controller="for14">
<!--ms-for:(idx1, item1) in @arr-->
<p>Group这是标题</p>
<!--ms-for:(idx2, item2) in item1-->
<div>内容1</div>
<strong :class="'c-' + (idx1 < 1 ? 'red' : idx1 > 1 ? 'green' : 'blue')">
内容2 {{ (idx1 < 1 ? 'red' : idx1 > 1 ? 'green' : 'blue') + '-' + item2 }}
</strong>
<!--ms-for-end:-->
<!--ms-for-end:-->
</div>
*/
})

vm = avalon.define({
$id: 'for14',
arr: [
{a: 'a1', b: 'b1'}, {a: 'a2', b: 'b2'}, {a: 'a3', b: 'b3'}
]
});
avalon.scan(div)
setTimeout(function () {
var strongs = div.getElementsByTagName('strong')
expect(strongs.length).to.equal(6)
done()
}, 150)
})
})
2 changes: 1 addition & 1 deletion src/avalon.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

var avalon = require('../dist/avalon')
var avalon = require('../dist/avalon.modern')
require('../components/button/index')
require('../components/panel/index')

Expand Down
2 changes: 1 addition & 1 deletion src/strategy/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function lexer(str) {
collectNodes(node, stack, ret)
if (rmsForEnd.test(nodeValue)) {
var p = stack.last()
var nodes = p.children
var nodes = p ? p.children: ret
markeRepeatRange(nodes, nodes.pop())
}
}
Expand Down

0 comments on commit 22b790d

Please sign in to comment.