diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss index b6d42b9..c5232a4 100644 --- a/src/assets/styles/element-ui.scss +++ b/src/assets/styles/element-ui.scss @@ -73,6 +73,41 @@ } } +// 下拉和提示挂在 body 上,不吃汇聚页的 zoom。 +// 不用 zoom 去改它们:zoom 会把下拉列表高度算成 0,选项就变成一条空带子。 +// 字号、行高按汇聚页同一比例走,浏览器再放大时会和页面一起被压回去。 +html[data-portal-scale] { + .el-message { + height: calc(48px * var(--portal-scale)) !important; + min-width: calc(380px * var(--portal-scale)); + padding: 0 calc(16px * var(--portal-scale)) !important; + font-size: calc(14px * var(--portal-scale)); + + .el-message__icon { + font-size: calc(16px * var(--portal-scale)); + margin-right: calc(10px * var(--portal-scale)); + } + + .el-message__content { + font-size: calc(14px * var(--portal-scale)); + line-height: calc(18px * var(--portal-scale)) !important; + max-height: calc(48px * var(--portal-scale)); + } + } + + .el-select-dropdown__item { + height: calc(34px * var(--portal-scale)); + line-height: calc(34px * var(--portal-scale)); + padding: 0 calc(20px * var(--portal-scale)); + font-size: calc(14px * var(--portal-scale)); + } + + .el-select-dropdown__empty { + padding: calc(10px * var(--portal-scale)) 0; + font-size: calc(14px * var(--portal-scale)); + } +} + // refine element ui upload .upload-container { .el-upload { diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 7c6cef1..07c469c 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -50,7 +50,7 @@ &.has-logo { .el-scrollbar { - height: calc(100% - 50px); + height: calc(100% - 5.5vh); } } diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 54f69ed..d2bd206 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -46,8 +46,8 @@ export default { diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 4143561..6e7f27b 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -175,7 +175,7 @@ export default { @import "~@/assets/styles/variables.scss"; .navbar { - height: 50px; + height: 5.5vh; overflow: hidden; position: relative; display: flex; @@ -195,7 +195,7 @@ export default { pointer-events: none; background-repeat: no-repeat; background-position: center center; - background-size: auto 100%; + background-size: 100% 100%; background-color: #11194f; box-sizing: border-box; } diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index ef60a5d..99780a4 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -33,7 +33,7 @@ export default { .sidebar-logo-container { position: relative; width: 100%; - height: 50px; + height: 5.5vh; background: transparent; overflow: hidden; display: flex; diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 13eb29e..39542c6 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -40,20 +40,19 @@ v-for="tag in visitedViews" ref="tag" :key="tag.path" + :data-path="tag.path" :class="[isActive(tag) ? 'active' : '', { 'is-dragging': dragTag && dragTag.path === tag.path }]" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" - draggable="true" - @dragstart.native="onTagDragStart(tag, $event)" - @dragover.native.prevent="onTagDragOver(tag, $event)" - @drop.native.prevent="onTagDrop(tag)" - @dragend.native="onTagDragEnd" + @pointerdown.native="onTagPointerDown(tag, $event)" @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''" @contextmenu.prevent.native="openMenu(tag,$event)" > - {{ titleFn(tag.title) }} - +