Vue框架的自定义属性

(1)自定义全局的按键修饰符:Vue.config.keyCode.f2=113;
*
* (2)自定义指令: v-指令名
* 定义全局指令: Vue.directive(‘指令名’,{
* bind:function(el,binding){
*
* },
* inserted:function(el,binding){
*
* },
* updated:function(el,binding){
*
* }
* });
* 定义局部指令:vm对象中,接着methods后面添加,也是一个对象
* directives:{
* ‘指令名’,function(el,binding){
*
* }
* }
* (4) vue-resource
* get:this. h t t p . g e t ( ′ 网 址 ′ , [ o p t i o n s ] ) . t h e n ( s u c c e s s c a l l b a c k , e r r o r c a l l b a c k ) ; ∗ p o s t : t h i s . http.get('网址',[options]).then(successcallback,errorcallback); * post:this. http.get(,[options]).then(successcallbackerrorcallback)post:this.http.post(‘网址’,[body],[options]).then(successcallback,errorcallback);
*

你可能感兴趣的:(Vue框架的自定义属性)