Skip to content

Commit

Permalink
Merge pull request #79 from meadmin-cn/release
Browse files Browse the repository at this point in the history
Release 1.1.19
  • Loading branch information
yuntian001 authored Dec 3, 2023
2 parents a71b626 + 810a9bd commit 9fc8aec
Show file tree
Hide file tree
Showing 23 changed files with 372 additions and 50 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@


## [1.1.19](https://github.com/meadmin-cn/meadmin-template/compare/main-1.1.18...main-1.1.19) (2023-12-03)


### 重构[refactor]

* 优化默认样式,干掉一闪而过的滚动条 ([279a93c](https://github.com/meadmin-cn/meadmin-template/commit/279a93c1826be9245c450e638995cba98b58994e))


### 新功能[feat]

* 加上菜单侧边栏和左侧模式 ([63e83c6](https://github.com/meadmin-cn/meadmin-template/commit/63e83c6efbf49f014ccba89c46f629909b77a020))
* tag菜单加上body点击时关闭 ([4553bde](https://github.com/meadmin-cn/meadmin-template/commit/4553bde10ef28a62131c803475a9b34e2ab2f76e))
* tag滚动会自动多展示前一个/后一个tag ([33dfb3b](https://github.com/meadmin-cn/meadmin-template/commit/33dfb3bab2cff0f6559df6acfa9c93f147a19447))
* tag滚动会自动多展示前一个/后一个tag ([4d40627](https://github.com/meadmin-cn/meadmin-template/commit/4d406275216cdb0d63c82a80a775ec2e0106e569))


### 其他[chore]

* template-release v1.1.18 ([499861d](https://github.com/meadmin-cn/meadmin-template/commit/499861d2647fb879a78b266aa79fa4198edd9c19))
* template-release v1.1.19 ([794ff24](https://github.com/meadmin-cn/meadmin-template/commit/794ff248cb0d93dba847029713d622141f417b51))


### Bug 修复[fix]

* 加上 :column-config="{useKey:true}" 修复新版vxe-table报错 ([5079e3c](https://github.com/meadmin-cn/meadmin-template/commit/5079e3cc6ec670ed9b030054623ac96f4889e986))
* 升级vxe-table版本 对应暗黑模式改为css变量模式 ([0dfc3e0](https://github.com/meadmin-cn/meadmin-template/commit/0dfc3e0c741130ef8d857bc75c0269fecc1ef6f4))
* 修复顶栏菜单模式,...计算错误问题 ([d97f97d](https://github.com/meadmin-cn/meadmin-template/commit/d97f97d8287a9c4bb41ec7cceb0bb1d5896811a9))
* 修复配置响应丢失问题 ([64393f1](https://github.com/meadmin-cn/meadmin-template/commit/64393f1fca5c7439d12e49ec92e589f83d05ec55))
* 修复最大滚动tag值错误 ([30e07bf](https://github.com/meadmin-cn/meadmin-template/commit/30e07bf49fef07f0982ce6a5b8af0e167c752308))
* 修复最大滚动tag值错误 ([5a5fb0f](https://github.com/meadmin-cn/meadmin-template/commit/5a5fb0f9614bef5dccfe509be5293d2de0113ce9))
* 修复scrollLeft精度问题 ([68c6b81](https://github.com/meadmin-cn/meadmin-template/commit/68c6b81537415a2119c73aea101150c9a687ac97))
* 修复tag变更时滚动最大值未更新错误 ([ea0d34c](https://github.com/meadmin-cn/meadmin-template/commit/ea0d34cfee63a05c6226b070221a70f69fe207f1))
* 修复tag变更时滚动最大值未更新错误 ([ba38f08](https://github.com/meadmin-cn/meadmin-template/commit/ba38f088c12ad791a77571caa3cd8e7fe774c835))
* 重新生成type文件 ([0fac8a6](https://github.com/meadmin-cn/meadmin-template/commit/0fac8a65f0a3ebfa15933dcaadab6e586c722207))

## [1.1.18](https://github.com/meadmin-cn/meadmin-template/compare/main-1.1.17...main-1.1.18) (2023-08-08)


Expand Down
23 changes: 23 additions & 0 deletions TEMPLATE-CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@


## [1.1.19](https://github.com/meadmin-cn/meadmin-template/compare/template-1.1.18...template-1.1.19) (2023-12-03)


### 重构[refactor]

* 优化默认样式,干掉一闪而过的滚动条 ([279a93c](https://github.com/meadmin-cn/meadmin-template/commit/279a93c1826be9245c450e638995cba98b58994e))


### 新功能[feat]

* 加上菜单侧边栏和左侧模式 ([63e83c6](https://github.com/meadmin-cn/meadmin-template/commit/63e83c6efbf49f014ccba89c46f629909b77a020))
* tag菜单加上body点击时关闭 ([4553bde](https://github.com/meadmin-cn/meadmin-template/commit/4553bde10ef28a62131c803475a9b34e2ab2f76e))
* tag滚动会自动多展示前一个/后一个tag ([4d40627](https://github.com/meadmin-cn/meadmin-template/commit/4d406275216cdb0d63c82a80a775ec2e0106e569))


### Bug 修复[fix]

* 修复顶栏菜单模式,...计算错误问题 ([d97f97d](https://github.com/meadmin-cn/meadmin-template/commit/d97f97d8287a9c4bb41ec7cceb0bb1d5896811a9))
* 修复配置响应丢失问题 ([64393f1](https://github.com/meadmin-cn/meadmin-template/commit/64393f1fca5c7439d12e49ec92e589f83d05ec55))
* 修复最大滚动tag值错误 ([5a5fb0f](https://github.com/meadmin-cn/meadmin-template/commit/5a5fb0f9614bef5dccfe509be5293d2de0113ce9))
* 修复scrollLeft精度问题 ([68c6b81](https://github.com/meadmin-cn/meadmin-template/commit/68c6b81537415a2119c73aea101150c9a687ac97))
* 修复tag变更时滚动最大值未更新错误 ([ba38f08](https://github.com/meadmin-cn/meadmin-template/commit/ba38f088c12ad791a77571caa3cd8e7fe774c835))

## [1.1.18](https://github.com/meadmin-cn/meadmin-template/compare/template-1.1.17...template-1.1.18) (2023-08-08)


Expand Down
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<base target="_blank" />
<title>me-admin</title>
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>

<body>
Expand All @@ -17,25 +23,30 @@
display: flex;
justify-content: space-between;
}

.sk-flow-dot {
width: 25%;
height: 25%;
background-color: #79bbff;
border-radius: 50%;
animation: sk-flow 1.4s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s infinite both;
}

.sk-flow-dot:nth-child(1) {
animation-delay: -0.3s;
}

.sk-flow-dot:nth-child(2) {
animation-delay: -0.15s;
}

@keyframes sk-flow {
0%,
80%,
100% {
transform: scale(0.3);
}

40% {
transform: scale(1);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "meadmin-template",
"private": true,
"version": "1.1.18",
"version": "1.1.19",
"type": "module",
"author": {
"name": "meadmin-cn",
Expand Down
105 changes: 104 additions & 1 deletion src/components/meSettingMenu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
<template>
<el-drawer v-model="setting.showSettingMenu" :title="$t('项目配置')" size="300px" append-to-body>
<el-form label-position="left" label-width="170px">
<el-form class="content" label-position="left" label-width="170px">
<div class="title">
<div class="title-content">{{ $t('布局') }}</div>
</div>
<div class="info" :style="{ '--primaryColor': themeConfig.primaryColor }">
<div
class="layout-base layout-left"
:class="{ active: themeConfig.menuType === 'sidebar' }"
:title="$t('左侧菜单模式')"
@click="themeConfig.menuType = 'sidebar'"
></div>
<div
class="layout-base layout-top"
:class="{ active: themeConfig.menuType === 'top' }"
:title="$t('顶部菜单混合模式')"
@click="themeConfig.menuType = 'top'"
></div>
</div>
<div class="title">
<div class="title-content">{{ $t('配置') }}</div>
</div>
<el-form-item :label="$t('主题色')">
<el-color-picker v-model="themeConfig.primaryColor" :predefine="predefinePrimaryColors" />
</el-form-item>
Expand Down Expand Up @@ -79,4 +99,87 @@ const clear = () => {
setting.clearCache();
userStore.logOut();
};
const activeColor = computed(() => themeConfig.value.primaryColor);
</script>
<style lang="scss" scoped>
.content {
margin-top: -32px;
.title {
display: block;
height: 1px;
width: 100%;
margin: 24px 0;
border-top: 1px var(--el-border-color) var(--el-border-style);
position: relative;
.title-content {
position: absolute;
background-color: var(--el-bg-color);
padding: 0 20px;
font-weight: 500;
color: var(--el-text-color-primary);
font-size: 14px;
left: 50%;
transform: translate(-50%) translateY(-50%);
}
}
.info {
display: flex;
justify-content: center;
.layout-base {
width: 50px;
height: 50px;
border-radius: 5px;
position: relative;
background: #e5e7eb;
border: 1px solid #e5e7eb;
margin-right: 15px;
cursor: pointer;
}
.active {
border: 2px solid var(--primaryColor) !important;
}
.layout-left::before {
content: '';
background-color: #000;
position: absolute;
left: 0;
width: 10px;
top: 0;
bottom: 0;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.layout-left::after {
content: '';
background-color: #fff;
position: absolute;
left: 10px;
right: 0;
top: 0;
height: 10px;
border-top-right-radius: 5px;
}
.layout-top::before {
content: '';
background-color: #000;
position: absolute;
left: 0;
width: 10px;
top: 10px;
bottom: 0;
border-bottom-left-radius: 5px;
}
.layout-top::after {
content: '';
background-color: #fff;
position: absolute;
left: 0;
right: 0;
top: 0;
height: 10px;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
}
}
}
</style>
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import loginConfig from './login';
import themeConfig from './theme';
const settingKey = 'me-config';
const settingConfig = {
version: '1.0.3', //版本当版本改变时会清空localStorage和sessionStorage
version: '1.0.4', //版本当版本改变时会清空localStorage和sessionStorage
openKeepAlive: true, // 是否开启KeepAlive缓存
menuMode: MenuModeEnum.STATIC, // 菜单模式
};
Expand Down
1 change: 1 addition & 0 deletions src/config/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SizeEnum } from '@/dict/configEnum';
export default {
primaryColor: '#409eff', // 主题颜色
menuType: 'sidebar' as 'top' | 'sidebar', //菜单模式,顶部模式/侧边栏模式
menuBg: '#1d1e1f', // 菜单背景颜色
menuWidth: '200px', // 菜单展开宽度
menuCollapse: true, // 菜单是否折叠
Expand Down
19 changes: 19 additions & 0 deletions src/layout/components/expand.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div>
<mel-icon-expand v-if="themeConfig.menuCollapse" class="fold-expand pointer" @click="setMenuCollapse">
</mel-icon-expand>
<mel-icon-fold v-else class="fold-expand pointer" @click="setMenuCollapse"></mel-icon-fold>
</div>
</template>

<script setup lang="ts" name="Expand">
import { useSettingStore } from '@/store';
const { themeConfig } = storeToRefs(useSettingStore());
const setMenuCollapse = () => {
themeConfig.value.menuCollapse = !themeConfig.value.menuCollapse;
};
</script>
<style lang="scss" scoped>
.expand {
}
</style>
1 change: 1 addition & 0 deletions src/layout/components/header/components/tagBar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ watch(route, () => {
height: $header-tag-height;
display: flex;
align-items: center;
background-color: var(--el-bg-color);
.is-disabled {
color: var(--el-disabled-text-color) !important;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<el-space class="left">
<div></div>
<mel-icon-expand v-if="themeConfig.menuCollapse" class="fold-expand pointer" @click="setMenuCollapse">
</mel-icon-expand>
<mel-icon-fold v-else class="fold-expand pointer" @click="setMenuCollapse"></mel-icon-fold>
<Expand></Expand>
<el-scrollbar
v-if="!globalStore.isMobile && themeConfig.breadcrumb"
:min-size="10"
Expand All @@ -24,11 +22,9 @@
import { mitter, event } from '@/event';
import { useSettingStore, useGlobalStore, useRouteStore } from '@/store';
import { RouteLocationNormalized, RouteRecordRaw } from 'vue-router';
import Expand from '@/layout/components/expand.vue';
const { themeConfig } = storeToRefs(useSettingStore());
const globalStore = useGlobalStore();
const setMenuCollapse = () => {
themeConfig.value.menuCollapse = !themeConfig.value.menuCollapse;
};
const breadcrumbList = ref([] as Pick<RouteRecordRaw, 'name' | 'path' | 'meta' | 'redirect'>[]);
const route = useRoute();
const { routes } = storeToRefs(useRouteStore());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<div style="position: relative; height: 100%">
<el-menu class="top-menu" :default-active="activeMenu" mode="horizontal">
<layout-menu-item
v-for="item in menus"
:key="item.path"
:no-child="true"
:item="item"
:collapse="themeConfig.menuCollapse"
/>
</el-menu>
</div>
</template>

<script setup lang="ts" name="TopMenu">
import { useRouteStore, useSettingStore } from '@/store';
const { themeConfig } = storeToRefs(useSettingStore());
const routeStore = useRouteStore();
const route = useRoute();
const menus = computed(() => {
return routeStore.routes.filter((item) => {
return item.meta && !item.meta.hideMenu && item.meta.title;
});
});
const activeMenu = computed(() => {
return route.meta.menuIndex?.[0] + '';
});
</script>
<style lang="scss" scoped>
.top-menu {
position: absolute;
left: 0;
top: 0;
height: 100%;
right: 0;
border-bottom: 0;
--el-menu-item-height: #{$header-top-height};
}
</style>
12 changes: 11 additions & 1 deletion src/layout/components/header/components/topBar/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<template>
<div class="top-bar">
<Left></Left>
<Title v-if="menuType === 'top'"></Title>
<Left v-else></Left>
<top-menu v-if="menuType === 'top'" class="menu"></top-menu>
<Right></Right>
</div>
</template>

<script setup lang="ts" name="TopBar">
import { useSettingStore } from '@/store';
import Left from './components/left.vue';
import Right from './components/right/index.vue';
import TopMenu from './components/topMenu.vue';
import Title from '@/layout/components/title.vue';
const { menuType } = storeToRefs(useSettingStore());
</script>
<style lang="scss" scoped>
.top-bar {
Expand All @@ -16,5 +22,9 @@ import Right from './components/right/index.vue';
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--el-border-color);
overflow: hidden;
.menu {
flex: 1;
}
}
</style>
Loading

0 comments on commit 9fc8aec

Please sign in to comment.