mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 23:47:39 +08:00
style: Optimize page style (#8562)
This commit is contained in:
parent
a400caa114
commit
af2b53412d
6 changed files with 23 additions and 16 deletions
|
@ -127,7 +127,7 @@ const showBack = computed(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container__main {
|
.content-container__main {
|
||||||
margin-top: 7px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prompt {
|
.prompt {
|
||||||
|
|
|
@ -80,4 +80,7 @@ const dropdownVisibleChange = (visible, tabPath) => {
|
||||||
:deep(.el-tabs__header) {
|
:deep(.el-tabs__header) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.common-tabs {
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div :class="classObj" class="app-wrapper" v-loading="loading" :element-loading-text="loadingText" fullscreen>
|
<div :class="classObj" class="app-wrapper" v-loading="loading" :element-loading-text="loadingText" fullscreen>
|
||||||
<div v-if="classObj.mobile && classObj.openSidebar" class="drawer-bg" @click="handleClickOutside" />
|
<div v-if="classObj.mobile && classObj.openSidebar" class="drawer-bg" @click="handleClickOutside" />
|
||||||
<div class="app-sidebar" v-if="!globalStore.isFullScreen">
|
<div class="app-sidebar" v-if="!globalStore.isFullScreen">
|
||||||
<el-affix :offset="17" class="affix">
|
<el-affix :offset="15" class="affix">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
:content="menuStore.isCollapse ? $t('commons.button.expand') : $t('commons.button.collapse')"
|
:content="menuStore.isCollapse ? $t('commons.button.expand') : $t('commons.button.collapse')"
|
||||||
>
|
>
|
||||||
|
|
|
@ -272,7 +272,7 @@ html {
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-interval {
|
.card-interval {
|
||||||
margin-top: 7px;
|
margin-top: 7px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-w-300 {
|
.p-w-300 {
|
||||||
|
|
|
@ -354,6 +354,8 @@
|
||||||
:data="data"
|
:data="data"
|
||||||
@search="search"
|
@search="search"
|
||||||
@sort-change="changeSort"
|
@sort-change="changeSort"
|
||||||
|
@cell-mouse-enter="showFavorite"
|
||||||
|
@cell-mouse-leave="hideFavorite"
|
||||||
:heightDiff="300"
|
:heightDiff="300"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="30" />
|
<el-table-column type="selection" width="30" />
|
||||||
|
@ -366,7 +368,7 @@
|
||||||
prop="name"
|
prop="name"
|
||||||
>
|
>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<div class="file-row" @mouseenter="showFavorite($index)" @mouseleave="hideFavorite">
|
<div class="file-row">
|
||||||
<div>
|
<div>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="row.isDir"
|
v-if="row.isDir"
|
||||||
|
@ -487,20 +489,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref, computed } from '@vue/runtime-core';
|
import { computed, nextTick, onMounted, reactive, ref } from '@vue/runtime-core';
|
||||||
import {
|
import {
|
||||||
getFilesList,
|
|
||||||
getFileContent,
|
|
||||||
computeDirSize,
|
|
||||||
addFavorite,
|
addFavorite,
|
||||||
|
computeDirSize,
|
||||||
|
fileWgetKeys,
|
||||||
|
getFileContent,
|
||||||
|
getFilesList,
|
||||||
removeFavorite,
|
removeFavorite,
|
||||||
searchFavorite,
|
searchFavorite,
|
||||||
fileWgetKeys,
|
|
||||||
searchHostMount,
|
searchHostMount,
|
||||||
} from '@/api/modules/files';
|
} from '@/api/modules/files';
|
||||||
import { computeSize, copyText, dateFormat, getFileType, getIcon, getRandomStr, downloadFile } from '@/utils/util';
|
import { computeSize, copyText, dateFormat, downloadFile, getFileType, getIcon, getRandomStr } from '@/utils/util';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { Mimetypes, Languages } from '@/global/mimetype';
|
import { Languages, Mimetypes } from '@/global/mimetype';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { MsgWarning } from '@/utils/message';
|
import { MsgWarning } from '@/utils/message';
|
||||||
import { useSearchable } from './hooks/searchable';
|
import { useSearchable } from './hooks/searchable';
|
||||||
|
@ -1102,8 +1104,8 @@ const changeSort = ({ prop, order }) => {
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
||||||
const showFavorite = (index: any) => {
|
const showFavorite = (row: any) => {
|
||||||
hoveredRowIndex.value = index;
|
hoveredRowIndex.value = data.value.findIndex((item) => item === row);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hideFavorite = () => {
|
const hideFavorite = () => {
|
||||||
|
|
|
@ -79,6 +79,8 @@
|
||||||
:class="{ mask: nginxStatus != 'Running' }"
|
:class="{ mask: nginxStatus != 'Running' }"
|
||||||
:heightDiff="310"
|
:heightDiff="310"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
@cell-mouse-enter="showFavorite"
|
||||||
|
@cell-mouse-leave="hideFavorite"
|
||||||
localKey="websiteColumn"
|
localKey="websiteColumn"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -91,7 +93,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<div class="name-row" @mouseenter="showFavorite($index)" @mouseleave="hideFavorite">
|
<div class="name-row">
|
||||||
<div>
|
<div>
|
||||||
<el-text type="primary" class="cursor-pointer" @click="openConfig(row.id)">
|
<el-text type="primary" class="cursor-pointer" @click="openConfig(row.id)">
|
||||||
{{ row.primaryDomain }}
|
{{ row.primaryDomain }}
|
||||||
|
@ -376,8 +378,8 @@ const goRouter = async (key: string) => {
|
||||||
router.push({ name: 'AppAll', query: { install: key } });
|
router.push({ name: 'AppAll', query: { install: key } });
|
||||||
};
|
};
|
||||||
|
|
||||||
const showFavorite = (index: any) => {
|
const showFavorite = (row: any) => {
|
||||||
hoveredRowIndex.value = index;
|
hoveredRowIndex.value = data.value.findIndex((item) => item === row);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hideFavorite = () => {
|
const hideFavorite = () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue