硬编码转换单位||vue

//测试单位
formatUnit:function (id) {
var val;
switch(id){
case 4:
return val="圈"
break;
}
}

//弹出层测试介绍方法
formatind:function (id) {
var val;
switch(id){
case 4:
val={
info:"心血管疾病风险因子越少。",
step:"根据一定的节奏后计算得出最大摄氧量"
}
break;
}
return val;
}

import commons from '../assets/js/commons.js';
var infos = commons.formatind(id)['info'];

posted @ 2017-07-21 11:02  Y.anCy  阅读(152)  评论(0编辑  收藏  举报