fix: format the files using latest .eslintrc.json

This commit is contained in:
niubility000 2024-03-23 16:46:55 +08:00 committed by GitHub
parent 2f28bb4e62
commit f75e4a275e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 16 deletions

View File

@ -1,9 +1,5 @@
<template> <template>
<div <div id="editor-container" @touchmove.prevent.stop @wheel.prevent.stop>
id="editor-container"
@touchmove.prevent.stop
@wheel.prevent.stop
>
<header-bar> <header-bar>
<action icon="close" :label="$t('buttons.close')" @action="close()" /> <action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ req.name }}</title> <title>{{ req.name }}</title>

View File

@ -383,7 +383,10 @@ export default {
}, },
watch: { watch: {
req: function () { req: function () {
if (window.sessionStorage.getItem("listFrozen") !=="true" && window.sessionStorage.getItem("modified") !=="true"){ if (
window.sessionStorage.getItem("listFrozen") !== "true" &&
window.sessionStorage.getItem("modified") !== "true"
) {
// Reset the show value // Reset the show value
this.showLimit = this.req.numDirs + this.req.numFiles; this.showLimit = this.req.numDirs + this.req.numFiles;
@ -395,9 +398,14 @@ export default {
// Fill and fit the window with listing items // Fill and fit the window with listing items
this.fillWindow(true); this.fillWindow(true);
if (window.sessionStorage.getItem(this.$route.path)) { if (window.sessionStorage.getItem(this.$route.path)) {
document.documentElement.scrollTop = JSON.parse(window.sessionStorage.getItem(this.$route.path))[0]; document.documentElement.scrollTop = JSON.parse(
if(!this.isMobile) this.addSelected(JSON.parse(window.sessionStorage.getItem(this.$route.path))[1]); window.sessionStorage.getItem(this.$route.path)
window.sessionStorage.removeItem(this.$route.path); )[0];
if (!this.isMobile)
this.addSelected(
JSON.parse(window.sessionStorage.getItem(this.$route.path))[1]
);
window.sessionStorage.removeItem(this.$route.path);
} }
}); });
} }
@ -887,9 +895,13 @@ export default {
const windowHeight = window.innerHeight; const windowHeight = window.innerHeight;
// Quantity of items needed to fill 2x of the window height // Quantity of items needed to fill 2x of the window height
const showQuantity = window.sessionStorage.getItem(this.$route.path) ? const showQuantity = window.sessionStorage.getItem(this.$route.path)
Math.ceil((JSON.parse(window.sessionStorage.getItem(this.$route.path))[0] + windowHeight * 2) / this.itemWeight) : ? Math.ceil(
Math.ceil((windowHeight + windowHeight * 2) / this.itemWeight); (JSON.parse(window.sessionStorage.getItem(this.$route.path))[0] +
windowHeight * 2) /
this.itemWeight
)
: Math.ceil((windowHeight + windowHeight * 2) / this.itemWeight);
// Less items to display than current // Less items to display than current
if (this.showLimit > showQuantity && !fit) return; if (this.showLimit > showQuantity && !fit) return;

View File

@ -6,7 +6,7 @@
@mousemove="toggleNavigation" @mousemove="toggleNavigation"
@touchstart="toggleNavigation" @touchstart="toggleNavigation"
> >
<header-bar v-if="showNav"> <header-bar v-if="showNav">
<action icon="close" :label="$t('buttons.close')" @action="close()" /> <action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ name }}</title> <title>{{ name }}</title>
<action <action