红色是我们添加代码
我们在'<i class="icon {{pullingIcon}}"></i>' 添加style="color:{{pullingIconColor}}",变成
<i class="icon {{pullingIcon}}" style="color:{{pullingIconColor}}"></i>
在<i ng-if="showIcon" class="icon {{refreshingIcon}}"></i>中添加style="color:{{refreshingIconColor}}",最终变成<i ng-if="showIcon" class="icon {{refreshingIcon}}" style="color:{{refreshingIconColor}}"></i>
(2)再找到$ionicRefresher这个控制器,代码如下:
IonicModule
.controller('$ionicRefresher', [
'$scope',
'$attrs',
'$element',
'$ionicBind',
'$timeout',
function($scope, $attrs, $element, $ionicBind, $timeout) {
var self = this,
isDragging = false,
isOverscrolling = false,
dragOffset = 0,
lastOverscroll = 0,
ptrThreshold = 60,
activated = false,
scrollTime = 500,
startY = null,
deltaY = null,
canOverscroll = true,
scrollParent,
scrollChild;
if (!isDefined($attrs.pullingIcon)) {
$attrs.$set('pullingIcon', 'ion-android-arrow-down');
}
if (!isDefined($attrs.refreshingIconColor)) {
$attrs.$set('refreshingIconColor', 'none');
}
if (!isDefined($attrs.refreshingIconColor)) {
$attrs.$set('pullingIconColor', 'none');
}
$scope.showSpinner = !isDefined($attrs.refreshingIcon) && $attrs.spinner != 'none';
$scope.showIcon = isDefined($attrs.refreshingIcon);
$ionicBind($scope, $attrs, {
pullingIcon: '@',
pullingIconColor: '@',
pullingText: '@',
refreshingIcon: '@',
refreshingIconColor: '@',
refreshingText: '@',
spinner: '@',
disablePullingRotation: '@',
$onRefresh: '&onRefresh',
$onPulling: '&onPulling'
});
........添加了一下代码
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-47765-2.html
坚决抵制这种行为