历史纪录最多保存15条
This commit is contained in:
parent
a8f8a29cfb
commit
863b2dff2e
|
|
@ -160,7 +160,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
|
|
||||||
function saveHistory() {
|
function saveHistory() {
|
||||||
var datas = [];
|
var datas = [];
|
||||||
$scope.searchHistory.slice(0, 15); // 最多保留15个历史记录
|
$scope.searchHistory = $scope.searchHistory.slice(0, 15); // 最多保留15个历史记录
|
||||||
$scope.searchHistory.forEach((item, index) => {
|
$scope.searchHistory.forEach((item, index) => {
|
||||||
datas.push({
|
datas.push({
|
||||||
t: item.t,
|
t: item.t,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue