Authored by 毕凯

侧边栏目数据支持驼峰

@@ -51,6 +51,11 @@ const getLeftNav = (guangChoosed) => { @@ -51,6 +51,11 @@ const getLeftNav = (guangChoosed) => {
51 result = JSON.parse(result); 51 result = JSON.parse(result);
52 52
53 if (result.code === 200) { 53 if (result.code === 200) {
  54 + _.forEach(result.data, (item) => {
  55 + _.forEach(Object.keys(item), (k) => {
  56 + item[_.camelCase(k)] = item[k]; // 下划线变量名转换为驼峰
  57 + });
  58 + });
54 return result.data; 59 return result.data;
55 } else { 60 } else {
56 return result; 61 return result;
1 <div class="side-nav"> 1 <div class="side-nav">
2 - {{log sideNav}}  
3 {{# sideNav}} 2 {{# sideNav}}
4 <ul {{#if @first}}class="first"{{/if}}> 3 <ul {{#if @first}}class="first"{{/if}}>
5 {{# this}} 4 {{# this}}