发表于: 2016-12-19 23:52:21
0 1597
今天完成的事:
1,测试修真院我的师兄和师弟接口,修改修真院首页
明天计划的事:
1,准备修真院8期demo
2,学习图片上传
遇到的问题:
1,hover属性在手机端效果发生变化,比如在web端鼠标悬浮和离开某个DIV,在手机端变为点击该DIV和点击该DIV之外触发,考虑到用户体验,希望在手机端实现只需点击DIV触发,点击DIV之外则无效,解决思路是:给该DIV设置ng-mouseenter和ng-mouseleave指令和ng-click指令,通过判断赋值给
ng-mouseenter和ng-mouseleave,效果不好,存在漏洞,暂时没想到更好的解决方法
收获:
1,angularjs跳转到新窗口:
1)用a标签的target属性,<a ui-sref="skill.occupation.task({oid:1})" target="_blank">,不过这个只能用于a标签和ui-sref
2)通过点击事件跳转,window.open(''),貌似用$state.go('')是实现不了的
2,判断obj是否为空
var hasProp = false;
for (var prop in obj) {
hasProp = true;
break;
}
if (!hasProp) {return true}
else return false}
}
3,分页时给当前页码设置特殊样式,
<button type="button" ng-disabled="isDisabled(li)" ng-click="goPage(li)"
class="btn btn-default bgd-00ac6f">{{li}}</button>
.bgd-00ac6f[disabled]{
background: #26a26f!important;
color:white!important;}
评论