|
1 | 1 | const $ = new Env('BoxJs') |
2 | 2 | $.domain = '8.8.8.8' |
3 | 3 |
|
4 | | -$.version = '0.6.3' |
| 4 | +$.version = '0.6.4' |
5 | 5 | $.versionType = 'beta' |
6 | 6 | $.KEY_sessions = 'chavy_boxjs_sessions' |
7 | 7 | $.KEY_versions = 'chavy_boxjs_versions' |
@@ -1220,6 +1220,13 @@ function printHtml(data, curapp = null, curview = 'app') { |
1220 | 1220 | <v-list-item-title>复制</v-list-item-title> |
1221 | 1221 | </v-list-item> |
1222 | 1222 | <v-divider></v-divider> |
| 1223 | + <v-list-item v-if="subIdx > 0" @click="onMoveSub(subIdx, -1)"> |
| 1224 | + <v-list-item-title>上移</v-list-item-title> |
| 1225 | + </v-list-item> |
| 1226 | + <v-list-item v-if="subIdx + 1 < appsubs.length" @click="onMoveSub(subIdx, 1)"> |
| 1227 | + <v-list-item-title>下移</v-list-item-title> |
| 1228 | + </v-list-item> |
| 1229 | + <v-divider></v-divider> |
1223 | 1230 | <v-list-item @click="onDelAppSub(sub)"> |
1224 | 1231 | <v-list-item-title>删除</v-list-item-title> |
1225 | 1232 | </v-list-item> |
@@ -1748,6 +1755,13 @@ function printHtml(data, curapp = null, curview = 'app') { |
1748 | 1755 | this.box.usercfgs.favapps.splice(fromIdx, 1, ...this.box.usercfgs.favapps.splice(toIdx, 1, this.box.usercfgs.favapps[fromIdx])) |
1749 | 1756 | this.onUserCfgsChange() |
1750 | 1757 | }, |
| 1758 | + onMoveSub(subIdx, moveCnt) { |
| 1759 | + const fromIdx = subIdx |
| 1760 | + const toIdx = subIdx + moveCnt |
| 1761 | + this.box.appsubs.splice(fromIdx, 1, ...this.box.appsubs.splice(toIdx, 1, this.box.appsubs[fromIdx])) |
| 1762 | + this.box.usercfgs.appsubs.splice(fromIdx, 1, ...this.box.usercfgs.appsubs.splice(toIdx, 1, this.box.usercfgs.appsubs[fromIdx])) |
| 1763 | + this.onUserCfgsChange() |
| 1764 | + }, |
1751 | 1765 | onFav(app) { |
1752 | 1766 | const appIdx = this.box.sysapps.findIndex((appId) => appId === app.id) |
1753 | 1767 | app.isFav = !app.isFav |
|
0 commit comments