up element 2.3.1

This commit is contained in:
lbw 2023-03-29 20:46:36 +08:00
parent 56559f13c9
commit 81b88795c0
25 changed files with 249 additions and 282 deletions

17
package-lock.json generated
View File

@ -17,7 +17,7 @@
"axios": "^1.3.3",
"crypto-js": "^3.1.9-1",
"echarts": "^5.4.1",
"element-plus": "^2.2.32",
"element-plus": "2.3.1",
"form-designer": "^0.0.2",
"highlight.js": "^11.7.0",
"js-cookie": "^3.0.1",
@ -1736,9 +1736,9 @@
}
},
"node_modules/element-plus": {
"version": "2.2.33",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.33.tgz",
"integrity": "sha512-E/PmMnv4+4I9Ue0ZDfx2gGgGj4iBlTCWcES3o4jxfYjayFlcQO3UvElJzhaJZ8vDm9yfNN7t2w/xYOhsSYCNNg==",
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.3.1.tgz",
"integrity": "sha512-IBS7ic1mRyDXpOreRkredV4ByZSuax5HPb0zNOHm4qwKC4wm927yQv+Is0JbzxPzCW5zWaV4PLy9/Gl3E3v59w==",
"license": "MIT",
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
@ -1756,6 +1756,9 @@
"lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0"
},
"peerDependencies": {
"vue": "^3.2.0"
}
},
"node_modules/emoji-regex": {
@ -5720,9 +5723,9 @@
}
},
"element-plus": {
"version": "2.2.33",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.33.tgz",
"integrity": "sha512-E/PmMnv4+4I9Ue0ZDfx2gGgGj4iBlTCWcES3o4jxfYjayFlcQO3UvElJzhaJZ8vDm9yfNN7t2w/xYOhsSYCNNg==",
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.3.1.tgz",
"integrity": "sha512-IBS7ic1mRyDXpOreRkredV4ByZSuax5HPb0zNOHm4qwKC4wm927yQv+Is0JbzxPzCW5zWaV4PLy9/Gl3E3v59w==",
"requires": {
"@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.0.6",

View File

@ -19,7 +19,7 @@
"axios": "^1.3.3",
"crypto-js": "^3.1.9-1",
"echarts": "^5.4.1",
"element-plus": "^2.2.32",
"element-plus": "2.3.1",
"form-designer": "^0.0.2",
"highlight.js": "^11.7.0",
"js-cookie": "^3.0.1",

View File

@ -8,10 +8,7 @@
</template>
<script setup lang="ts" name="app">
import { defineAsyncComponent, computed, ref, onBeforeMount, onMounted, onUnmounted, nextTick, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { useThemeConfig } from '/@/stores/themeConfig';
import other from '/@/utils/other';

View File

@ -15,7 +15,7 @@ export const login = (data: any) => {
method: 'post',
params: data,
headers: {
isToken: false,
skipToken: true,
'TENANT-ID': '1',
Authorization: basicAuth,
},
@ -31,7 +31,7 @@ export const loginByMobile = (mobile: any, code: any) => {
return request({
url: '/auth/oauth2/token',
headers: {
isToken: false,
skipToken: true,
'TENANT-ID': '1',
Authorization: basicAuth,
},
@ -49,7 +49,7 @@ export const loginBySocial = (state: string, code: string) => {
return request({
url: '/auth/oauth2/token',
headers: {
isToken: false,
skipToken: true,
'TENANT-ID': '1',
Authorization: basicAuth,
},
@ -74,7 +74,7 @@ export const refreshTokenApi = (refresh_token: string) => {
return request({
url: '/auth/oauth2/token',
headers: {
isToken: false,
skipToken: true,
'TENANT-ID': '1',
Authorization: basicAuth,
},
@ -92,7 +92,7 @@ export const checkToken = (refreshTime: number, refreshLock: boolean) => {
request({
url: '/auth/token/check_token',
headers: {
isToken: false,
skipToken: true,
Authorization: basicAuth,
},
method: 'get',

View File

@ -16,7 +16,7 @@
:title="$t(v.name)"
>
<div :class="themeConfig.columnsAsideLayout" v-if="!v.meta.isLink || (v.meta.isLink && v.meta.isIframe)">
<SvgIcon :name="v.meta.icon" />
<SvgIcon :name="v.meta.icon"/>
<div class="columns-vertical-title font12">
{{
$t(v.name) && $t(v.name).length >= 4
@ -27,7 +27,7 @@
</div>
<div :class="themeConfig.columnsAsideLayout" v-else>
<a :href="v.meta.isLink" target="_blank">
<SvgIcon :name="v.meta.icon" />
<SvgIcon :name="v.meta.icon"/>
<div class="columns-vertical-title font12">
{{
$t(v.name) && $t(v.name).length >= 4
@ -45,12 +45,10 @@
</template>
<script setup lang="ts" name="layoutColumnsAside">
import { reactive, ref, onMounted, nextTick, watch, onUnmounted } from 'vue';
import { useRoute, useRouter, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
import { storeToRefs } from 'pinia';
import {RouteRecordRaw} from 'vue-router';
import pinia from '/@/stores/index';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
import {useRoutesList} from '/@/stores/routesList';
import {useThemeConfig} from '/@/stores/themeConfig';
import mittBus from '/@/utils/mitt';
//
@ -58,8 +56,8 @@ const columnsAsideOffsetTopRefs = ref<RefType>([]);
const columnsAsideActiveRef = ref();
const stores = useRoutesList();
const storesThemeConfig = useThemeConfig();
const { routesList, isColumnsMenuHover, isColumnsNavHover } = storeToRefs(stores);
const { themeConfig } = storeToRefs(storesThemeConfig);
const {routesList, isColumnsMenuHover, isColumnsNavHover} = storeToRefs(stores);
const {themeConfig} = storeToRefs(storesThemeConfig);
const route = useRoute();
const router = useRouter();
const state = reactive<ColumnsAsideState>({
@ -80,14 +78,14 @@ const setColumnsAsideMove = (k: number) => {
//
const onColumnsAsideMenuClick = (v: RouteItem, k: number) => {
setColumnsAsideMove(k);
let { path, redirect } = v;
let {path, redirect} = v;
if (redirect) router.push(redirect);
else router.push(path);
};
//
const onColumnsAsideMenuMouseenter = (v: RouteRecordRaw, k: number) => {
if (!themeConfig.value.isColumnsMenuHoverPreload) return false;
let { path } = v;
let {path} = v;
state.liOldPath = path;
state.liOldIndex = k;
state.liHoverIndex = k;
@ -120,12 +118,12 @@ const setFilterRoutes = () => {
//
const setSendChildren = (path: string) => {
const parentRoute = searchParent(routesList.value, path) as any;
let currentData: MittMenu = { children: [] };
let currentData: MittMenu = {children: []};
state.columnsAsideList.map((v: RouteItem, k: number) => {
if (v.path === parentRoute.path) {
v['k'] = k;
currentData['item'] = { ...v };
currentData['children'] = [{ ...v }];
currentData['item'] = {...v};
currentData['children'] = [{...v}];
if (v.children) currentData['children'] = v.children;
}
});
@ -179,7 +177,8 @@ onMounted(() => {
});
//
onUnmounted(() => {
mittBus.off('restoreDefault', () => {});
mittBus.off('restoreDefault', () => {
});
});
//
onBeforeRouteUpdate((to) => {
@ -211,18 +210,23 @@ watch(
width: 70px;
height: 100%;
background: var(--next-bg-columnsMenuBar);
ul {
position: relative;
.layout-columns-active {
color: var(--next-bg-columnsMenuBarColor) !important;
transition: 0.3s ease-in-out;
}
.layout-columns-hover {
color: var(--el-color-primary);
a {
color: var(--el-color-primary);
}
}
li {
color: var(--next-bg-columnsMenuBarColor);
width: 100%;
@ -232,36 +236,45 @@ watch(
cursor: pointer;
position: relative;
z-index: 1;
&:hover {
@extend .layout-columns-hover;
}
.columns-vertical {
margin: auto;
.columns-vertical-title {
padding-top: 1px;
}
}
.columns-horizontal {
display: flex;
height: 50px;
width: 100%;
align-items: center;
padding: 0 5px;
i {
margin-right: 3px;
}
a {
display: flex;
.columns-horizontal-title {
padding-top: 1px;
}
}
}
a {
text-decoration: none;
color: var(--next-bg-columnsMenuBarColor);
}
}
.columns-round {
background: var(--el-color-primary);
color: var(--el-color-white);
@ -275,6 +288,7 @@ watch(
transition: 0.3s ease-in-out;
border-radius: 5px;
}
.columns-card {
@extend .columns-round;
top: 0;

View File

@ -15,9 +15,6 @@
</template>
<script setup lang="ts" name="layoutMain">
import { defineAsyncComponent, onMounted, computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading';

View File

@ -12,9 +12,6 @@
</template>
<script setup lang="ts" name="layoutClassic">
import { defineAsyncComponent, computed, ref, watch, nextTick, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
//

View File

@ -12,9 +12,6 @@
</template>
<script setup lang="ts" name="layoutColumns">
import { defineAsyncComponent, watch, onMounted, nextTick, ref } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
//

View File

@ -11,9 +11,6 @@
</template>
<script setup lang="ts" name="layoutDefaults">
import { defineAsyncComponent, watch, onMounted, nextTick, ref } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading';

View File

@ -6,9 +6,6 @@
</template>
<script setup lang="ts" name="layoutTransverse">
import { defineAsyncComponent, ref, watch, nextTick, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
//

View File

@ -24,11 +24,8 @@
</template>
<script setup lang="ts" name="layoutBreadcrumb">
import { reactive, computed, onMounted } from 'vue';
import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router';
import { Local } from '/@/utils/storage';
import other from '/@/utils/other';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
import { useRoutesList } from '/@/stores/routesList';

View File

@ -8,9 +8,6 @@
</template>
<script setup lang="ts" name="layoutBreadcrumbIndex">
import { defineAsyncComponent, computed, reactive, onMounted, onUnmounted } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
import mittBus from '/@/utils/mitt';

View File

@ -28,10 +28,7 @@
</template>
<script setup lang="ts" name="layoutBreadcrumbSearch">
import { reactive, ref, nextTick } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
//

View File

@ -68,8 +68,6 @@
</template>
<script setup lang="ts" name="layoutBreadcrumbUser">
import { defineAsyncComponent, ref, computed, reactive, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { ElMessageBox, ElMessage } from 'element-plus';
import screenfull from 'screenfull';
import { useI18n } from 'vue-i18n';

View File

@ -47,8 +47,6 @@
</template>
<script setup lang="ts" name="layoutTagsView">
import { defineAsyncComponent, reactive, onMounted, computed, ref, nextTick, onBeforeUpdate, onBeforeMount, onUnmounted, watch } from 'vue';
import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
import Sortable from 'sortablejs';
import { ElMessage } from 'element-plus';
import { storeToRefs } from 'pinia';

View File

@ -31,9 +31,7 @@
</template>
<script setup lang="ts" name="navMenuHorizontal">
import { defineAsyncComponent, reactive, computed, onMounted, nextTick, onBeforeMount, ref } from 'vue';
import { useRoute, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
import { storeToRefs } from 'pinia';
import { RouteRecordRaw } from 'vue-router';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
import other from '/@/utils/other';

View File

@ -31,9 +31,7 @@
</template>
<script setup lang="ts" name="navMenuVertical">
import { defineAsyncComponent, reactive, computed, onMounted, watch } from 'vue';
import { useRoute, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
import { storeToRefs } from 'pinia';
import { RouteRecordRaw } from 'vue-router';
import { useThemeConfig } from '/@/stores/themeConfig';
import other from '/@/utils/other';

View File

@ -21,9 +21,6 @@
</template>
<script setup lang="ts" name="layoutIframeView">
import { computed, watch, ref, nextTick } from 'vue';
import { useRoute } from 'vue-router';
//
const props = defineProps({
// iframe

View File

@ -14,8 +14,6 @@
</template>
<script setup lang="ts" name="layoutLinkView">
import { reactive, watch } from 'vue';
import { useRoute } from 'vue-router';
import { verifyUrl } from '/@/utils/toolsValidate';
//

View File

@ -17,9 +17,6 @@
</template>
<script setup lang="ts" name="layoutParentView">
import { defineAsyncComponent, computed, reactive, onBeforeMount, onUnmounted, nextTick, watch, onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useKeepALiveNames } from '/@/stores/keepAliveNames';
import { useThemeConfig } from '/@/stores/themeConfig';
import { Session } from '/@/utils/storage';

View File

@ -1,5 +1,4 @@
import { RouteRecordRaw } from 'vue-router';
import { storeToRefs } from 'pinia';
import { formatTwoStageRoutes, formatFlatteningRoutes, router } from '/@/router/index';
import { baseRoutes, notFoundAndNoPower } from '/@/router/route';
import pinia from '/@/stores/index';

View File

@ -23,8 +23,6 @@
</template>
<script setup lang="ts" name="notFound">
import { useRouter } from 'vue-router';
//
const router = useRouter();

View File

@ -28,10 +28,7 @@
<script lang="ts" setup>
import { useGeneratorCodeApi } from '/@/api/gen/table';
import { useRoute } from 'vue-router';
import { downBlobFile } from '/@/utils/other';
import { useMessage } from '/@/hooks/message';
import { useI18n } from 'vue-i18n';
const Generator = defineAsyncComponent(() => import('../table/generator.vue'));
const EditTable = defineAsyncComponent(() => import('../table/edit.vue'));

View File

@ -59,7 +59,6 @@ import { fetchList, useSyncTableApi, useTableApi } from '/@/api/gen/table';
import { list } from '/@/api/gen/datasource';
import { useMessage } from '/@/hooks/message';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { validateNull } from '/@/utils/validate';
//

View File

@ -1,7 +1,7 @@
<template>
<el-calendar v-model="calendar">
<template #date-cell="{ data }">
<div style="width: 100%; height: 80%" @click="handleSchedule(data)">
<div style="width: 100%" @click="handleSchedule(data)">
{{ data.day.split('-').slice(2).join('-') }}
<span v-if="filterCellSelected(data)">
<el-icon><BellFilled /></el-icon>