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

View File

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

View File

@ -8,10 +8,7 @@
</template> </template>
<script setup lang="ts" name="app"> <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 { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import other from '/@/utils/other'; import other from '/@/utils/other';

View File

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

View File

@ -1,56 +1,54 @@
<template> <template>
<div class="layout-columns-aside"> <div class="layout-columns-aside">
<el-scrollbar> <el-scrollbar>
<ul @mouseleave="onColumnsAsideMenuMouseleave()"> <ul @mouseleave="onColumnsAsideMenuMouseleave()">
<li <li
v-for="(v, k) in state.columnsAsideList" v-for="(v, k) in state.columnsAsideList"
:key="k" :key="k"
@click="onColumnsAsideMenuClick(v, k)" @click="onColumnsAsideMenuClick(v, k)"
@mouseenter="onColumnsAsideMenuMouseenter(v, k)" @mouseenter="onColumnsAsideMenuMouseenter(v, k)"
:ref=" :ref="
(el) => { (el) => {
if (el) columnsAsideOffsetTopRefs[k] = el; if (el) columnsAsideOffsetTopRefs[k] = el;
} }
" "
:class="{ 'layout-columns-active': state.liIndex === k, 'layout-columns-hover': state.liHoverIndex === k }" :class="{ 'layout-columns-active': state.liIndex === k, 'layout-columns-hover': state.liHoverIndex === k }"
:title="$t(v.name)" :title="$t(v.name)"
> >
<div :class="themeConfig.columnsAsideLayout" v-if="!v.meta.isLink || (v.meta.isLink && v.meta.isIframe)"> <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"> <div class="columns-vertical-title font12">
{{ {{
$t(v.name) && $t(v.name).length >= 4 $t(v.name) && $t(v.name).length >= 4
? $t(v.name).substr(0, themeConfig.columnsAsideLayout === 'columns-vertical' ? 4 : 3) ? $t(v.name).substr(0, themeConfig.columnsAsideLayout === 'columns-vertical' ? 4 : 3)
: $t(v.name) : $t(v.name)
}} }}
</div> </div>
</div> </div>
<div :class="themeConfig.columnsAsideLayout" v-else> <div :class="themeConfig.columnsAsideLayout" v-else>
<a :href="v.meta.isLink" target="_blank"> <a :href="v.meta.isLink" target="_blank">
<SvgIcon :name="v.meta.icon" /> <SvgIcon :name="v.meta.icon"/>
<div class="columns-vertical-title font12"> <div class="columns-vertical-title font12">
{{ {{
$t(v.name) && $t(v.name).length >= 4 $t(v.name) && $t(v.name).length >= 4
? $t(v.name).substr(0, themeConfig.columnsAsideLayout === 'columns-vertical' ? 4 : 3) ? $t(v.name).substr(0, themeConfig.columnsAsideLayout === 'columns-vertical' ? 4 : 3)
: $t(v.name) : $t(v.name)
}} }}
</div> </div>
</a> </a>
</div> </div>
</li> </li>
<div ref="columnsAsideActiveRef" :class="themeConfig.columnsAsideStyle"></div> <div ref="columnsAsideActiveRef" :class="themeConfig.columnsAsideStyle"></div>
</ul> </ul>
</el-scrollbar> </el-scrollbar>
</div> </div>
</template> </template>
<script setup lang="ts" name="layoutColumnsAside"> <script setup lang="ts" name="layoutColumnsAside">
import { reactive, ref, onMounted, nextTick, watch, onUnmounted } from 'vue'; import {RouteRecordRaw} from 'vue-router';
import { useRoute, useRouter, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
import { storeToRefs } from 'pinia';
import pinia from '/@/stores/index'; import pinia from '/@/stores/index';
import { useRoutesList } from '/@/stores/routesList'; import {useRoutesList} from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig'; import {useThemeConfig} from '/@/stores/themeConfig';
import mittBus from '/@/utils/mitt'; import mittBus from '/@/utils/mitt';
// //
@ -58,230 +56,246 @@ const columnsAsideOffsetTopRefs = ref<RefType>([]);
const columnsAsideActiveRef = ref(); const columnsAsideActiveRef = ref();
const stores = useRoutesList(); const stores = useRoutesList();
const storesThemeConfig = useThemeConfig(); const storesThemeConfig = useThemeConfig();
const { routesList, isColumnsMenuHover, isColumnsNavHover } = storeToRefs(stores); const {routesList, isColumnsMenuHover, isColumnsNavHover} = storeToRefs(stores);
const { themeConfig } = storeToRefs(storesThemeConfig); const {themeConfig} = storeToRefs(storesThemeConfig);
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const state = reactive<ColumnsAsideState>({ const state = reactive<ColumnsAsideState>({
columnsAsideList: [], columnsAsideList: [],
liIndex: 0, liIndex: 0,
liOldIndex: null, liOldIndex: null,
liHoverIndex: null, liHoverIndex: null,
liOldPath: null, liOldPath: null,
difference: 0, difference: 0,
routeSplit: [], routeSplit: [],
}); });
// //
const setColumnsAsideMove = (k: number) => { const setColumnsAsideMove = (k: number) => {
state.liIndex = k; state.liIndex = k;
columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`; columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`;
}; };
// //
const onColumnsAsideMenuClick = (v: RouteItem, k: number) => { const onColumnsAsideMenuClick = (v: RouteItem, k: number) => {
setColumnsAsideMove(k); setColumnsAsideMove(k);
let { path, redirect } = v; let {path, redirect} = v;
if (redirect) router.push(redirect); if (redirect) router.push(redirect);
else router.push(path); else router.push(path);
}; };
// //
const onColumnsAsideMenuMouseenter = (v: RouteRecordRaw, k: number) => { const onColumnsAsideMenuMouseenter = (v: RouteRecordRaw, k: number) => {
if (!themeConfig.value.isColumnsMenuHoverPreload) return false; if (!themeConfig.value.isColumnsMenuHoverPreload) return false;
let { path } = v; let {path} = v;
state.liOldPath = path; state.liOldPath = path;
state.liOldIndex = k; state.liOldIndex = k;
state.liHoverIndex = k; state.liHoverIndex = k;
mittBus.emit('setSendColumnsChildren', setSendChildren(path)); mittBus.emit('setSendColumnsChildren', setSendChildren(path));
stores.setColumnsMenuHover(false); stores.setColumnsMenuHover(false);
stores.setColumnsNavHover(true); stores.setColumnsNavHover(true);
}; };
// //
const onColumnsAsideMenuMouseleave = async () => { const onColumnsAsideMenuMouseleave = async () => {
await stores.setColumnsNavHover(false); await stores.setColumnsNavHover(false);
// store.state.routesList // store.state.routesList
setTimeout(() => { setTimeout(() => {
if (!isColumnsMenuHover && !isColumnsNavHover) mittBus.emit('restoreDefault'); if (!isColumnsMenuHover && !isColumnsNavHover) mittBus.emit('restoreDefault');
}, 100); }, 100);
}; };
// //
const onColumnsAsideDown = (k: number) => { const onColumnsAsideDown = (k: number) => {
nextTick(() => { nextTick(() => {
setColumnsAsideMove(k); setColumnsAsideMove(k);
}); });
}; };
// // // //
const setFilterRoutes = () => { const setFilterRoutes = () => {
state.columnsAsideList = filterRoutesFun(routesList.value); state.columnsAsideList = filterRoutesFun(routesList.value);
const resData: MittMenu = setSendChildren(route.path); const resData: MittMenu = setSendChildren(route.path);
if (Object.keys(resData).length <= 0) return false; if (Object.keys(resData).length <= 0) return false;
onColumnsAsideDown(resData.item?.k); onColumnsAsideDown(resData.item?.k);
mittBus.emit('setSendColumnsChildren', resData); mittBus.emit('setSendColumnsChildren', resData);
}; };
// //
const setSendChildren = (path: string) => { const setSendChildren = (path: string) => {
const parentRoute = searchParent(routesList.value, path) as any; const parentRoute = searchParent(routesList.value, path) as any;
let currentData: MittMenu = { children: [] }; let currentData: MittMenu = {children: []};
state.columnsAsideList.map((v: RouteItem, k: number) => { state.columnsAsideList.map((v: RouteItem, k: number) => {
if (v.path === parentRoute.path) { if (v.path === parentRoute.path) {
v['k'] = k; v['k'] = k;
currentData['item'] = { ...v }; currentData['item'] = {...v};
currentData['children'] = [{ ...v }]; currentData['children'] = [{...v}];
if (v.children) currentData['children'] = v.children; if (v.children) currentData['children'] = v.children;
} }
}); });
return currentData; return currentData;
}; };
// //
const filterRoutesFun = <T extends RouteItem>(arr: T[]): T[] => { const filterRoutesFun = <T extends RouteItem>(arr: T[]): T[] => {
return arr return arr
.filter((item: T) => !item.meta?.isHide) .filter((item: T) => !item.meta?.isHide)
.map((item: T) => { .map((item: T) => {
item = Object.assign({}, item); item = Object.assign({}, item);
if (item.children) item.children = filterRoutesFun(item.children); if (item.children) item.children = filterRoutesFun(item.children);
return item; return item;
}); });
}; };
// tagsView columnsAsideList // tagsView columnsAsideList
const setColumnsMenuHighlight = (path: string) => { const setColumnsMenuHighlight = (path: string) => {
const parentRoute = searchParent(routesList.value, path) as any; const parentRoute = searchParent(routesList.value, path) as any;
const currentSplitRoute = state.columnsAsideList.find((v: RouteItem) => v.path === parentRoute.path); const currentSplitRoute = state.columnsAsideList.find((v: RouteItem) => v.path === parentRoute.path);
if (!currentSplitRoute) return false; if (!currentSplitRoute) return false;
// //
setTimeout(() => { setTimeout(() => {
onColumnsAsideDown(currentSplitRoute.k); onColumnsAsideDown(currentSplitRoute.k);
}, 0); }, 0);
}; };
// 使 // 使
const searchParent = (routesList: any, path: string) => { const searchParent = (routesList: any, path: string) => {
let route = undefined; let route = undefined;
routesList.forEach((item) => { routesList.forEach((item) => {
if (item.path === path) { if (item.path === path) {
route = item; route = item;
return; return;
} }
if (item.children && searchParent(item.children, path)) { if (item.children && searchParent(item.children, path)) {
route = item; route = item;
return; return;
} }
}); });
return route; return route;
}; };
// //
onMounted(() => { onMounted(() => {
setFilterRoutes(); setFilterRoutes();
// //
mittBus.on('restoreDefault', () => { mittBus.on('restoreDefault', () => {
state.liOldIndex = null; state.liOldIndex = null;
state.liOldPath = null; state.liOldPath = null;
}); });
}); });
// //
onUnmounted(() => { onUnmounted(() => {
mittBus.off('restoreDefault', () => {}); mittBus.off('restoreDefault', () => {
});
}); });
// //
onBeforeRouteUpdate((to) => { onBeforeRouteUpdate((to) => {
setColumnsMenuHighlight(to.path); setColumnsMenuHighlight(to.path);
mittBus.emit('setSendColumnsChildren', setSendChildren(to.path)); mittBus.emit('setSendColumnsChildren', setSendChildren(to.path));
}); });
// //
watch( watch(
pinia.state, pinia.state,
(val) => { (val) => {
val.themeConfig.themeConfig.columnsAsideStyle === 'columnsRound' ? (state.difference = 3) : (state.difference = 0); val.themeConfig.themeConfig.columnsAsideStyle === 'columnsRound' ? (state.difference = 3) : (state.difference = 0);
if (!val.routesList.isColumnsMenuHover && !val.routesList.isColumnsNavHover) { if (!val.routesList.isColumnsMenuHover && !val.routesList.isColumnsNavHover) {
state.liHoverIndex = null; state.liHoverIndex = null;
mittBus.emit('setSendColumnsChildren', setSendChildren(route.path)); mittBus.emit('setSendColumnsChildren', setSendChildren(route.path));
} else { } else {
state.liHoverIndex = state.liOldIndex; state.liHoverIndex = state.liOldIndex;
if (!state.liOldPath) return false; if (!state.liOldPath) return false;
mittBus.emit('setSendColumnsChildren', setSendChildren(state.liOldPath)); mittBus.emit('setSendColumnsChildren', setSendChildren(state.liOldPath));
} }
}, },
{ {
deep: true, deep: true,
} }
); );
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.layout-columns-aside { .layout-columns-aside {
width: 70px; width: 70px;
height: 100%; height: 100%;
background: var(--next-bg-columnsMenuBar); background: var(--next-bg-columnsMenuBar);
ul {
position: relative; ul {
.layout-columns-active { position: relative;
color: var(--next-bg-columnsMenuBarColor) !important;
transition: 0.3s ease-in-out; .layout-columns-active {
} color: var(--next-bg-columnsMenuBarColor) !important;
.layout-columns-hover { transition: 0.3s ease-in-out;
color: var(--el-color-primary); }
a {
color: var(--el-color-primary); .layout-columns-hover {
} color: var(--el-color-primary);
}
li { a {
color: var(--next-bg-columnsMenuBarColor); color: var(--el-color-primary);
width: 100%; }
height: 50px; }
text-align: center;
display: flex; li {
cursor: pointer; color: var(--next-bg-columnsMenuBarColor);
position: relative; width: 100%;
z-index: 1; height: 50px;
&:hover { text-align: center;
@extend .layout-columns-hover; display: flex;
} cursor: pointer;
.columns-vertical { position: relative;
margin: auto; z-index: 1;
.columns-vertical-title {
padding-top: 1px; &:hover {
} @extend .layout-columns-hover;
} }
.columns-horizontal {
display: flex; .columns-vertical {
height: 50px; margin: auto;
width: 100%;
align-items: center; .columns-vertical-title {
padding: 0 5px; padding-top: 1px;
i { }
margin-right: 3px; }
}
a { .columns-horizontal {
display: flex; display: flex;
.columns-horizontal-title { height: 50px;
padding-top: 1px; width: 100%;
} align-items: center;
} padding: 0 5px;
}
a { i {
text-decoration: none; margin-right: 3px;
color: var(--next-bg-columnsMenuBarColor); }
}
} a {
.columns-round { display: flex;
background: var(--el-color-primary);
color: var(--el-color-white); .columns-horizontal-title {
position: absolute; padding-top: 1px;
left: 50%; }
top: 2px; }
height: 44px; }
width: 65px;
transform: translateX(-50%); a {
z-index: 0; text-decoration: none;
transition: 0.3s ease-in-out; color: var(--next-bg-columnsMenuBarColor);
border-radius: 5px; }
} }
.columns-card {
@extend .columns-round; .columns-round {
top: 0; background: var(--el-color-primary);
height: 50px; color: var(--el-color-white);
width: 100%; position: absolute;
border-radius: 0; left: 50%;
} top: 2px;
} height: 44px;
width: 65px;
transform: translateX(-50%);
z-index: 0;
transition: 0.3s ease-in-out;
border-radius: 5px;
}
.columns-card {
@extend .columns-round;
top: 0;
height: 50px;
width: 100%;
border-radius: 0;
}
}
} }
</style> </style>

View File

@ -15,9 +15,6 @@
</template> </template>
<script setup lang="ts" name="layoutMain"> <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 { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading'; import { NextLoading } from '/@/utils/loading';

View File

@ -12,9 +12,6 @@
</template> </template>
<script setup lang="ts" name="layoutClassic"> <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'; import { useThemeConfig } from '/@/stores/themeConfig';
// //

View File

@ -12,9 +12,6 @@
</template> </template>
<script setup lang="ts" name="layoutColumns"> <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'; import { useThemeConfig } from '/@/stores/themeConfig';
// //

View File

@ -11,9 +11,6 @@
</template> </template>
<script setup lang="ts" name="layoutDefaults"> <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 { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading'; import { NextLoading } from '/@/utils/loading';

View File

@ -6,9 +6,6 @@
</template> </template>
<script setup lang="ts" name="layoutTransverse"> <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'; import { useThemeConfig } from '/@/stores/themeConfig';
// //

View File

@ -24,11 +24,8 @@
</template> </template>
<script setup lang="ts" name="layoutBreadcrumb"> <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 { Local } from '/@/utils/storage';
import other from '/@/utils/other'; import other from '/@/utils/other';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import { useRoutesList } from '/@/stores/routesList'; import { useRoutesList } from '/@/stores/routesList';

View File

@ -8,9 +8,6 @@
</template> </template>
<script setup lang="ts" name="layoutBreadcrumbIndex"> <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 { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import mittBus from '/@/utils/mitt'; import mittBus from '/@/utils/mitt';

View File

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

View File

@ -68,8 +68,6 @@
</template> </template>
<script setup lang="ts" name="layoutBreadcrumbUser"> <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 { ElMessageBox, ElMessage } from 'element-plus';
import screenfull from 'screenfull'; import screenfull from 'screenfull';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';

View File

@ -47,8 +47,6 @@
</template> </template>
<script setup lang="ts" name="layoutTagsView"> <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 Sortable from 'sortablejs';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';

View File

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

View File

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

View File

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

View File

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

View File

@ -17,9 +17,6 @@
</template> </template>
<script setup lang="ts" name="layoutParentView"> <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 { useKeepALiveNames } from '/@/stores/keepAliveNames';
import { useThemeConfig } from '/@/stores/themeConfig'; import { useThemeConfig } from '/@/stores/themeConfig';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<el-calendar v-model="calendar"> <el-calendar v-model="calendar">
<template #date-cell="{ data }"> <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('-') }} {{ data.day.split('-').slice(2).join('-') }}
<span v-if="filterCellSelected(data)"> <span v-if="filterCellSelected(data)">
<el-icon><BellFilled /></el-icon> <el-icon><BellFilled /></el-icon>