mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
[前端]修复userList页面avalon重定义问题[CI SKIP]
This commit is contained in:
parent
581bc61c96
commit
876af8d233
@ -3,7 +3,16 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "validator"], function ($,
|
||||
|
||||
// avalon:定义模式 userList
|
||||
avalon.ready(function () {
|
||||
avalon.vmodels.userList = null;
|
||||
//avalon.vmodels.userList = null;
|
||||
if (avalon.vmodels.userList) {
|
||||
var vm = avalon.vmodels.userList;
|
||||
// initialize avalon object
|
||||
userList= [], previousPage= 0, nextPage= 0, page= 1,
|
||||
editingUserId= 0, totalPage: 1, keyword: "", showAdminOnly: false,
|
||||
//user editor fields
|
||||
username: "", realName: "", email: "", adminType: 0, id: 0,
|
||||
}
|
||||
else {
|
||||
var vm = avalon.define({
|
||||
$id: "userList",
|
||||
//通用变量
|
||||
@ -55,6 +64,7 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "validator"], function ($,
|
||||
getPageData(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
vm.$watch("showAdminOnly", function () {
|
||||
getPageData(1);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user