Browse Source

release: update `3.9.2`

i18n
xiaoxian521 2 years ago
parent
commit
ab772081ec
  1. 5
      build/info.ts
  2. 8
      package.json
  3. 24
      pnpm-lock.yaml
  4. 2
      public/serverConfig.json
  5. 37
      src/layout/components/panel/index.vue
  6. 24
      src/layout/components/sidebar/leftCollapse.vue
  7. 13
      src/style/dark.scss
  8. 27
      src/style/element-plus.scss

5
build/info.ts

@ -9,10 +9,12 @@ export function viteBuildInfo(): Plugin {
let config: { command: string }; let config: { command: string };
let startTime: Dayjs; let startTime: Dayjs;
let endTime: Dayjs; let endTime: Dayjs;
let outDir: string;
return { return {
name: "vite:buildInfo", name: "vite:buildInfo",
configResolved(resolvedConfig: { command: string }) {
configResolved(resolvedConfig) {
config = resolvedConfig; config = resolvedConfig;
outDir = resolvedConfig.build?.outDir ?? "dist";
}, },
buildStart() { buildStart() {
console.log( console.log(
@ -32,6 +34,7 @@ export function viteBuildInfo(): Plugin {
if (config.command === "build") { if (config.command === "build") {
endTime = dayjs(new Date()); endTime = dayjs(new Date());
getPackageSize({ getPackageSize({
folder: outDir,
callback: (size: string) => { callback: (size: string) => {
console.log( console.log(
bold( bold(

8
package.json

@ -1,6 +1,6 @@
{ {
"name": "pure-admin-thin", "name": "pure-admin-thin",
"version": "3.9.1",
"version": "3.9.2",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite", "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
@ -31,8 +31,8 @@
"dependencies": { "dependencies": {
"@ctrl/tinycolor": "^3.4.1", "@ctrl/tinycolor": "^3.4.1",
"@pureadmin/descriptions": "^1.1.0", "@pureadmin/descriptions": "^1.1.0",
"@pureadmin/table": "^1.8.1",
"@pureadmin/utils": "^1.7.1",
"@pureadmin/table": "^1.8.2",
"@pureadmin/utils": "^1.7.2",
"@vueuse/core": "^9.6.0", "@vueuse/core": "^9.6.0",
"@vueuse/motion": "2.0.0-beta.12", "@vueuse/motion": "2.0.0-beta.12",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
@ -49,7 +49,7 @@
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path": "^0.12.7", "path": "^0.12.7",
"pinia": "^2.0.26",
"pinia": "^2.0.27",
"qs": "^6.11.0", "qs": "^6.11.0",
"responsive-storage": "^2.1.0", "responsive-storage": "^2.1.0",
"vue": "^3.2.45", "vue": "^3.2.45",

24
pnpm-lock.yaml

@ -9,9 +9,9 @@ specifiers:
'@iconify/vue': ^4.0.0 '@iconify/vue': ^4.0.0
'@intlify/vite-plugin-vue-i18n': ^6.0.3 '@intlify/vite-plugin-vue-i18n': ^6.0.3
'@pureadmin/descriptions': ^1.1.0 '@pureadmin/descriptions': ^1.1.0
'@pureadmin/table': ^1.8.1
'@pureadmin/table': ^1.8.2
'@pureadmin/theme': ^2.4.0 '@pureadmin/theme': ^2.4.0
'@pureadmin/utils': ^1.7.1
'@pureadmin/utils': ^1.7.2
'@types/element-resize-detector': 1.1.3 '@types/element-resize-detector': 1.1.3
'@types/js-cookie': ^3.0.1 '@types/js-cookie': ^3.0.1
'@types/lodash': ^4.14.180 '@types/lodash': ^4.14.180
@ -53,7 +53,7 @@ specifiers:
nprogress: ^0.2.0 nprogress: ^0.2.0
path: ^0.12.7 path: ^0.12.7
picocolors: ^1.0.0 picocolors: ^1.0.0
pinia: ^2.0.26
pinia: ^2.0.27
postcss: ^8.4.18 postcss: ^8.4.18
postcss-html: ^1.5.0 postcss-html: ^1.5.0
postcss-import: ^15.0.0 postcss-import: ^15.0.0
@ -95,8 +95,8 @@ specifiers:
dependencies: dependencies:
'@ctrl/tinycolor': 3.4.1 '@ctrl/tinycolor': 3.4.1
'@pureadmin/descriptions': 1.1[email protected] '@pureadmin/descriptions': 1.1[email protected]
'@pureadmin/table': 1.8.1[email protected]
'@pureadmin/utils': 1.7.1_aotapuqn7htzdjltsyimavekky
'@pureadmin/table': 1.8.2[email protected]
'@pureadmin/utils': 1.7.2_aotapuqn7htzdjltsyimavekky
'@vueuse/core': 9.6[email protected] '@vueuse/core': 9.6[email protected]
'@vueuse/motion': 2.0.0-[email protected] '@vueuse/motion': 2.0.0-[email protected]
animate.css: 4.1.1 animate.css: 4.1.1
@ -113,7 +113,7 @@ dependencies:
mockjs: 1.1.0 mockjs: 1.1.0
nprogress: 0.2.0 nprogress: 0.2.0
path: 0.12.7 path: 0.12.7
pinia: 2.0.26_mgnvym7yiazkylwwogi5r767ue
pinia: 2.0.27_mgnvym7yiazkylwwogi5r767ue
qs: 6.11.0 qs: 6.11.0
responsive-storage: 2.1.0 responsive-storage: 2.1.0
vue: 3.2.45 vue: 3.2.45
@ -920,8 +920,8 @@ packages:
vue: 3.2.45 vue: 3.2.45
dev: false dev: false
/@pureadmin/table/1.8.1[email protected]:
resolution: {integrity: sha512-oZ5GYmLTDgQ64U6+yKFjvpZG2Seuudk3hOWnUogMvKxhIvaRQsGBHbvyg47asMmXxUyeilq+nRumyuiuV7WJTg==}
/@pureadmin/table/1.8.2[email protected]:
resolution: {integrity: sha512-FGh1aOfgQtX16pCnP+bxg49TetcZDhdykIue0m5d8NIj6zkvJP53JU+DkUpvqvKmUiMsvIwme6e17BLZMmMiOw==}
peerDependencies: peerDependencies:
element-plus: ^2.0.0 element-plus: ^2.0.0
dependencies: dependencies:
@ -937,8 +937,8 @@ packages:
string-hash: 1.1.3 string-hash: 1.1.3
dev: true dev: true
/@pureadmin/utils/1.7.1_aotapuqn7htzdjltsyimavekky:
resolution: {integrity: sha512-LqYdMR1xvRDtPp66osOY6usmta6LNGMuON14iONv4ZUC/esQ3RflHlT5glGjOfGUSGCk8O94F5LVS/PVC9Q3Ng==}
/@pureadmin/utils/1.7.2_aotapuqn7htzdjltsyimavekky:
resolution: {integrity: sha512-L8tmogs9HCX6nuga1g79DcZr3KXNoWnIFcyP2z4zpmUmdBBAmMpXXz3Z+emI6HELmZu8DFx+v1MfKxccgsODRQ==}
peerDependencies: peerDependencies:
dayjs: '*' dayjs: '*'
echarts: '*' echarts: '*'
@ -4117,8 +4117,8 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/pinia/2.0.26_mgnvym7yiazkylwwogi5r767ue:
resolution: {integrity: sha512-tSxZNUcMGxQOvKZRjPKXxd2+/2NZhRF/CoYVE/+K6uE/Z3v1Oi4fcQFpxu5nMB1dCchjXUZ+lz0tBxV5ntwmQQ==}
/pinia/2.0.27_mgnvym7yiazkylwwogi5r767ue:
resolution: {integrity: sha512-nOnXP0OFeL8R4WjAHsterU+11vptda643gH02xKNtSCDPiRzVfRYodOLihLDoa0gL1KKuQKV+KOzEgdt3YvqEw==}
peerDependencies: peerDependencies:
'@vue/composition-api': ^1.4.0 '@vue/composition-api': ^1.4.0
typescript: '>=4.4.4' typescript: '>=4.4.4'

2
public/serverConfig.json

@ -1,5 +1,5 @@
{ {
"Version": "3.9.1",
"Version": "3.9.2",
"Title": "PureAdmin", "Title": "PureAdmin",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,

37
src/layout/components/panel/index.vue

@ -1,11 +1,27 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue";
import { onClickOutside } from "@vueuse/core";
import { ref, computed } from "vue";
import { emitter } from "@/utils/mitt"; import { emitter } from "@/utils/mitt";
import { onClickOutside } from "@vueuse/core";
import Close from "@iconify-icons/ep/close"; import Close from "@iconify-icons/ep/close";
const show = ref<Boolean>(false);
const target = ref(null); const target = ref(null);
const show = ref<Boolean>(false);
const iconClass = computed(() => {
return [
"mr-[20px]",
"outline-none",
"width-[20px]",
"height-[20px]",
"rounded-[4px]",
"cursor-pointer",
"transition-colors",
"hover:bg-[#0000000f]",
"dark:hover:bg-[#ffffff1f]",
"dark:hover:text-[#ffffffd9]"
];
});
onClickOutside(target, (event: any) => { onClickOutside(target, (event: any) => {
if (event.clientX > target.value.offsetLeft) return; if (event.clientX > target.value.offsetLeft) return;
show.value = false; show.value = false;
@ -23,9 +39,11 @@ emitter.on("openPanel", () => {
<div class="right-panel-items"> <div class="right-panel-items">
<div class="project-configuration"> <div class="project-configuration">
<h4 class="dark:text-white">项目配置</h4> <h4 class="dark:text-white">项目配置</h4>
<span title="关闭配置">
<span title="关闭配置" :class="iconClass">
<IconifyIconOffline <IconifyIconOffline
class="dark:text-white" class="dark:text-white"
width="20px"
height="20px"
:icon="Close" :icon="Close"
@click="show = !show" @click="show = !show"
/> />
@ -69,7 +87,6 @@ emitter.on("openPanel", () => {
box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.05); box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.05);
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1); transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
transform: translate(100%); transform: translate(100%);
// background: #fff;
z-index: 40000; z-index: 40000;
} }
@ -125,16 +142,6 @@ emitter.on("openPanel", () => {
align-items: center; align-items: center;
top: 15px; top: 15px;
margin-left: 10px; margin-left: 10px;
svg {
font-size: 20px;
margin-right: 20px;
&:hover {
cursor: pointer;
color: var(--el-color-primary);
}
}
} }
:deep(.el-divider--horizontal) { :deep(.el-divider--horizontal) {

24
src/layout/components/sidebar/leftCollapse.vue

@ -1,8 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue";
import { ref, computed } from "vue";
import { useNav } from "@/layout/hooks/useNav"; import { useNav } from "@/layout/hooks/useNav";
import MenuFold from "@iconify-icons/ri/menu-fold-fill"; import MenuFold from "@iconify-icons/ri/menu-fold-fill";
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
interface Props { interface Props {
isActive: boolean; isActive: boolean;
@ -15,6 +14,22 @@ const props = withDefaults(defineProps<Props>(), {
const visible = ref(false); const visible = ref(false);
const { tooltipEffect } = useNav(); const { tooltipEffect } = useNav();
const iconClass = computed(() => {
return [
"ml-4",
"mb-1",
"w-[16px]",
"h-[16px]",
"inline-block",
"align-middle",
"text-primary",
"cursor-pointer",
"duration-[360ms]",
"hover:text-primary",
"dark:hover:!text-white"
];
});
const emit = defineEmits<{ const emit = defineEmits<{
(e: "toggleClick"): void; (e: "toggleClick"): void;
}>(); }>();
@ -33,8 +48,9 @@ const toggleClick = () => {
:content="props.isActive ? '点击折叠' : '点击展开'" :content="props.isActive ? '点击折叠' : '点击展开'"
> >
<IconifyIconOffline <IconifyIconOffline
:icon="props.isActive ? MenuFold : MenuUnfold"
class="cursor-pointer inline-block align-middle text-primary hover:text-primary dark:hover:!text-white w-[16px] h-[16px] ml-4 mb-1"
:icon="MenuFold"
:class="iconClass"
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
@click="toggleClick" @click="toggleClick"
@mouseenter="visible = true" @mouseenter="visible = true"
@mouseleave="visible = false" @mouseleave="visible = false"

13
src/style/dark.scss

@ -156,6 +156,19 @@ html.dark {
background: transparent; background: transparent;
} }
/* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式,表现更鲜明 */
.el-icon {
&.el-dialog__close,
&.el-drawer__close,
&.el-message-box__close,
&.el-notification__closeBtn {
&:hover {
color: rgba(255, 255, 255, 0.85) !important;
background-color: rgba(255, 255, 255, 0.12);
}
}
}
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,非暗黑模式在 src/style/element-plus.scss 文件进行了适配 */ /* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,非暗黑模式在 src/style/element-plus.scss 文件进行了适配 */
.pure-message { .pure-message {
background-image: initial !important; background-image: initial !important;

27
src/style/element-plus.scss

@ -69,6 +69,33 @@
} }
} }
/* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式,表现更鲜明 */
.el-dialog__headerbtn,
.el-message-box__headerbtn {
&:hover {
.el-dialog__close {
color: var(--el-color-info) !important;
}
}
}
.el-icon {
&.el-dialog__close,
&.el-drawer__close,
&.el-message-box__close,
&.el-notification__closeBtn {
width: 24px;
height: 24px;
outline: none;
border-radius: 4px;
transition: background-color 0.2s, color 0.2s;
&:hover {
color: rgba(0, 0, 0, 0.88) !important;
background-color: rgba(0, 0, 0, 0.06);
text-decoration: none;
}
}
}
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,暗黑模式在 src/style/dark.scss 文件进行了适配 */ /* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,暗黑模式在 src/style/dark.scss 文件进行了适配 */
.pure-message { .pure-message {
border-width: 0 !important; border-width: 0 !important;

Loading…
Cancel
Save