Skip to content

Commit

Permalink
add bindSelf
Browse files Browse the repository at this point in the history
  • Loading branch information
abwang(王振东) committed Dec 26, 2016
1 parent b2b79ef commit 84483c9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions transformjs/vue/transform.vue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
;(function(){
var Transform = typeof require === 'function'
? require('../transform.js')
: window.Transform;

var vueTransform = {}

vueTransform.install = function(Vue){
var isVue2 = !!(Vue.version.substr(0,1) == 2);

var directiveBinding = {
bind: function(el, binding){
Transform(el);
var value = binding.value;
for(var key in value){
el[key] = value[key];
}
},
update: function(el, binding){
for(var key in value){
el[key] = value[key];
}
},
unbind: function(){

}
}
}

})();
1 change: 0 additions & 1 deletion vue/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

腾讯AlloyTeam移动Web触摸解决方案


### Demo(Mobile)

- 滚动列表Vue1: [http://alloyteam.github.io/AlloyTouch/vue/example/](http://alloyteam.github.io/AlloyTouch/vue/example/vue1)
Expand Down
1 change: 1 addition & 0 deletions vue/alloy_touch.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ vueAlloyTouch.install = function(Vue){
var result = {
touch: el,//反馈触摸的dom
target: el, //运动的对象
bindSelf: _getOption(options.bindSelf, false),
property: _getOption(options.property, 'translateY'), //被运动的属性
vertical: _getOption(options.vertical,1),//不必需,默认是true代表监听竖直方向touch
min: _getOption(options.min, 0), //不必需,运动属性的最小值
Expand Down

0 comments on commit 84483c9

Please sign in to comment.