mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 17:07:19 +08:00
Merge branch 'main' into pages
This commit is contained in:
commit
c0d683c9b1
@ -4,6 +4,7 @@ import { pathResolve } from "./utils";
|
|||||||
import { viteBuildInfo } from "./info";
|
import { viteBuildInfo } from "./info";
|
||||||
import svgLoader from "vite-svg-loader";
|
import svgLoader from "vite-svg-loader";
|
||||||
import type { PluginOption } from "vite";
|
import type { PluginOption } from "vite";
|
||||||
|
import checker from "vite-plugin-checker";
|
||||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||||
import Inspector from "vite-plugin-vue-inspector";
|
import Inspector from "vite-plugin-vue-inspector";
|
||||||
import { configCompressPlugin } from "./compress";
|
import { configCompressPlugin } from "./compress";
|
||||||
@ -28,6 +29,16 @@ export function getPluginsList(
|
|||||||
jitCompilation: false,
|
jitCompilation: false,
|
||||||
include: [pathResolve("../locales/**")]
|
include: [pathResolve("../locales/**")]
|
||||||
}),
|
}),
|
||||||
|
checker({
|
||||||
|
typescript: true,
|
||||||
|
vueTsc: true,
|
||||||
|
eslint: {
|
||||||
|
lintCommand: `eslint ${pathResolve("../{src,mock,build}/**/*.{vue,js,ts,tsx}")}`,
|
||||||
|
useFlatConfig: true
|
||||||
|
},
|
||||||
|
terminal: false,
|
||||||
|
enableBuild: false
|
||||||
|
}),
|
||||||
// 按下Command(⌘)+Shift(⇧),然后点击页面元素会自动打开本地IDE并跳转到对应的代码位置
|
// 按下Command(⌘)+Shift(⇧),然后点击页面元素会自动打开本地IDE并跳转到对应的代码位置
|
||||||
Inspector(),
|
Inspector(),
|
||||||
viteBuildInfo(),
|
viteBuildInfo(),
|
||||||
|
87
package.json
87
package.json
@ -56,8 +56,8 @@
|
|||||||
"@pureadmin/table": "^3.1.2",
|
"@pureadmin/table": "^3.1.2",
|
||||||
"@pureadmin/utils": "^2.4.7",
|
"@pureadmin/utils": "^2.4.7",
|
||||||
"@vue-flow/background": "^1.3.0",
|
"@vue-flow/background": "^1.3.0",
|
||||||
"@vue-flow/core": "^1.34.1",
|
"@vue-flow/core": "^1.39.1",
|
||||||
"@vueuse/core": "^10.10.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"@vueuse/motion": "^2.2.3",
|
"@vueuse/motion": "^2.2.3",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
@ -66,10 +66,10 @@
|
|||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
"china-area-data": "^5.0.1",
|
"china-area-data": "^5.0.1",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.12",
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.1",
|
||||||
"el-table-infinite-scroll": "^3.0.5",
|
"el-table-infinite-scroll": "^3.0.6",
|
||||||
"element-plus": "^2.7.4",
|
"element-plus": "^2.7.8",
|
||||||
"intro.js": "^7.2.0",
|
"intro.js": "^7.2.0",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jsbarcode": "^3.11.6",
|
"jsbarcode": "^3.11.6",
|
||||||
@ -79,40 +79,40 @@
|
|||||||
"mqtt": "4.3.7",
|
"mqtt": "4.3.7",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.2.0",
|
||||||
"pinyin-pro": "^3.21.1",
|
"pinyin-pro": "^3.24.0",
|
||||||
"plus-pro-components": "^0.1.8",
|
"plus-pro-components": "^0.1.13",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"qs": "^6.12.1",
|
"qs": "^6.12.3",
|
||||||
"responsive-storage": "^2.2.0",
|
"responsive-storage": "^2.2.0",
|
||||||
"sortablejs": "^1.15.2",
|
"sortablejs": "^1.15.2",
|
||||||
"swiper": "^11.1.4",
|
"swiper": "^11.1.8",
|
||||||
"typeit": "^8.8.3",
|
"typeit": "^8.8.4",
|
||||||
"v-contextmenu": "^3.2.0",
|
"v-contextmenu": "^3.2.0",
|
||||||
"v3-infinite-loading": "^1.3.1",
|
"v3-infinite-loading": "^1.3.1",
|
||||||
"version-rocket": "^1.7.1",
|
"version-rocket": "^1.7.1",
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.4.34",
|
||||||
"vue-i18n": "^9.13.1",
|
"vue-i18n": "^9.13.1",
|
||||||
"vue-json-pretty": "^2.4.0",
|
"vue-json-pretty": "^2.4.0",
|
||||||
"vue-pdf-embed": "^2.0.4",
|
"vue-pdf-embed": "^2.1.0",
|
||||||
"vue-router": "^4.3.2",
|
"vue-router": "^4.4.0",
|
||||||
"vue-tippy": "^6.4.1",
|
"vue-tippy": "^6.4.4",
|
||||||
"vue-types": "^5.1.2",
|
"vue-types": "^5.1.3",
|
||||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||||
"vue-waterfall-plugin-next": "^2.4.3",
|
"vue-waterfall-plugin-next": "^2.4.3",
|
||||||
"vue3-danmaku": "^1.6.0",
|
"vue3-danmaku": "^1.6.1",
|
||||||
"vue3-puzzle-vcode": "^1.1.7",
|
"vue3-puzzle-vcode": "^1.1.7",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "^4.6.17",
|
"vxe-table": "4.6.17",
|
||||||
"wavesurfer.js": "^7.7.15",
|
"wavesurfer.js": "^7.8.2",
|
||||||
"xgplayer": "^3.0.18",
|
"xgplayer": "^3.0.19",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.3.0",
|
"@commitlint/cli": "^19.3.0",
|
||||||
"@commitlint/config-conventional": "^19.2.2",
|
"@commitlint/config-conventional": "^19.2.2",
|
||||||
"@commitlint/types": "^19.0.3",
|
"@commitlint/types": "^19.0.3",
|
||||||
"@eslint/js": "^9.4.0",
|
"@eslint/js": "^9.8.0",
|
||||||
"@faker-js/faker": "^8.4.1",
|
"@faker-js/faker": "^8.4.1",
|
||||||
"@iconify-icons/ep": "^1.2.12",
|
"@iconify-icons/ep": "^1.2.12",
|
||||||
"@iconify-icons/ri": "^1.2.10",
|
"@iconify-icons/ri": "^1.2.10",
|
||||||
@ -123,53 +123,54 @@
|
|||||||
"@types/gradient-string": "^1.1.6",
|
"@types/gradient-string": "^1.1.6",
|
||||||
"@types/intro.js": "^5.1.5",
|
"@types/intro.js": "^5.1.5",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/node": "^20.14.2",
|
"@types/node": "^20.14.13",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/qs": "^6.9.15",
|
"@types/qs": "^6.9.15",
|
||||||
"@types/sortablejs": "^1.15.8",
|
"@types/sortablejs": "^1.15.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.12.0",
|
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||||
"@typescript-eslint/parser": "^7.12.0",
|
"@typescript-eslint/parser": "^7.17.0",
|
||||||
"@vitejs/plugin-vue": "^5.0.5",
|
"@vitejs/plugin-vue": "^5.1.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"boxen": "^7.1.1",
|
"boxen": "^7.1.1",
|
||||||
"cssnano": "^7.0.2",
|
"cssnano": "^7.0.4",
|
||||||
"dagre": "^0.8.5",
|
"dagre": "^0.8.5",
|
||||||
"eslint": "^9.4.0",
|
"eslint": "^9.8.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-define-config": "^2.1.0",
|
"eslint-define-config": "^2.1.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"eslint-plugin-vue": "^9.26.0",
|
"eslint-plugin-vue": "^9.27.0",
|
||||||
"gradient-string": "^2.0.2",
|
"gradient-string": "^2.0.2",
|
||||||
"husky": "^9.0.11",
|
"husky": "^9.1.3",
|
||||||
"lint-staged": "^15.2.5",
|
"lint-staged": "^15.2.7",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.40",
|
||||||
"postcss-html": "^1.7.0",
|
"postcss-html": "^1.7.0",
|
||||||
"postcss-import": "^16.1.0",
|
"postcss-import": "^16.1.0",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
"prettier": "^3.3.1",
|
"prettier": "^3.3.3",
|
||||||
"rimraf": "^5.0.7",
|
"rimraf": "^5.0.9",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"sass": "^1.77.4",
|
"sass": "^1.77.8",
|
||||||
"stylelint": "^16.6.1",
|
"stylelint": "^16.7.0",
|
||||||
"stylelint-config-recess-order": "^5.0.1",
|
"stylelint-config-recess-order": "^5.0.1",
|
||||||
"stylelint-config-recommended-vue": "^1.5.0",
|
"stylelint-config-recommended-vue": "^1.5.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0",
|
"stylelint-config-standard-scss": "^13.1.0",
|
||||||
"stylelint-prettier": "^5.0.0",
|
"stylelint-prettier": "^5.0.2",
|
||||||
"svgo": "^3.3.2",
|
"svgo": "^3.3.2",
|
||||||
"tailwindcss": "^3.4.4",
|
"tailwindcss": "^3.4.7",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.5.4",
|
||||||
"vite": "^5.2.12",
|
"vite": "^5.3.5",
|
||||||
"vite-plugin-cdn-import": "^1.0.1",
|
"vite-plugin-cdn-import": "^1.0.1",
|
||||||
|
"vite-plugin-checker": "^0.7.2",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-fake-server": "^2.1.1",
|
"vite-plugin-fake-server": "^2.1.1",
|
||||||
"vite-plugin-remove-console": "^2.2.0",
|
"vite-plugin-remove-console": "^2.2.0",
|
||||||
"vite-plugin-router-warn": "^1.0.0",
|
"vite-plugin-router-warn": "^1.0.0",
|
||||||
"vite-plugin-vue-inspector": "^5.1.2",
|
"vite-plugin-vue-inspector": "^5.1.3",
|
||||||
"vite-svg-loader": "^5.1.0",
|
"vite-svg-loader": "^5.1.0",
|
||||||
"vue-eslint-parser": "^9.4.3",
|
"vue-eslint-parser": "^9.4.3",
|
||||||
"vue-tsc": "^1.8.27"
|
"vue-tsc": "^2.0.29"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
||||||
|
3549
pnpm-lock.yaml
generated
3549
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,7 @@ defineOptions({
|
|||||||
name: "ReDialog"
|
name: "ReDialog"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const sureBtnMap = ref({});
|
||||||
const fullscreen = ref(false);
|
const fullscreen = ref(false);
|
||||||
|
|
||||||
const footerButtons = computed(() => {
|
const footerButtons = computed(() => {
|
||||||
@ -43,8 +44,21 @@ const footerButtons = computed(() => {
|
|||||||
bg: true,
|
bg: true,
|
||||||
popconfirm: options?.popconfirm,
|
popconfirm: options?.popconfirm,
|
||||||
btnClick: ({ dialog: { options, index } }) => {
|
btnClick: ({ dialog: { options, index } }) => {
|
||||||
const done = () =>
|
if (options?.sureBtnLoading) {
|
||||||
|
sureBtnMap.value[index] = Object.assign(
|
||||||
|
{},
|
||||||
|
sureBtnMap.value[index],
|
||||||
|
{
|
||||||
|
loading: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const done = () => {
|
||||||
|
if (options?.sureBtnLoading) {
|
||||||
|
sureBtnMap.value[index].loading = false;
|
||||||
|
}
|
||||||
closeDialog(options, index, { command: "sure" });
|
closeDialog(options, index, { command: "sure" });
|
||||||
|
};
|
||||||
if (options?.beforeSure && isFunction(options?.beforeSure)) {
|
if (options?.beforeSure && isFunction(options?.beforeSure)) {
|
||||||
options.beforeSure(done, { options, index });
|
options.beforeSure(done, { options, index });
|
||||||
} else {
|
} else {
|
||||||
@ -172,6 +186,7 @@ function handleClose(
|
|||||||
<el-button
|
<el-button
|
||||||
v-else
|
v-else
|
||||||
v-bind="btn"
|
v-bind="btn"
|
||||||
|
:loading="key === 1 && sureBtnMap[index]?.loading"
|
||||||
@click="
|
@click="
|
||||||
btn.btnClick({
|
btn.btnClick({
|
||||||
dialog: { options, index },
|
dialog: { options, index },
|
||||||
|
@ -162,6 +162,8 @@ interface DialogOptions extends DialogProps {
|
|||||||
hideFooter?: boolean;
|
hideFooter?: boolean;
|
||||||
/** 确认按钮的 `Popconfirm` 气泡确认框相关配置 */
|
/** 确认按钮的 `Popconfirm` 气泡确认框相关配置 */
|
||||||
popconfirm?: Popconfirm;
|
popconfirm?: Popconfirm;
|
||||||
|
/** 点击确认按钮后是否开启 `loading` 加载动画 */
|
||||||
|
sureBtnLoading?: boolean;
|
||||||
/**
|
/**
|
||||||
* @description 自定义对话框标题的内容渲染器
|
* @description 自定义对话框标题的内容渲染器
|
||||||
* @see {@link https://element-plus.org/zh-CN/component/dialog.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8}
|
* @see {@link https://element-plus.org/zh-CN/component/dialog.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8}
|
||||||
|
@ -18,6 +18,8 @@ import {
|
|||||||
getKeyList
|
getKeyList
|
||||||
} from "@pureadmin/utils";
|
} from "@pureadmin/utils";
|
||||||
|
|
||||||
|
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||||
|
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||||
@ -57,6 +59,7 @@ export default defineComponent({
|
|||||||
const size = ref("default");
|
const size = ref("default");
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const checkAll = ref(true);
|
const checkAll = ref(true);
|
||||||
|
const isFullscreen = ref(false);
|
||||||
const isIndeterminate = ref(false);
|
const isIndeterminate = ref(false);
|
||||||
const instance = getCurrentInstance()!;
|
const instance = getCurrentInstance()!;
|
||||||
const isExpandAll = ref(props.isExpandAll);
|
const isExpandAll = ref(props.isExpandAll);
|
||||||
@ -244,7 +247,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<>
|
<>
|
||||||
<div {...attrs} class="w-[99/100] mt-2 px-2 pb-2 bg-bg_color">
|
<div
|
||||||
|
{...attrs}
|
||||||
|
class={[
|
||||||
|
"w-[99/100]",
|
||||||
|
"px-2",
|
||||||
|
"pb-2",
|
||||||
|
"bg-bg_color",
|
||||||
|
isFullscreen.value
|
||||||
|
? ["!w-full", "!h-full", "z-[2002]", "fixed", "inset-0"]
|
||||||
|
: "mt-2"
|
||||||
|
]}
|
||||||
|
>
|
||||||
<div class="flex justify-between w-full h-[60px] p-4">
|
<div class="flex justify-between w-full h-[60px] p-4">
|
||||||
{slots?.title ? (
|
{slots?.title ? (
|
||||||
slots.title()
|
slots.title()
|
||||||
@ -358,6 +372,14 @@ export default defineComponent({
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
<el-divider direction="vertical" />
|
||||||
|
|
||||||
|
<iconifyIconOffline
|
||||||
|
class={["w-[16px]", iconClass.value]}
|
||||||
|
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||||
|
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||||
|
onClick={() => (isFullscreen.value = !isFullscreen.value)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{slots.default({
|
{slots.default({
|
||||||
|
@ -12,6 +12,8 @@ import {
|
|||||||
getCurrentInstance
|
getCurrentInstance
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
|
||||||
|
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||||
|
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||||
@ -55,6 +57,7 @@ export default defineComponent({
|
|||||||
const size = ref("small");
|
const size = ref("small");
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const checkAll = ref(true);
|
const checkAll = ref(true);
|
||||||
|
const isFullscreen = ref(false);
|
||||||
const isIndeterminate = ref(false);
|
const isIndeterminate = ref(false);
|
||||||
const instance = getCurrentInstance()!;
|
const instance = getCurrentInstance()!;
|
||||||
const isExpandAll = ref(props.isExpandAll);
|
const isExpandAll = ref(props.isExpandAll);
|
||||||
@ -237,7 +240,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<>
|
<>
|
||||||
<div {...attrs} class="w-[99/100] mt-2 px-2 pb-2 bg-bg_color">
|
<div
|
||||||
|
{...attrs}
|
||||||
|
class={[
|
||||||
|
"w-[99/100]",
|
||||||
|
"px-2",
|
||||||
|
"pb-2",
|
||||||
|
"bg-bg_color",
|
||||||
|
isFullscreen.value
|
||||||
|
? ["!w-full", "!h-full", "z-[2002]", "fixed", "inset-0"]
|
||||||
|
: "mt-2"
|
||||||
|
]}
|
||||||
|
>
|
||||||
<div class="flex justify-between w-full h-[60px] p-4">
|
<div class="flex justify-between w-full h-[60px] p-4">
|
||||||
{slots?.title ? (
|
{slots?.title ? (
|
||||||
slots.title()
|
slots.title()
|
||||||
@ -349,6 +363,14 @@ export default defineComponent({
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
<el-divider direction="vertical" />
|
||||||
|
|
||||||
|
<iconifyIconOffline
|
||||||
|
class={["w-[16px]", iconClass.value]}
|
||||||
|
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||||
|
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||||
|
onClick={() => (isFullscreen.value = !isFullscreen.value)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{slots.default({
|
{slots.default({
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isAllEmpty } from "@pureadmin/utils";
|
import { emitter } from "@/utils/mitt";
|
||||||
import { ref, nextTick, computed } from "vue";
|
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import LaySearch from "../lay-search/index.vue";
|
import LaySearch from "../lay-search/index.vue";
|
||||||
import LayNotice from "../lay-notice/index.vue";
|
import LayNotice from "../lay-notice/index.vue";
|
||||||
|
import { responsiveStorageNameSpace } from "@/config";
|
||||||
|
import { ref, nextTick, computed, onMounted } from "vue";
|
||||||
|
import { storageLocal, isAllEmpty } from "@pureadmin/utils";
|
||||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
import LaySidebarItem from "../lay-sidebar/components/SidebarItem.vue";
|
import LaySidebarItem from "../lay-sidebar/components/SidebarItem.vue";
|
||||||
@ -16,6 +18,11 @@ import Setting from "@iconify-icons/ri/settings-3-line";
|
|||||||
import Check from "@iconify-icons/ep/check";
|
import Check from "@iconify-icons/ep/check";
|
||||||
|
|
||||||
const menuRef = ref();
|
const menuRef = ref();
|
||||||
|
const showLogo = ref(
|
||||||
|
storageLocal().getItem<StorageConfigs>(
|
||||||
|
`${responsiveStorageNameSpace()}configure`
|
||||||
|
)?.showLogo ?? true
|
||||||
|
);
|
||||||
|
|
||||||
const { t, route, locale, translationCh, translationEn } =
|
const { t, route, locale, translationCh, translationEn } =
|
||||||
useTranslationLang(menuRef);
|
useTranslationLang(menuRef);
|
||||||
@ -40,6 +47,12 @@ const defaultActive = computed(() =>
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
menuRef.value?.handleResize();
|
menuRef.value?.handleResize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
emitter.on("logoChange", key => {
|
||||||
|
showLogo.value = key;
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -47,7 +60,7 @@ nextTick(() => {
|
|||||||
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
|
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
|
||||||
class="horizontal-header"
|
class="horizontal-header"
|
||||||
>
|
>
|
||||||
<div class="horizontal-header-left" @click="backTopMenu">
|
<div v-if="showLogo" class="horizontal-header-left" @click="backTopMenu">
|
||||||
<img :src="getLogo()" alt="logo" />
|
<img :src="getLogo()" alt="logo" />
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,6 +37,7 @@ const {
|
|||||||
buttonLeft,
|
buttonLeft,
|
||||||
showModel,
|
showModel,
|
||||||
translateX,
|
translateX,
|
||||||
|
isFixedTag,
|
||||||
pureSetting,
|
pureSetting,
|
||||||
activeIndex,
|
activeIndex,
|
||||||
getTabStyle,
|
getTabStyle,
|
||||||
@ -578,7 +579,7 @@ onBeforeUnmount(() => {
|
|||||||
'scroll-item is-closable',
|
'scroll-item is-closable',
|
||||||
linkIsActive(item),
|
linkIsActive(item),
|
||||||
showModel === 'chrome' && 'chrome-item',
|
showModel === 'chrome' && 'chrome-item',
|
||||||
!isAllEmpty(item?.meta?.fixedTag) && 'fixed-tag'
|
isFixedTag(item) && 'fixed-tag'
|
||||||
]"
|
]"
|
||||||
@contextmenu.prevent="openMenu(item, $event)"
|
@contextmenu.prevent="openMenu(item, $event)"
|
||||||
@mouseenter.prevent="onMouseenter(index)"
|
@mouseenter.prevent="onMouseenter(index)"
|
||||||
@ -593,10 +594,10 @@ onBeforeUnmount(() => {
|
|||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
isAllEmpty(item?.meta?.fixedTag)
|
isFixedTag(item)
|
||||||
? iconIsActive(item, index) ||
|
? false
|
||||||
|
: iconIsActive(item, index) ||
|
||||||
(index === activeIndex && index !== 0)
|
(index === activeIndex && index !== 0)
|
||||||
: false
|
|
||||||
"
|
"
|
||||||
class="el-icon-close"
|
class="el-icon-close"
|
||||||
@click.stop="deleteMenu(item)"
|
@click.stop="deleteMenu(item)"
|
||||||
@ -617,7 +618,7 @@ onBeforeUnmount(() => {
|
|||||||
{{ transformI18n(item.meta.title) }}
|
{{ transformI18n(item.meta.title) }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="isAllEmpty(item?.meta?.fixedTag) ? index !== 0 : false"
|
v-if="isFixedTag(item) ? false : index !== 0"
|
||||||
class="chrome-close-btn"
|
class="chrome-close-btn"
|
||||||
@click.stop="deleteMenu(item)"
|
@click.stop="deleteMenu(item)"
|
||||||
>
|
>
|
||||||
|
@ -125,6 +125,12 @@ export function useTags() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isFixedTag = computed(() => {
|
||||||
|
return item => {
|
||||||
|
return isBoolean(item?.meta?.fixedTag) && item?.meta?.fixedTag === true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const iconIsActive = computed(() => {
|
const iconIsActive = computed(() => {
|
||||||
return (item, index) => {
|
return (item, index) => {
|
||||||
if (index === 0) return;
|
if (index === 0) return;
|
||||||
@ -221,6 +227,7 @@ export function useTags() {
|
|||||||
buttonTop,
|
buttonTop,
|
||||||
buttonLeft,
|
buttonLeft,
|
||||||
translateX,
|
translateX,
|
||||||
|
isFixedTag,
|
||||||
pureSetting,
|
pureSetting,
|
||||||
activeIndex,
|
activeIndex,
|
||||||
getTabStyle,
|
getTabStyle,
|
||||||
|
@ -224,7 +224,7 @@ const LayHeader = defineComponent({
|
|||||||
.app-mask {
|
.app-mask {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 999;
|
z-index: 2001;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #000;
|
background: #000;
|
||||||
|
@ -572,6 +572,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-container {
|
.sidebar-container {
|
||||||
|
z-index: 2001;
|
||||||
width: $sideBarWidth;
|
width: $sideBarWidth;
|
||||||
transition: transform var(--pure-transition-duration);
|
transition: transform var(--pure-transition-duration);
|
||||||
}
|
}
|
||||||
|
@ -450,6 +450,17 @@ function onBeforeSureClick() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSureBtnLoading() {
|
||||||
|
addDialog({
|
||||||
|
sureBtnLoading: true,
|
||||||
|
title: "点击底部确定按钮可开启按钮动画",
|
||||||
|
contentRenderer: () => <p>弹框内容-点击底部确定按钮可开启按钮动画</p>,
|
||||||
|
beforeSure: done => {
|
||||||
|
setTimeout(() => done(), 800);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -534,6 +545,9 @@ function onBeforeSureClick() {
|
|||||||
<el-button @click="onBeforeSureClick">
|
<el-button @click="onBeforeSureClick">
|
||||||
点击底部确定按钮的回调(会暂停弹框的关闭,经常用于新增、修改弹框内容后调用接口)
|
点击底部确定按钮的回调(会暂停弹框的关闭,经常用于新增、修改弹框内容后调用接口)
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button @click="onSureBtnLoading">
|
||||||
|
点击底部确定按钮可开启按钮动画
|
||||||
|
</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -99,7 +99,7 @@ watch(size, val =>
|
|||||||
<el-button
|
<el-button
|
||||||
v-for="(button, index) in buttonList"
|
v-for="(button, index) in buttonList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:type="button.type"
|
:type="button.type as any"
|
||||||
:size="dynamicSize"
|
:size="dynamicSize"
|
||||||
:disabled="size === 'disabled'"
|
:disabled="size === 'disabled'"
|
||||||
:plain="baseRadio === 'plain'"
|
:plain="baseRadio === 'plain'"
|
||||||
|
@ -97,7 +97,11 @@ const immediateDebounce: any = debounce(
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEventListener(document, "keypress", ({ code }) => {
|
useEventListener(document, "keypress", ({ code }) => {
|
||||||
if (code === "Enter" && !disabled.value && !loading.value)
|
if (
|
||||||
|
["Enter", "NumpadEnter"].includes(code) &&
|
||||||
|
!disabled.value &&
|
||||||
|
!loading.value
|
||||||
|
)
|
||||||
immediateDebounce(ruleFormRef.value);
|
immediateDebounce(ruleFormRef.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="isShow"
|
v-if="isShow"
|
||||||
class="!min-w-[calc(100vw-60vw-268px)] mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto"
|
class="!min-w-[calc(100vw-60vw-268px)] w-full mt-2 px-2 pb-2 bg-bg_color ml-2 overflow-auto"
|
||||||
>
|
>
|
||||||
<div class="flex justify-between w-full px-3 pt-5 pb-4">
|
<div class="flex justify-between w-full px-3 pt-5 pb-4">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user