mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	Compare commits
	
		
			13 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5a4f844d24 | ||
| 
						 | 
					59faf15229 | ||
| 
						 | 
					5bd96b8dd3 | ||
| 
						 | 
					8efdb10d86 | ||
| 
						 | 
					2aa85c6f93 | ||
| 
						 | 
					3ad438984e | ||
| 
						 | 
					f1850416c8 | ||
| 
						 | 
					086bad474e | ||
| 
						 | 
					42b121a117 | ||
| 
						 | 
					db64b0e2e9 | ||
| 
						 | 
					40d0f8ac1c | ||
| 
						 | 
					87b18386f5 | ||
| 
						 | 
					4c1c7e6599 | 
							
								
								
									
										2
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,7 @@
 | 
			
		||||
      "type": "node",
 | 
			
		||||
      "request": "launch",
 | 
			
		||||
      "name": "TS Debugger",
 | 
			
		||||
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/tsx",
 | 
			
		||||
      "runtimeExecutable": "tsx",
 | 
			
		||||
      "skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
 | 
			
		||||
      "program": "${file}"
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -1,6 +1,40 @@
 | 
			
		||||
# Changelog
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
 | 
			
		||||
 | 
			
		||||
###    🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
- **components**:
 | 
			
		||||
  - Fix the issue of search box popping up repeatedly due to carriage return  -  by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/468 [<samp>(5bd96)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5bd96b8)
 | 
			
		||||
- **projects**:
 | 
			
		||||
  - fix click menu search. fixed #466, close #467  -  by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/466 and https://github.com/soybeanjs/soybean-admin/issues/467 [<samp>(8efdb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/8efdb10)
 | 
			
		||||
  - fix reCacheRoute. fixed #464  -  by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/464 [<samp>(59faf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/59faf15)
 | 
			
		||||
- **styles**:
 | 
			
		||||
  - fix FirstLevelMenu style. fixed #450  -  by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/450 [<samp>(db64b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/db64b0e)
 | 
			
		||||
  - fix PinToggler style. fixed #451  -  by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/451 [<samp>(42b12)</samp>](https://github.com/soybeanjs/soybean-admin/commit/42b121a)
 | 
			
		||||
 | 
			
		||||
###    🛠 Optimizations
 | 
			
		||||
 | 
			
		||||
- **components**: accuracy draggable area for TableColumnSetting with animation  -  by @orangelckc in https://github.com/soybeanjs/soybean-admin/issues/465 [<samp>(2aa85)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2aa85c6)
 | 
			
		||||
- **projects**: unocss border shortcut  -  by @soybeanjs [<samp>(40d0f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/40d0f8a)
 | 
			
		||||
 | 
			
		||||
###    📖 Documentation
 | 
			
		||||
 | 
			
		||||
- **projects**: update CHANGELOG  -  by @soybeanjs [<samp>(87b18)</samp>](https://github.com/soybeanjs/soybean-admin/commit/87b1838)
 | 
			
		||||
 | 
			
		||||
###    🏡 Chore
 | 
			
		||||
 | 
			
		||||
- **other**:
 | 
			
		||||
  - correct spell mistake  -  by @orangelckc in https://github.com/soybeanjs/soybean-admin/issues/460 [<samp>(086ba)</samp>](https://github.com/soybeanjs/soybean-admin/commit/086bad4)
 | 
			
		||||
  - correct spell mistake  -  by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/462 [<samp>(f1850)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f185041)
 | 
			
		||||
- **projects**:
 | 
			
		||||
  - update vscode launch.json  -  by @soybeanjs [<samp>(4c1c7)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4c1c7e6)
 | 
			
		||||
 | 
			
		||||
###    ❤️ Contributors
 | 
			
		||||
 | 
			
		||||
[](https://github.com/soybeanjs)  [](https://github.com/Azir-11)  [](https://github.com/orangelckc)  
 | 
			
		||||
 | 
			
		||||
## [v1.1.2](https://github.com/soybeanjs/soybean-admin/compare/v1.1.1...v1.1.2) (2024-05-24)
 | 
			
		||||
 | 
			
		||||
###    🐞 Bug Fixes
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,52 @@
 | 
			
		||||
# 更新日志
 | 
			
		||||
 | 
			
		||||
## [v1.1.2](https://github.com/soybeanjs/soybean-admin/compare/v1.1.1...v1.1.2) (2024-05-24)
 | 
			
		||||
 | 
			
		||||
###    🐞 错误修复
 | 
			
		||||
 | 
			
		||||
- **项目**:
 | 
			
		||||
  - 修复头部样式 & 修复点击全局标签时按钮高亮。修复了 #446  -  由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/446 [<samp>(64fc0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/64fc099)
 | 
			
		||||
  - 修复多标签页只渲染一次。修复了 #441  -  由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/441 [<samp>(e379d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e379d6c)
 | 
			
		||||
 | 
			
		||||
###    🛠 优化
 | 
			
		||||
 | 
			
		||||
- **项目**: 优化代码  -  由 @honghuangdc [<samp>(bc8dc)</samp>](https://github.com/soybeanjs/soybean-admin/commit/bc8dc47)
 | 
			
		||||
 | 
			
		||||
###    ❤️ 贡献者
 | 
			
		||||
 | 
			
		||||
[](https://github.com/honghuangdc)  
 | 
			
		||||
 | 
			
		||||
## [v1.1.1](https://github.com/soybeanjs/soybean-admin/compare/v1.1.0...v1.1.1) (2024-05-20)
 | 
			
		||||
 | 
			
		||||
###    🚀 功能
 | 
			
		||||
 | 
			
		||||
- **hooks**: 为 useEcharts 添加 setOptions  -  由 @honghuangdc 提交 [<samp>(e4d53)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e4d53aa)
 | 
			
		||||
 | 
			
		||||
###    🐞 修复错误
 | 
			
		||||
 | 
			
		||||
- **projects**:
 | 
			
		||||
  - 修复 useRouter。修复了 #436  -  由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/436 提交 [<samp>(0774a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/0774a51)
 | 
			
		||||
  - 在动态路由模式下获取路由时添加错误处理。修复了 440  -  由 @honghuangdc 提交 [<samp>(57b4a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/57b4a9d)
 | 
			
		||||
- **styles**:
 | 
			
		||||
  - 修复 useTable 类型  -  由 @honghuangdc 提交 [<samp>(07124)</samp>](https://github.com/soybeanjs/soybean-admin/commit/071241f)
 | 
			
		||||
 | 
			
		||||
###    📖 文档
 | 
			
		||||
 | 
			
		||||
- **projects**:
 | 
			
		||||
  - 更新 CHANGELOG  -  由 @honghuangdc 提交 [<samp>(19783)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1978397)
 | 
			
		||||
  - 更新 README.md  -  由 @honghuangdc 提交 [<samp>(fa56e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fa56e9c)
 | 
			
		||||
  - 更新 README.md  -  由 @honghuangdc 提交 [<samp>(419ea)</samp>](https://github.com/soybeanjs/soybean-admin/commit/419ea42)
 | 
			
		||||
 | 
			
		||||
###    🏡 杂项
 | 
			
		||||
 | 
			
		||||
- **projects**:
 | 
			
		||||
  - 更新依赖并修复 TS 错误  -  由 @honghuangdc 提交 [<samp>(4ea9c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4ea9c85)
 | 
			
		||||
  - 更新 eslint-config 并修复代码  -  由 @honghuangdc 提交 [<samp>(68ea9)</samp>](https://github.com/soybeanjs/soybean-admin/commit/68ea974)
 | 
			
		||||
  - 更新 @elegant-router/vue 并为 resolve route 添加错误处理。修复了 #442  -  由 @honghuangdc 在 https://github.com/soybeanjs/soybean-admin/issues/442 提交 [<samp>(24ff8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/24ff852)
 | 
			
		||||
 | 
			
		||||
###    ❤️ 贡献者
 | 
			
		||||
 | 
			
		||||
[](https://github.com/honghuangdc)  
 | 
			
		||||
 | 
			
		||||
## [v1.1.0](https://github.com/honghuangdc/soybean-admin/compare/v1.0.9...v1.1.0) (2024-05-07)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "soybean-admin",
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "Soybean",
 | 
			
		||||
@@ -61,6 +61,7 @@
 | 
			
		||||
    "naive-ui": "2.38.2",
 | 
			
		||||
    "nprogress": "0.2.0",
 | 
			
		||||
    "pinia": "2.1.7",
 | 
			
		||||
    "tailwind-merge": "^2.3.0",
 | 
			
		||||
    "vue": "3.4.27",
 | 
			
		||||
    "vue-draggable-plus": "0.4.1",
 | 
			
		||||
    "vue-i18n": "9.13.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/axios",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/color",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/hooks",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/materials",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ defineSlots<Slots>();
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <div
 | 
			
		||||
    class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-1px rounded-4px border-solid px-12px py-4px"
 | 
			
		||||
    class=":soy: relative inline-flex cursor-pointer items-center justify-center gap-12px whitespace-nowrap border-(1px solid) rounded-4px px-12px py-4px"
 | 
			
		||||
    :class="[
 | 
			
		||||
      style['button-tab'],
 | 
			
		||||
      { [style['button-tab_dark']]: darkMode },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/fetch",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/scripts",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "bin": {
 | 
			
		||||
    "sa": "./bin.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/uno-preset",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@sa/utils",
 | 
			
		||||
  "version": "1.1.2",
 | 
			
		||||
  "version": "1.1.3",
 | 
			
		||||
  "exports": {
 | 
			
		||||
    ".": "./src/index.ts"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										10
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@@ -53,6 +53,9 @@ importers:
 | 
			
		||||
      pinia:
 | 
			
		||||
        specifier: 2.1.7
 | 
			
		||||
        version: 2.1.7(typescript@5.4.5)(vue@3.4.27(typescript@5.4.5))
 | 
			
		||||
      tailwind-merge:
 | 
			
		||||
        specifier: ^2.3.0
 | 
			
		||||
        version: 2.3.0
 | 
			
		||||
      vue:
 | 
			
		||||
        specifier: 3.4.27
 | 
			
		||||
        version: 3.4.27(typescript@5.4.5)
 | 
			
		||||
@@ -4295,6 +4298,9 @@ packages:
 | 
			
		||||
    resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==}
 | 
			
		||||
    engines: {node: ^14.18.0 || >=16.0.0}
 | 
			
		||||
 | 
			
		||||
  tailwind-merge@2.3.0:
 | 
			
		||||
    resolution: {integrity: sha512-vkYrLpIP+lgR0tQCG6AP7zZXCTLc1Lnv/CCRT3BqJ9CZ3ui2++GPaGb1x/ILsINIMSYqqvrpqjUFsMNLlW99EA==}
 | 
			
		||||
 | 
			
		||||
  tapable@2.2.1:
 | 
			
		||||
    resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
 | 
			
		||||
    engines: {node: '>=6'}
 | 
			
		||||
@@ -9361,6 +9367,10 @@ snapshots:
 | 
			
		||||
      '@pkgr/core': 0.1.1
 | 
			
		||||
      tslib: 2.6.2
 | 
			
		||||
 | 
			
		||||
  tailwind-merge@2.3.0:
 | 
			
		||||
    dependencies:
 | 
			
		||||
      '@babel/runtime': 7.24.5
 | 
			
		||||
 | 
			
		||||
  tapable@2.2.1: {}
 | 
			
		||||
 | 
			
		||||
  tar@6.2.1:
 | 
			
		||||
 
 | 
			
		||||
@@ -21,10 +21,10 @@ const columns = defineModel<NaiveUI.TableColumnCheck[]>('columns', {
 | 
			
		||||
        {{ $t('common.columnSetting') }}
 | 
			
		||||
      </NButton>
 | 
			
		||||
    </template>
 | 
			
		||||
    <VueDraggable v-model="columns">
 | 
			
		||||
    <VueDraggable v-model="columns" :animation="150" filter=".none_draggable">
 | 
			
		||||
      <div v-for="item in columns" :key="item.key" class="h-36px flex-y-center rd-4px hover:(bg-primary bg-opacity-20)">
 | 
			
		||||
        <icon-mdi-drag class="mr-8px cursor-move text-icon" />
 | 
			
		||||
        <NCheckbox v-model:checked="item.checked">
 | 
			
		||||
        <icon-mdi-drag class="mr-8px h-full cursor-move text-icon" />
 | 
			
		||||
        <NCheckbox v-model:checked="item.checked" class="none_draggable flex-1">
 | 
			
		||||
          {{ item.title }}
 | 
			
		||||
        </NCheckbox>
 | 
			
		||||
      </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { computed } from 'vue';
 | 
			
		||||
import { createReusableTemplate } from '@vueuse/core';
 | 
			
		||||
import type { PopoverPlacement } from 'naive-ui';
 | 
			
		||||
import { twMerge } from 'tailwind-merge';
 | 
			
		||||
 | 
			
		||||
defineOptions({
 | 
			
		||||
  name: 'ButtonIcon',
 | 
			
		||||
@@ -21,60 +20,29 @@ interface Props {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<Props>(), {
 | 
			
		||||
  class: 'h-36px text-icon',
 | 
			
		||||
  class: '',
 | 
			
		||||
  icon: '',
 | 
			
		||||
  tooltipContent: '',
 | 
			
		||||
  tooltipPlacement: 'bottom',
 | 
			
		||||
  zIndex: 98
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
interface ButtonProps {
 | 
			
		||||
  className: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const [DefineButton, Button] = createReusableTemplate<ButtonProps>();
 | 
			
		||||
 | 
			
		||||
const cls = computed(() => {
 | 
			
		||||
  let clsStr = props.class;
 | 
			
		||||
 | 
			
		||||
  if (!clsStr.includes('h-')) {
 | 
			
		||||
    clsStr += ' h-36px';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!clsStr.includes('text-')) {
 | 
			
		||||
    clsStr += ' text-icon';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return clsStr;
 | 
			
		||||
});
 | 
			
		||||
const DEFAULT_CLASS = 'h-[36px] text-icon';
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <!-- define component start: Button -->
 | 
			
		||||
  <DefineButton v-slot="{ $slots, className }">
 | 
			
		||||
    <NButton quaternary :class="className">
 | 
			
		||||
      <div class="flex-center gap-8px">
 | 
			
		||||
        <component :is="$slots.default" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </NButton>
 | 
			
		||||
  </DefineButton>
 | 
			
		||||
  <!-- define component end: Button -->
 | 
			
		||||
 | 
			
		||||
  <NTooltip v-if="tooltipContent" :placement="tooltipPlacement" :z-index="zIndex">
 | 
			
		||||
  <NTooltip :placement="tooltipPlacement" :z-index="zIndex" :disabled="!tooltipContent">
 | 
			
		||||
    <template #trigger>
 | 
			
		||||
      <Button :class-name="cls" v-bind="$attrs">
 | 
			
		||||
        <slot>
 | 
			
		||||
          <SvgIcon :icon="icon" />
 | 
			
		||||
        </slot>
 | 
			
		||||
      </Button>
 | 
			
		||||
      <NButton quaternary :class="twMerge(DEFAULT_CLASS, props.class)" v-bind="$attrs">
 | 
			
		||||
        <div class="flex-center gap-8px">
 | 
			
		||||
          <slot>
 | 
			
		||||
            <SvgIcon :icon="icon" />
 | 
			
		||||
          </slot>
 | 
			
		||||
        </div>
 | 
			
		||||
      </NButton>
 | 
			
		||||
    </template>
 | 
			
		||||
    {{ tooltipContent }}
 | 
			
		||||
  </NTooltip>
 | 
			
		||||
  <Button v-else :class-name="cls" v-bind="$attrs">
 | 
			
		||||
    <slot>
 | 
			
		||||
      <SvgIcon :icon="icon" />
 | 
			
		||||
    </slot>
 | 
			
		||||
  </Button>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
 
 | 
			
		||||
@@ -68,7 +68,7 @@ function handleClickMixMenu(menu: App.Global.Menu) {
 | 
			
		||||
      <component :is="icon" :class="[isMini ? 'text-icon-small' : 'text-icon-large']" />
 | 
			
		||||
      <p
 | 
			
		||||
        class="w-full ellipsis-text text-center text-12px transition-height-300"
 | 
			
		||||
        :class="[isMini ? 'h-0 pt-0' : 'h-24px pt-4px']"
 | 
			
		||||
        :class="[isMini ? 'h-0 pt-0' : 'h-20px pt-4px']"
 | 
			
		||||
      >
 | 
			
		||||
        {{ label }}
 | 
			
		||||
      </p>
 | 
			
		||||
 
 | 
			
		||||
@@ -55,8 +55,8 @@ function handleResetActiveMenu() {
 | 
			
		||||
        :inverted="siderInverted"
 | 
			
		||||
        :style="{ width: showDrawer ? themeStore.sider.mixChildMenuWidth + 'px' : '0px' }"
 | 
			
		||||
      >
 | 
			
		||||
        <header class="flex-y-center justify-between" :style="{ height: themeStore.header.height + 'px' }">
 | 
			
		||||
          <h2 class="pl-8px text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
 | 
			
		||||
        <header class="flex-y-center justify-between px-12px" :style="{ height: themeStore.header.height + 'px' }">
 | 
			
		||||
          <h2 class="text-16px text-primary font-bold">{{ $t('system.title') }}</h2>
 | 
			
		||||
          <PinToggler
 | 
			
		||||
            :pin="appStore.mixSiderFixed"
 | 
			
		||||
            :class="{ 'text-white:88 !hover:text-white': siderInverted }"
 | 
			
		||||
 
 | 
			
		||||
@@ -34,9 +34,9 @@ function search() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function handleClose() {
 | 
			
		||||
  visible.value = false;
 | 
			
		||||
  // handle with setTimeout to prevent user from seeing some operations
 | 
			
		||||
  setTimeout(() => {
 | 
			
		||||
    visible.value = false;
 | 
			
		||||
    resultOptions.value = [];
 | 
			
		||||
    keyword.value = '';
 | 
			
		||||
  }, 200);
 | 
			
		||||
@@ -112,7 +112,7 @@ registerShortcut();
 | 
			
		||||
 | 
			
		||||
    <div class="mt-20px">
 | 
			
		||||
      <NEmpty v-if="resultOptions.length === 0" :description="$t('common.noData')" />
 | 
			
		||||
      <SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter.prevent="handleEnter" />
 | 
			
		||||
      <SearchResult v-else v-model:path="activePath" :options="resultOptions" @enter="handleEnter" />
 | 
			
		||||
    </div>
 | 
			
		||||
    <template #footer>
 | 
			
		||||
      <SearchFooter v-if="!isMobile" />
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ export function createRouteGuard(router: Router) {
 | 
			
		||||
          next({ name: rootRoute });
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      // if is is constant route, then it is allowed to access directly
 | 
			
		||||
      // if it is constant route, then it is allowed to access directly
 | 
			
		||||
      {
 | 
			
		||||
        condition: !needLogin,
 | 
			
		||||
        callback: () => {
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ export const useAppStore = defineStore(SetupStoreId.App, () => {
 | 
			
		||||
      // update tabs by locale
 | 
			
		||||
      tabStore.updateTabsByLocale();
 | 
			
		||||
 | 
			
		||||
      // sey dayjs locale
 | 
			
		||||
      // set dayjs locale
 | 
			
		||||
      setDayjsLocale(locale.value);
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 
 | 
			
		||||
@@ -97,13 +97,19 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
 | 
			
		||||
  /** Cache routes */
 | 
			
		||||
  const cacheRoutes = ref<RouteKey[]>([]);
 | 
			
		||||
 | 
			
		||||
  /** All cache routes */
 | 
			
		||||
  const allCacheRoutes = shallowRef<RouteKey[]>([]);
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Get cache routes
 | 
			
		||||
   *
 | 
			
		||||
   * @param routes Vue routes
 | 
			
		||||
   */
 | 
			
		||||
  function getCacheRoutes(routes: RouteRecordRaw[]) {
 | 
			
		||||
    cacheRoutes.value = getCacheRouteNames(routes);
 | 
			
		||||
    const alls = getCacheRouteNames(routes);
 | 
			
		||||
 | 
			
		||||
    cacheRoutes.value = alls;
 | 
			
		||||
    allCacheRoutes.value = [...alls];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@@ -130,12 +136,23 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
 | 
			
		||||
    cacheRoutes.value.splice(index, 1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Is cached route
 | 
			
		||||
   *
 | 
			
		||||
   * @param routeKey
 | 
			
		||||
   */
 | 
			
		||||
  function isCachedRoute(routeKey: RouteKey) {
 | 
			
		||||
    return allCacheRoutes.value.includes(routeKey);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Re cache routes by route key
 | 
			
		||||
   *
 | 
			
		||||
   * @param routeKey
 | 
			
		||||
   */
 | 
			
		||||
  async function reCacheRoutesByKey(routeKey: RouteKey) {
 | 
			
		||||
    if (!isCachedRoute(routeKey)) return;
 | 
			
		||||
 | 
			
		||||
    removeCacheRoutes(routeKey);
 | 
			
		||||
 | 
			
		||||
    await appStore.reloadPage();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user