import Vue from 'vue'
Vue.component('order-btn', {
render:function(createElement){
let self = this
return createElement(
'div',
{
on:{click:function(){
console.log('success')
}},
},
self.order2Operate(self.status)
)
},
props:{
status
},
methods:{
order2Operate(status){
switch(status){
case 1:
return "待付款"
break;
case 2:
return "待成团"
break;
case 3:
return "待发货"
break;
case 4:
return "待收货"
break;
case 5:
return "待评价"
break;
default:
return "***"
}
}
}
})
export default{
data(){
return{
statue:[1,2,3,4,5]
}
}
}