gpt4 book ai didi

jquery - 一些使用后 ionic 滚动停止工作

转载 作者:可可西里 更新时间:2023-11-01 13:32:36 25 4
gpt4 key购买 nike

我正在开发一个 ionic 应用程序。现在我遇到了 ionic 滚动一段时间后无法正常工作的问题。在设备中运行该应用程序时,滚动会正常工作。但是一段时间后,我的应用程序中的其他形式的滚动停止工作。它没有卡住应用程序,因为即使滚动不起作用,我仍然可以在表单中的字段中输入输入数据。问题是我无法查看底部的字段,因为滚动不起作用。有人对此有解决方案吗?

我会在这里发布一个html表格。所有其他表格都是这样完成的

<ion-view title="rrrr">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>

<ion-content class="has-header" scroll="true" padding="true">

<ion-list>

<!-- pass in the variable if our form is valid or invalid -->
<form name="userForm" ng-submit="submitForm(userForm.$valid)" novalidate>

<div class="form-group" ng-class="{ 'has-error' : userForm.name.$invalid && !userForm.name.$pristine }">
<label><h4><b>Beneficiary Name*</b></h4></label>
<input type="text" name="name" class="item-input-wrapper" ng-model="user.name" ng-maxlength="50" required>
<p ng-show="userForm.name.$invalid && !userForm.name.$pristine " class="help-block"><font color="red">You name is required.</font></p>

</div>

<div class="form-group" ng-class="{ 'has-error' : userForm.accNo.$invalid && !userForm.accNo.$pristine }">
<label><h4><b>Beneficiary Account Number*</b></h4></label>
<input type="number" name="accNo" class="item-input-wrapper" ng-model="user.accNo" ng-maxlength="10" required>
<p ng-show="userForm.name.$invalid && !userForm.name.$pristine " class="help-block"><font color="red">Account number is required</font></p>
<p ng-show="userForm.accNo.$error.maxlength" class="help-block"><font color="red">Account number cannot exceed 10 digits.</font></p>
</div>

<div class="form-group">
<label><h4><b>Bank Name*</b></h4></label>
<select style="margin: auto; width:100%; height=35px;" id="user.bank" ng-model="user.bank" ng-options="bank.bank for bank in banks" >
<option id="default" value="" selected="selected">--Select Bank--</option>

</select>

</div>


<label><h4><b>Bank Code*</b></h4></label>
<input type="text" name="bcode" class="item-input-wrapper" ng-model="user.bankCode" required>

<div class="form-group" ng-class="{ 'has-error' : userForm.brname.$invalid && !userForm.brname.$pristine }">

<label><h4><b>Branch Name*</b></h4></label>
<input type="text" name="brname" class="item-input-wrapper" ng-model="user.bankBranch" required>
<p ng-show="userForm.brname.$invalid && !userForm.brname.$pristine " class="help-block"><font color="red">Branch Name is required</font></p>
</div>


<div class="col"style="text-align: center">
<button align="left"class="button button-block button-reset"style="display: inline-block;width:100px;text-align:center "
type="reset"
ng-click="reset()"padding-top="true">Reset</button>


<button class="button button-block button-positive" style="display: inline-block;width:100px "
ng-click="submit(user)"padding-top="true">Submit</button>
</div>



</form>
</ion-list>
</ion-content>
</ion-view>

angularjs 用于此

$scope.data = {
origin: { account : ''},
beneAcc: '',
narration: '',
beneName: '',
beneBank: {account : ''},
transtype: '',
beneBranch: '',
password: '',
amount: ''
};

$scope.orig = angular.copy($scope.data);
$scope.accountsArr = [];

for(k=0;k<$rootScope.rootScopeUserAccounts.length;k++){
var accountObject = $rootScope.rootScopeUserAccounts[k];
$scope.accountsArr.push({ account: accountObject.userAccountNumber });
}

//gaveen
$scope.listOne = [{"id":"1","name":"Internal"},{"id":"2","name":"SLIPS"},{"id":"3","name":"CEFT"}]
$scope.listTwo = [{"id":"1","name":"Seylan Bank"},{"id":"2","name":"Sampath Bank"},{"id":"3","name":"BOC"}]
$scope.listThree = [{"id":"1","name":"Colombo 01"},{"id":"2","name":"Colombo 02"},{"id":"3","name":"Colombo 03"}]

// $scope.data.transtype = $scope.listOne[0].name;

$scope.hideFields = function() {
if($scope.data.transtype.name == "Internal") {
$scope.disableFields = true;
$scope.typeFlag= false;
}
else{
$scope.disableFields = false;
$scope.typeFlag= true;
}
};

$scope.bank = [
{ bank : 'Sampath Bank'},
{bank : 'BOC'},
];

$scope.thirdPartySubmit = function(selectData) {
window.alert(selectData.amount);
//
console.log("came here!");

//add decimals to whole numbers.
if(selectData.amount % 1 == 0){
var transferAmount = parseFloat(selectData.amount).toFixed(2);
window.alert(transferAmount);
}

//create json dictionary.
var data = {
"transferedAmount" : selectData.amount,
"beneficiaryAccountNumber" : selectData.beneAcc,
"beneficiaryType" : "THIRD_PARTY",
"beneficiaryBankName" : selectData.beneBank.name,
"beneficiaryName" : selectData.beneName,
"branchName" : selectData.beneBranch.name,
"userAccountNumber" : selectData.origin.account,
"narration" : selectData.narration,
"userName" : "retail123",
"thirdPartyFundTransferType" : selectData.transtype.name
};
window.alert(data);
$scope.jsonData = JSON.stringify(data);

window.alert($scope.jsonData);

//POST data
$http({
method: 'POST',
url: ApplicationSettings.http_server + 'account service/fund-transfer/save',
data: $scope.jsonData
})
.success(function(data, status, headers, config) {
console.log("Success");
window.alert("Transaction success!");
$scope.data = angular.copy($scope.orig);
$scope.thirdPartyForm.$setPristine();
})
.error(function(data,status, headers, config) {
// execute this code on error
window.alert("error");
window.alert(status);
//refreshTextFields.refresh(selectData);
$scope.data = angular.copy($scope.orig);
$scope.thirdPartyForm.$setPristine();
console.error('ERR', err);
});
}
//end of function

$scope.reset = function () {
$scope.data = angular.copy($scope.orig);
$scope.thirdPartyForm.$setPristine();
};
}])

最佳答案

你的 ionic-framework 版本是多少?

我在使用 ionic 版本 1.0.0-beta9 的三星 S3 上遇到了同样的问题。

根据这个问题:https://github.com/driftyco/ionic/issues/1433

大于 1.0.0-beta12 的版本应该可以正常滚动。

关于jquery - 一些使用后 ionic 滚动停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26174048/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com