Skip to content

Commit

Permalink
发布新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Dec 22, 2016
1 parent f11183c commit 3dbb060
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 37 deletions.
15 changes: 6 additions & 9 deletions buildIE6.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,14 @@ module.exports = rollup.rollup({
}
var feather = heredoc(function() {
/*
https://github.com/RubyLouvre/avalon/tree/2.2.1
https://github.com/RubyLouvre/avalon/tree/2.2.3
fix ms-controller BUG, 上下VM相同时,不会进行合并
为监听数组添加toJSON方法
IE7的checked属性应该使用defaultChecked来设置
对旧版firefox的children进行polyfill
修正ms-if,ms-text同在一个元素时出BUG的情况
修正ms-visible,ms-effect同在一个元素时出BUG的情况
修正selected属性同步问题
fix VElement hackIE BUG
avalon.bind 在绑定非元素节点也要修正事件对象
处理expr的null undefined情况
修正error函数参数顺序导致的错误
支持组件继承(对象形式与函数形式皆可)
*/
})
var now = new Date
Expand Down
16 changes: 7 additions & 9 deletions buildIE9.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@ module.exports = rollup.rollup({
}
var feather = heredoc(function() {
/*
https://github.com/RubyLouvre/avalon/tree/2.2.2
fix ms-controller BUG, 上下VM相同时,不会进行合并
为监听数组添加toJSON方法
IE7的checked属性应该使用defaultChecked来设置
对旧版firefox的children进行polyfill
修正ms-if,ms-text同在一个元素时出BUG的情况
修正ms-visible,ms-effect同在一个元素时出BUG的情况
修正selected属性同步问题
重构Proxy形态的vm
https://github.com/RubyLouvre/avalon/tree/2.2.3
fix VElement hackIE BUG
avalon.bind 在绑定非元素节点也要修正事件对象
处理expr的null undefined情况
修正error函数参数顺序导致的错误
支持组件继承(对象形式与函数形式皆可)
*/
})
var now = new Date
Expand Down
16 changes: 7 additions & 9 deletions dist/avalon.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
/*!
built in 2016-12-22:11:25 version 2.2.3 by 司徒正美
https://github.com/RubyLouvre/avalon/tree/2.2.1
built in 2016-12-22:11:41 version 2.2.3 by 司徒正美
https://github.com/RubyLouvre/avalon/tree/2.2.3
fix ms-controller BUG, 上下VM相同时,不会进行合并
为监听数组添加toJSON方法
IE7的checked属性应该使用defaultChecked来设置
对旧版firefox的children进行polyfill
修正ms-if,ms-text同在一个元素时出BUG的情况
修正ms-visible,ms-effect同在一个元素时出BUG的情况
修正selected属性同步问题
fix VElement hackIE BUG
avalon.bind 在绑定非元素节点也要修正事件对象
处理expr的null undefined情况
修正error函数参数顺序导致的错误
支持组件继承(对象形式与函数形式皆可)
*/(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.avalon = factory();
Expand Down
18 changes: 8 additions & 10 deletions dist/avalon.modern.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/*!
built in 2016-12-22:11:24 version 2.2.3 by 司徒正美
https://github.com/RubyLouvre/avalon/tree/2.2.2
fix ms-controller BUG, 上下VM相同时,不会进行合并
为监听数组添加toJSON方法
IE7的checked属性应该使用defaultChecked来设置
对旧版firefox的children进行polyfill
修正ms-if,ms-text同在一个元素时出BUG的情况
修正ms-visible,ms-effect同在一个元素时出BUG的情况
修正selected属性同步问题
重构Proxy形态的vm
built in 2016-12-22:11:41 version 2.2.3 by 司徒正美
https://github.com/RubyLouvre/avalon/tree/2.2.3
fix VElement hackIE BUG
avalon.bind 在绑定非元素节点也要修正事件对象
处理expr的null undefined情况
修正error函数参数顺序导致的错误
支持组件继承(对象形式与函数形式皆可)
*/;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.avalon = factory()
Expand Down
89 changes: 89 additions & 0 deletions perf/component/树2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html>

<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="./dist/avalon.js"></script>

</head>

<body>
<script>
function heredoc(fn) {
return fn.toString().replace(/^[^\/]+\/\*!?\s?/, '').
replace(/\*\/[^\/]+$/, '').trim().replace(/>\s*</g, '><')
}
var treeCaches = {}
var tree = avalon.component('tree', {
template: heredoc(function() {
/*
<div class="tree-node" ms-click='@click' ms-class="@cls" ms-css="{'text-indent': @level * 30}">
<p>第{{@level}}层</p>
<div ms-for="(index,el) in @children">
<wbr is="tree" ms-widget="[el, {level: @level+1, pid: @sid, pos:index}]" />
</div>
</div>
*/
}),
defaults: {
sid: 0,
pid: 0,
level: 0,
pos: 0,
children: [],
cls: '',
click: function() {
var vm = this
var parentVm = treeCaches[vm.pid]
if(parentVm){
parentVm.cls = new Date - 0
}
},
onReady: function(e) {
var vm = e.vmodel
vm.sid = vm.sid == 0 ? Math.random() : vm.sid
treeCaches[vm.sid] = vm
console.log(treeCaches)
}
}
})
var vm = avalon.define({
$id: 'test',
options: {
sid: 'top',
pid: null,
level: 0,
cls: 'open',
pos: 0,
children: [{
children: [{
children: [
{children:[]}
]
}]
}, {
children: [{
children: []
}]
}, {
children: [{
children: []
}]
}]
}

})
</script>
<style>
.tree-node {

}
</style>
<div ms-controller="test">
<wbr is="tree" ms-widget="@options" />
</div>
</body>

</html>

0 comments on commit 3dbb060

Please sign in to comment.