Compare commits

..
11 Commits
12 changed files with 974 additions and 1371 deletions
+6
View File
@@ -73,6 +73,12 @@
[![star](https://gitee.com/fantastic-admin/basic/badge/star.svg?theme=dark)](https://gitee.com/fantastic-admin/basic)
<details>
<summary>Github Stars 曲线</summary>
[![Stargazers over time](https://starchart.cc/fantastic-admin/basic.svg)](https://starchart.cc/fantastic-admin/basic)
</details>
## 生态
<table>
+24 -23
View File
@@ -1,6 +1,6 @@
{
"type": "module",
"version": "4.0.1",
"version": "4.0.3",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
@@ -21,12 +21,12 @@
},
"dependencies": {
"@headlessui/vue": "^1.7.16",
"@vueuse/core": "^10.5.0",
"@vueuse/integrations": "^10.5.0",
"axios": "^1.6.0",
"@vueuse/core": "^10.6.1",
"@vueuse/integrations": "^10.6.1",
"axios": "^1.6.2",
"dayjs": "^1.11.10",
"defu": "^6.1.3",
"element-plus": "^2.4.1",
"element-plus": "^2.4.2",
"eruda": "^3.0.1",
"floating-vue": "2.0.0-beta.24",
"hotkeys-js": "^3.12.0",
@@ -34,51 +34,52 @@
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"overlayscrollbars": "^2.4.4",
"overlayscrollbars-vue": "^0.5.6",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.1",
"pinia": "^2.1.7",
"qs": "^6.11.2",
"scule": "^1.0.0",
"scule": "^1.1.0",
"vconsole": "^3.15.1",
"vue": "^3.3.7",
"vue": "^3.3.8",
"vue-m-message": "^4.0.2",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@antfu/eslint-config": "1.0.0-beta.29",
"@iconify/json": "^2.2.134",
"@antfu/eslint-config": "2.0.0",
"@iconify/json": "^2.2.143",
"@iconify/vue": "^4.1.1",
"@types/lodash-es": "^4.17.10",
"@types/nprogress": "^0.2.2",
"@types/path-browserify": "^1.0.1",
"@types/qs": "^6.9.9",
"@types/lodash-es": "^4.17.11",
"@types/nprogress": "^0.2.3",
"@types/path-browserify": "^1.0.2",
"@types/qs": "^6.9.10",
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.4.0",
"@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"autoprefixer": "^10.4.16",
"bumpp": "^9.2.0",
"cz-git": "^1.7.1",
"eslint": "^8.52.0",
"esno": "^0.17.0",
"eslint": "^8.54.0",
"esno": "^4.0.0",
"fs-extra": "^11.1.1",
"http-server": "^14.1.1",
"inquirer": "^9.2.11",
"lint-staged": "^15.0.2",
"inquirer": "^9.2.12",
"lint-staged": "^15.1.0",
"npm-run-all": "^4.1.5",
"plop": "^4.0.0",
"postcss-html": "^1.5.0",
"sass": "^1.69.5",
"simple-git-hooks": "^2.9.0",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^11.0.0",
"stylelint-config-standard-scss": "^11.1.0",
"stylelint-config-standard-vue": "^1.0.0",
"stylelint-scss": "^5.3.0",
"stylelint-scss": "^5.3.1",
"stylelint-stylistic": "^0.4.3",
"svgo": "^3.0.2",
"terser": "^5.22.0",
"svgo": "^3.0.4",
"terser": "^5.24.0",
"typescript": "^5.2.2",
"unocss": "^0.57.1",
"unocss": "^0.57.6",
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
+908 -1315
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -14,6 +14,14 @@ onMounted(() => {
<template>
<HSlideover v-model="isShow" title="系统信息">
<div class="px-4">
<h2 class="text-lg font-bold m-0">
版本号
</h2>
<div class="my-4 text-lg text-center font-sans">
{{ pkg.version }}
</div>
</div>
<div class="px-4">
<h2 class="text-lg font-bold m-0">
最后编译时间
@@ -30,10 +30,6 @@ const settingsStore = useSettingsStore()
--at-apply: px-1;
}
.icon {
--at-apply: mx-1;
}
a {
--at-apply: text-center no-underline text-stone-5 hover:text-dark dark:hover:text-light transition;
}
+1 -1
View File
@@ -175,7 +175,7 @@ provide(rootMenuInjectionKey, reactive({
>
<template v-for="(item, index) in menu" :key="index">
<SubMenu v-if="item.children?.length" :menu="item" :unique-key="[item.path ?? JSON.stringify(item)]" />
<Item v-else :item="item" :unique-key="[item.path ?? JSON.stringify(item)]" />
<Item v-else :item="item" :unique-key="[item.path ?? JSON.stringify(item)]" @click="handleMenuItemClick(item.path ?? JSON.stringify(item), item.meta)" />
</template>
</div>
</template>
+2 -2
View File
@@ -188,8 +188,8 @@ function handleMouseleave() {
'mx-2': rootMenu.isMenuPopup && (rootMenu.props.mode === 'vertical' || level !== 0),
}"
>
<template v-for="item in menu.children" :key="item.path">
<SubMenu v-if="item.meta?.sidebar !== false" :unique-key="[...uniqueKey, item.path]" :menu="item" :level="level + 1" />
<template v-for="item in menu.children" :key="item.path ?? JSON.stringify(item)">
<SubMenu v-if="item.meta?.sidebar !== false" :unique-key="[...uniqueKey, item.path ?? JSON.stringify(item)]" :menu="item" :level="level + 1" />
</template>
</OverlayScrollbarsComponent>
</Transition>
+21 -24
View File
@@ -55,7 +55,6 @@ const isShow = ref(false)
const searchInput = ref('')
const sourceList = ref<listTypes[]>([])
const actived = ref(-1)
const isScrollbarsInit = ref(false)
const searchInputRef = ref()
const searchResultRef = ref<OverlayScrollbarsComponentRef>()
@@ -262,7 +261,7 @@ function pageJump(path: listTypes['path'], link: listTypes['link']) {
</script>
<template>
<TransitionRoot as="template" :show="isShow" @after-leave="isScrollbarsInit = false">
<TransitionRoot as="template" :show="isShow">
<Dialog :initial-focus="searchInputRef" class="fixed inset-0 flex z-2000" @close="isShow && eventBus.emit('global-search-toggle')">
<TransitionChild as="template" v-bind="overlayTransitionClass">
<div class="fixed inset-0 transition-opacity bg-stone-200/75 dark:bg-stone-8/75 backdrop-blur-sm" />
@@ -277,29 +276,27 @@ function pageJump(path: listTypes['path'], link: listTypes['link']) {
<input ref="searchInputRef" v-model="searchInput" placeholder="搜索页面,支持标题、URL模糊查询" class="w-full focus:outline-none border-0 rounded-md placeholder-stone-4 dark:placeholder-stone-5 text-base px-3 bg-transparent text-dark dark:text-white" @keydown.esc="eventBus.emit('global-search-toggle')" @keydown.up.prevent="keyUp" @keydown.down.prevent="keyDown" @keydown.enter.prevent="keyEnter">
</div>
<DialogDescription class="relative m-0 of-y-hidden">
<OverlayScrollbarsComponent ref="searchResultRef" :options="{ scrollbars: { autoHide: 'leave', autoHideDelay: 300 } }" class="h-full" @os-initialized="isScrollbarsInit = true">
<template v-if="isScrollbarsInit">
<template v-if="resultList.length > 0">
<a v-for="(item, index) in resultList" ref="searchResultItemRef" :key="item.path" class="flex items-center cursor-pointer" :class="{ 'bg-stone-2/40 dark:bg-stone-7/40': index === actived }" :data-index="index" @click="pageJump(item.path, item.link)" @mouseover="actived = index">
<SvgIcon v-if="item.icon" :name="item.icon" :size="20" class="basis-16 transition" :class="{ 'scale-120 text-ui-primary': index === actived }" />
<div class="flex-1 flex flex-col gap-1 px-4 py-3 truncate" border-l="~ solid stone-2 dark:stone-7">
<div class="text-base font-bold truncate">{{ item.title ?? '[ 无标题 ]' }}</div>
<Breadcrumb v-if="item.breadcrumb.length" class="truncate">
<BreadcrumbItem v-for="(bc, bcIndex) in item.breadcrumb" :key="bcIndex" class="text-xs">
{{ bc.title ?? '[ 无标题 ]' }}
</BreadcrumbItem>
</Breadcrumb>
</div>
</a>
</template>
<template v-else>
<div flex="center col" py-6 text-stone-5>
<SvgIcon name="tabler:mood-empty" :size="40" />
<p text-base m-2>
没有找到你想要的
</p>
<OverlayScrollbarsComponent ref="searchResultRef" :options="{ scrollbars: { autoHide: 'leave', autoHideDelay: 300 } }" defer class="h-full">
<template v-if="resultList.length > 0">
<a v-for="(item, index) in resultList" ref="searchResultItemRef" :key="item.path" class="flex items-center cursor-pointer" :class="{ 'bg-stone-2/40 dark:bg-stone-7/40': index === actived }" :data-index="index" @click="pageJump(item.path, item.link)" @mouseover="actived = index">
<SvgIcon v-if="item.icon" :name="item.icon" :size="20" class="basis-16 transition" :class="{ 'scale-120 text-ui-primary': index === actived }" />
<div class="flex-1 flex flex-col gap-1 px-4 py-3 truncate" border-l="~ solid stone-2 dark:stone-7">
<div class="text-base font-bold truncate">{{ item.title ?? '[ 无标题 ]' }}</div>
<Breadcrumb v-if="item.breadcrumb.length" class="truncate">
<BreadcrumbItem v-for="(bc, bcIndex) in item.breadcrumb" :key="bcIndex" class="text-xs">
{{ bc.title ?? '[ 无标题 ]' }}
</BreadcrumbItem>
</Breadcrumb>
</div>
</template>
</a>
</template>
<template v-else>
<div flex="center col" py-6 text-stone-5>
<SvgIcon name="tabler:mood-empty" :size="40" />
<p text-base m-2>
没有找到你想要的
</p>
</div>
</template>
</OverlayScrollbarsComponent>
</DialogDescription>
+1 -1
View File
@@ -13,7 +13,7 @@ const props = withDefaults(
modelValue: false,
appear: false,
preventClose: false,
overlay: true,
overlay: false,
},
)
+1 -1
View File
@@ -16,7 +16,7 @@ const props = withDefaults(
appear: false,
side: 'right',
preventClose: false,
overlay: true,
overlay: false,
},
)
+1
View File
@@ -5,6 +5,7 @@ declare interface Window {
declare const __SYSTEM_INFO__: {
pkg: {
version: Recordable<string>
dependencies: Recordable<string>
devDependencies: Recordable<string>
}
+1
View File
@@ -38,6 +38,7 @@ export default async ({ mode, command }) => {
define: {
__SYSTEM_INFO__: JSON.stringify({
pkg: {
version: pkg.version,
dependencies: pkg.dependencies,
devDependencies: pkg.devDependencies,
},