快速跳转按字幕排序

This commit is contained in:
luchenqun 2018-05-25 10:46:48 +08:00
parent d3c0f7e4e1
commit e8ce732a02
2 changed files with 12 additions and 1 deletions

View File

@ -59,7 +59,17 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$
$scope.loadShowStyle = false;
}
if (index == 4) {
$scope.quickUrl = JSON.parse($scope.user.quick_url || '{}');
function objKeySort(obj) {
var newkey = Object.keys(obj).sort();
var newObj = {};
for (var i = 0; i < newkey.length; i++) {
newObj[newkey[i]] = obj[newkey[i]];
}
return newObj;//返回排好序的新对象
}
$scope.quickUrl = objKeySort(JSON.parse($scope.user.quick_url || '{}'));
}
})
.catch((err) => {

View File

@ -166,6 +166,7 @@
<p>以下几个系统默认使用的按键无法使用:<br/>
<span ng-repeat="(key, value) in forbidQuickKey">{{key}}{{value}}<br/></span>
</p>
<p>如果你想更换快捷链接,你需要先删除再添加。</p>
<div class="ui divider"></div>
<div class="ui form">
<div class="inline fields">