Browse Source

chore: 同步完整版代码

i18n
xiaoxian521 8 months ago
parent
commit
b20157fa2e
  1. 4
      package.json
  2. 46
      pnpm-lock.yaml
  3. 4
      src/layout/components/setting/index.vue
  4. 3
      src/layout/index.vue
  5. 4
      src/plugins/elementPlus.ts
  6. 19
      src/store/modules/app.ts
  7. 1
      src/store/modules/types.ts
  8. 2
      types/global-components.d.ts

4
package.json

@ -57,7 +57,7 @@
"axios": "^1.6.8",
"dayjs": "^1.11.10",
"echarts": "^5.5.0",
"element-plus": "^2.6.1",
"element-plus": "^2.6.2",
"js-cookie": "^3.0.5",
"localforage": "^1.10.0",
"mitt": "^3.0.1",
@ -123,7 +123,7 @@
"svgo": "^3.2.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.4.3",
"vite": "^5.2.2",
"vite": "^5.2.3",
"vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.1.1",

46
pnpm-lock.yaml

@ -7,10 +7,10 @@ settings:
dependencies:
'@pureadmin/descriptions':
specifier: ^1.2.1
version: 1.2.1([email protected])([email protected].1)([email protected])
version: 1.2.1([email protected])([email protected].2)([email protected])
'@pureadmin/table':
specifier: ^3.1.2
version: 3.1.2([email protected].1)([email protected])
version: 3.1.2([email protected].2)([email protected])
'@pureadmin/utils':
specifier: ^2.4.7
version: 2.4.7([email protected])([email protected])
@ -33,8 +33,8 @@ dependencies:
specifier: ^5.5.0
version: 5.5.0
element-plus:
specifier: ^2.6.1
version: 2.6.1([email protected])
specifier: ^2.6.2
version: 2.6.2([email protected])
js-cookie:
specifier: ^3.0.5
version: 3.0.5
@ -138,10 +138,10 @@ devDependencies:
version: 7.3.1([email protected])([email protected])
'@vitejs/plugin-vue':
specifier: ^5.0.4
version: 5.0.4([email protected].2)([email protected])
version: 5.0.4([email protected].3)([email protected])
'@vitejs/plugin-vue-jsx':
specifier: ^3.1.0
version: 3.1.0([email protected].2)([email protected])
version: 3.1.0([email protected].3)([email protected])
autoprefixer:
specifier: ^10.4.19
version: 10.4.19([email protected])
@ -227,14 +227,14 @@ devDependencies:
specifier: ^5.4.3
version: 5.4.3
vite:
specifier: ^5.2.2
version: 5.2.2(@types/[email protected])([email protected])
specifier: ^5.2.3
version: 5.2.3(@types/[email protected])([email protected])
vite-plugin-cdn-import:
specifier: ^0.3.5
version: 0.3.5([email protected])
vite-plugin-compression:
specifier: ^0.5.1
version: 0.5.1([email protected].2)
version: 0.5.1([email protected].3)
vite-plugin-fake-server:
specifier: ^2.1.1
version: 2.1.1
@ -1486,26 +1486,26 @@ packages:
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
dev: false
/@pureadmin/[email protected]([email protected])([email protected].1)([email protected]):
/@pureadmin/[email protected]([email protected])([email protected].2)([email protected]):
resolution: {integrity: sha512-7jDJuqz8xnhcmwXdWQnBzOYeX2WK27TRFaVgs9AdiRr+DnKb9W+krHByJwQtxo5lg4qyRh4/IWQGEMfhC2ljeQ==}
peerDependencies:
element-plus: ^2.0.0
dependencies:
'@element-plus/icons-vue': 2.3.1([email protected])
'@pureadmin/utils': 2.4.7([email protected])([email protected])
element-plus: 2.6.1([email protected])
element-plus: 2.6.2([email protected])
vue: 3.4.21([email protected])
transitivePeerDependencies:
- echarts
- typescript
dev: false
/@pureadmin/[email protected]([email protected].1)([email protected]):
/@pureadmin/[email protected]([email protected].2)([email protected]):
resolution: {integrity: sha512-6GrZCjBDFn/kKjn/HGkx0BH9RiArg5QktPN2u5PNpzHBhZZXWMoFcKCkysWLfDdWfpCowQWgnOpr0KjTPEgT0A==}
peerDependencies:
element-plus: ^2.0.0
dependencies:
element-plus: 2.6.1([email protected])
element-plus: 2.6.2([email protected])
vue: 3.4.21([email protected])
transitivePeerDependencies:
- typescript
@ -1884,7 +1884,7 @@ packages:
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true
/@vitejs/[email protected]([email protected].2)([email protected]):
/@vitejs/[email protected]([email protected].3)([email protected]):
resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -1894,20 +1894,20 @@ packages:
'@babel/core': 7.24.3
'@babel/plugin-transform-typescript': 7.24.1(@babel/[email protected])
'@vue/babel-plugin-jsx': 1.2.2(@babel/[email protected])
vite: 5.2.2(@types/[email protected])([email protected])
vite: 5.2.3(@types/[email protected])([email protected])
vue: 3.4.21([email protected])
transitivePeerDependencies:
- supports-color
dev: true
/@vitejs/[email protected]([email protected].2)([email protected]):
/@vitejs/[email protected]([email protected].3)([email protected]):
resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
vite: ^5.0.0
vue: ^3.2.25
dependencies:
vite: 5.2.2(@types/[email protected])([email protected])
vite: 5.2.3(@types/[email protected])([email protected])
vue: 3.4.21([email protected])
dev: true
@ -3054,8 +3054,8 @@ packages:
/[email protected]:
resolution: {integrity: sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==}
/[email protected].1([email protected]):
resolution: {integrity: sha512-6VRpLjwtIVdtUuITJPPKtpOH1NM6nuAkRE3q5O4Lrx0N1bYMhTkiqb2Jy7zfQuDPbOIkkF2OABTzegpNnzgsnQ==}
/[email protected].2([email protected]):
resolution: {integrity: sha512-WFMv1v83l437Xu+GeeM+ytxd9VUQpR4418BowvTVIPYItsoj6yK0ITIuSv19iCesF405FbAOaCIHXhJch0ilFA==}
peerDependencies:
vue: ^3.2.0
dependencies:
@ -6435,7 +6435,7 @@ packages:
- rollup
dev: true
/[email protected]([email protected].2):
/[email protected]([email protected].3):
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
peerDependencies:
vite: '>=2.0.0'
@ -6443,7 +6443,7 @@ packages:
chalk: 4.1.2
debug: 4.3.4
fs-extra: 10.1.0
vite: 5.2.2(@types/[email protected])([email protected])
vite: 5.2.3(@types/[email protected])([email protected])
transitivePeerDependencies:
- supports-color
dev: true
@ -6475,8 +6475,8 @@ packages:
vue: 3.4.21([email protected])
dev: true
/[email protected].2(@types/[email protected])([email protected]):
resolution: {integrity: sha512-FWZbz0oSdLq5snUI0b6sULbz58iXFXdvkZfZWR/F0ZJuKTSPO7v72QPXt6KqYeMFb0yytNp6kZosxJ96Nr/wDQ==}
/[email protected].3(@types/[email protected])([email protected]):
resolution: {integrity: sha512-+i1oagbvkVIhEy9TnEV+fgXsng13nZM90JQbrcPrf6DvW2mXARlz+DK7DLiDP+qeKoD1FCVx/1SpFL1CLq9Mhw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:

4
src/layout/components/setting/index.vue

@ -387,7 +387,7 @@ onUnmounted(() => removeMatchMedia);
</li>
</ul>
<span v-if="device !== 'mobile'">
<span v-if="useAppStoreHook().getViewportWidth > 1280">
<p :class="['mt-5', pClass]">页宽</p>
<Segmented
class="mb-2 select-none"
@ -406,7 +406,7 @@ onUnmounted(() => removeMatchMedia);
<button
v-else
v-ripple="{ class: 'text-gray-300' }"
class="bg-transparent flex-c w-full h-20 rounded-md border border-gray-100"
class="bg-transparent flex-c w-full h-20 rounded-md border border-[var(--pure-border-color)]"
@click="setStretch(!settings.stretch)"
>
<div

3
src/layout/index.vue

@ -89,7 +89,8 @@ let isAutoCloseSidebar = true;
useResizeObserver(appWrapperRef, entries => {
if (isMobile) return;
const entry = entries[0];
const [{ inlineSize: width }] = entry.borderBoxSize;
const [{ inlineSize: width, blockSize: height }] = entry.borderBoxSize;
useAppStoreHook().setViewportSize({ width, height });
width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout);
/** width app-wrapper
* 0 < width <= 760 隐藏侧边栏

4
src/plugins/elementPlus.ts

@ -10,6 +10,8 @@ import {
ElAutocomplete,
ElAutoResizer,
ElAvatar,
ElAnchor,
ElAnchorLink,
ElBacktop,
ElBadge,
ElBreadcrumb,
@ -123,6 +125,8 @@ const components = [
ElAutocomplete,
ElAutoResizer,
ElAvatar,
ElAnchor,
ElAnchorLink,
ElBacktop,
ElBadge,
ElBreadcrumb,

19
src/store/modules/app.ts

@ -20,7 +20,12 @@ export const useAppStore = defineStore({
storageLocal().getItem<StorageConfigs>(
`${responsiveStorageNameSpace()}layout`
)?.layout ?? getConfig().Layout,
device: deviceDetection() ? "mobile" : "desktop"
device: deviceDetection() ? "mobile" : "desktop",
// 浏览器窗口的可视区域大小
viewportSize: {
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight
}
}),
getters: {
getSidebarStatus(state) {
@ -28,6 +33,12 @@ export const useAppStore = defineStore({
},
getDevice(state) {
return state.device;
},
getViewportWidth(state) {
return state.viewportSize.width;
},
getViewportHeight(state) {
return state.viewportSize.height;
}
},
actions: {
@ -59,6 +70,12 @@ export const useAppStore = defineStore({
},
setLayout(layout) {
this.layout = layout;
},
setViewportSize(size) {
this.viewportSize = size;
},
setSortSwap(val) {
this.sortSwap = val;
}
}
});

1
src/store/modules/types.ts

@ -19,6 +19,7 @@ export type appType = {
};
layout: string;
device: string;
viewportSize: { width: number; height: number };
};
export type multiType = {

2
types/global-components.d.ts

@ -21,6 +21,8 @@ declare module "vue" {
ElAside: (typeof import("element-plus"))["ElAside"];
ElAutocomplete: (typeof import("element-plus"))["ElAutocomplete"];
ElAvatar: (typeof import("element-plus"))["ElAvatar"];
ElAnchor: (typeof import("element-plus"))["ElAnchor"];
ElAnchorLink: (typeof import("element-plus"))["ElAnchorLink"];
ElBacktop: (typeof import("element-plus"))["ElBacktop"];
ElBadge: (typeof import("element-plus"))["ElBadge"];
ElBreadcrumb: (typeof import("element-plus"))["ElBreadcrumb"];

Loading…
Cancel
Save