chore: packages update latest version

This commit is contained in:
xiaoxian521
2021-09-15 23:17:46 +08:00
parent 03955f7470
commit 1ffe435f69
7 changed files with 247 additions and 135 deletions

View File

@@ -1,5 +1,5 @@
import { Directive } from "vue";
import type { DirectiveBinding } from "vue";
import type { DirectiveBinding, VNode } from "vue";
import elementResizeDetectorMaker from "element-resize-detector";
import type { Erd } from "element-resize-detector";
import { emitter } from "/@/utils/mitt";
@@ -9,7 +9,7 @@ const erd: Erd = elementResizeDetectorMaker({
});
export const resize: Directive = {
mounted(el: HTMLElement, binding?: DirectiveBinding, vnode?: any) {
mounted(el: HTMLElement, binding?: DirectiveBinding, vnode?: VNode) {
erd.listenTo(el, elem => {
const width = elem.offsetWidth;
const height = elem.offsetHeight;

View File

@@ -33,9 +33,9 @@
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item icon="el-icon-switch-button" @click="logout">
{{ $t("message.hsLoginOut") }}
</el-dropdown-item>
<el-dropdown-item icon="el-icon-switch-button" @click="logout">{{
$t("message.hsLoginOut")
}}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -64,6 +64,17 @@ import { emitter } from "/@/utils/mitt";
import { deviceDetection } from "/@/utils/deviceDetection";
import { useI18n } from "vue-i18n";
let routerArrays: Array<object> = [
{
path: "/welcome",
meta: {
title: "message.hshome",
icon: "el-icon-s-home",
showLink: true,
savedPosition: false
}
}
];
export default defineComponent({
name: "Navbar",
components: {
@@ -75,6 +86,14 @@ export default defineComponent({
computed: {
// eslint-disable-next-line vue/return-in-computed-property
currentLocale() {
if (
!this.$storage.routesInStorage ||
this.$storage.routesInStorage.length === 0
) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.$storage.routesInStorage = routerArrays;
}
if (!this.$storage.locale) {
// eslint-disable-next-line
this.$storage.locale = { locale: "zh" };

View File

@@ -14,9 +14,9 @@
@mouseenter.prevent="onMouseenter(item, index)"
@mouseleave.prevent="onMouseleave(item, index)"
>
<router-link :to="item.path" @click="tagOnClick(item)">
{{ $t(item.meta.title) }}
</router-link>
<router-link :to="item.path" @click="tagOnClick(item)">{{
$t(item.meta.title)
}}</router-link>
<span
v-if="
($route.path === item.path && index !== 0) ||
@@ -134,13 +134,6 @@ export default {
// @ts-ignore
computed: {
dynamicTagList() {
if (
!this.$storage.routesInStorage ||
this.$storage.routesInStorage.length === 0
) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.$storage.routesInStorage = routerArrays;
}
return this.$storage.routesInStorage;
}
},

View File

@@ -32,7 +32,6 @@ import {
ElRadioButton,
ElRadioGroup
} from "element-plus";
import "element-plus/dist/index.css";
const components = [
ElAffix,