build(projects): 代码优化

This commit is contained in:
Soybean 2022-06-19 15:34:18 +08:00
parent 414ccbe360
commit 5c1b086cb4
6 changed files with 273 additions and 244 deletions

View File

@ -36,7 +36,7 @@
"@better-scroll/core": "^2.4.2",
"@soybeanjs/vue-admin-layout": "^1.0.4",
"@soybeanjs/vue-admin-tab": "^1.0.2",
"@vueuse/core": "^8.6.0",
"@vueuse/core": "^8.7.4",
"axios": "^0.27.2",
"clipboard": "^2.0.11",
"colord": "^2.9.2",
@ -61,11 +61,11 @@
"@amap/amap-jsapi-types": "^0.0.8",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@iconify/json": "^2.1.62",
"@iconify/json": "^2.1.63",
"@iconify/vue": "^3.2.1",
"@types/bmapgl": "^0.0.5",
"@types/crypto-js": "^4.1.1",
"@types/node": "^17.0.44",
"@types/node": "^18.0.0",
"@types/qs": "^6.9.7",
"@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^5.28.0",
@ -78,7 +78,7 @@
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^6.3.0",
"eslint": "^8.17.0",
"eslint": "^8.18.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-alias": "^1.1.2",
@ -86,17 +86,17 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "9.1.1",
"husky": "^8.0.1",
"lint-staged": "^13.0.1",
"lint-staged": "^13.0.2",
"mockjs": "^1.1.0",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.7.0",
"prettier": "^2.7.1",
"rollup-plugin-visualizer": "^5.6.0",
"sass": "^1.52.3",
"standard-version": "^9.5.0",
"typescript": "^4.7.3",
"unocss": "^0.39.0",
"unplugin-icons": "^0.14.3",
"typescript": "^4.7.4",
"unocss": "^0.39.3",
"unplugin-icons": "^0.14.5",
"unplugin-vue-components": "0.19.6",
"unplugin-vue-define-options": "^0.6.1",
"vite": "^2.9.12",
@ -105,7 +105,7 @@
"vite-plugin-mock": "^2.9.6",
"vite-plugin-svg-icons": "^2.0.1",
"vue-eslint-parser": "^9.0.2",
"vue-tsc": "^0.37.8"
"vue-tsc": "^0.38.1"
},
"homepage": "https://github.com/honghuangdc/soybean-admin",
"repository": {

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
<n-list-item
v-for="(item, index) in list"
:key="item.id"
class="cursor-pointer hover:bg-[#f6f6f6] dark:hover:bg-dark"
class="hover:bg-[#f6f6f6] dark:hover:bg-dark cursor-pointer"
@click="handleRead(index)"
>
<n-thing class="px-15px" :class="{ 'opacity-30': item.isRead }">

View File

@ -1,7 +1,7 @@
<template>
<n-popover class="!p-0" trigger="click" placement="bottom">
<template #trigger>
<hover-container class="w-40px h-full relative" tooltip-content="消息通知" :inverted="theme.header.inverted">
<hover-container tooltip-content="消息通知" :inverted="theme.header.inverted" class="relative w-40px h-full">
<icon-clarity:notification-line class="text-18px" />
<n-badge
:value="count"
@ -34,10 +34,10 @@
</loading-empty-wrapper>
</n-tab-pane>
</n-tabs>
<div v-if="showAction" class="flex cursor-pointer border-t border-$n-divider-color">
<div class="py-10px text-center flex-1" @click="handleClear">清空</div>
<div class="py-10px text-center flex-1 border-l border-$n-divider-color" @click="handleAllRead">全部已读</div>
<div class="py-10px text-center flex-1 border-l border-$n-divider-color" @click="handleLoadMore">查看更多</div>
<div v-if="showAction" class="flex border-t border-$n-divider-color cursor-pointer">
<div class="flex-1 text-center py-10px" @click="handleClear">清空</div>
<div class="flex-1 text-center py-10px border-l border-$n-divider-color" @click="handleAllRead">全部已读</div>
<div class="flex-1 text-center py-10px border-l border-$n-divider-color" @click="handleLoadMore">查看更多</div>
</div>
</n-popover>
</template>
@ -187,7 +187,7 @@ function handleRead(index: number) {
}
function handleAllRead() {
tabData.value[currentTab.value].list.map(item => Object.assign(item, { isRead: true }));
tabData.value[currentTab.value].list.forEach(item => Object.assign(item, { isRead: true }));
}
function handleClear() {

View File

@ -37,7 +37,7 @@ declare namespace Message {
/** badge类型 */
badgeProps?: import('naive-ui').BadgeProps;
/** 消息数据 */
list: ListItem[];
list: List[];
}
interface List {

View File

@ -38,7 +38,7 @@ export default defineConfig(configEnv => {
port: 5050
},
build: {
brotliSize: false,
reportCompressedSize: false,
sourcemap: false,
commonjsOptions: {
ignoreTryCatch: false