first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
class Edit {
constructor() {
pHeader("分类编辑")
// 已选
this.principal = get_storage("principal")
// 待选
this.additional = get_storage("additional")
this.yx();
}
yx () {
$(".yx").empty()
this.principal.forEach(v => {
$(".yx").append(`
<li>${v.title}</li>
`)
});
var self = this
$(".yx li").click(function () {
self.additional.push(self.principal[$(this).index()])
self.principal = self.principal.filter((v,i) => {
if (i != $(this).index()) {
return v
}
});
set_storage("principal", self.principal)
set_storage("additional", self.additional)
self.yx()
})
$(".dx").empty()
this.additional.forEach(v => {
$(".dx").append(`
<li>${v.title}</li>
`)
})
var self = this
$(".dx li").click(function () {
self.principal.push(self.additional[$(this).index()])
self.additional = self.additional.filter((v,i) => {
if (i != $(this).index()) {
return v
}
});
set_storage("principal", self.principal)
set_storage("additional", self.additional)
self.yx()
})
}
}
new Edit()