feat: 更新依赖包版本
This commit is contained in:
32
package.json
32
package.json
@@ -11,14 +11,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.3.7",
|
||||
"@ant-design/pro-components": "^2.7.9",
|
||||
"@ant-design/pro-components": "^2.7.10",
|
||||
"@ant-design/use-emotion-css": "^1.0.4",
|
||||
"@babel/preset-env": "^7.24.6",
|
||||
"@babel/preset-env": "^7.24.7",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/react-calendar-heatmap": "^1.6.7",
|
||||
"@vitejs/plugin-legacy": "^5.4.0",
|
||||
"@vitejs/plugin-legacy": "^5.4.1",
|
||||
"aieditor": "^1.0.12",
|
||||
"antd": "^5.17.4",
|
||||
"antd": "^5.19.1",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"axios": "^1.7.2",
|
||||
"core-js": "^3.37.1",
|
||||
@@ -26,7 +26,7 @@
|
||||
"echarts-for-react": "^3.0.2",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"localforage": "^1.10.0",
|
||||
"mobx": "^6.12.3",
|
||||
"mobx": "^6.13.0",
|
||||
"mobx-persist-store": "^1.1.5",
|
||||
"mobx-react": "^9.1.1",
|
||||
"react": "^18.3.1",
|
||||
@@ -34,7 +34,7 @@
|
||||
"react-dom": "^18.3.1",
|
||||
"react-infinite-scroll-component": "^6.1.0",
|
||||
"react-rotate-captcha": "^1.0.26",
|
||||
"react-router-dom": "^6.23.1",
|
||||
"react-router-dom": "^6.24.1",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"timer-manager-lib": "^1.0.2",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
@@ -42,28 +42,28 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@types/node": "^20.12.12",
|
||||
"@types/node": "^20.14.10",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
||||
"@typescript-eslint/parser": "^7.11.0",
|
||||
"@vitejs/plugin-react": "^4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
||||
"@typescript-eslint/parser": "^7.16.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-react": "^7.34.2",
|
||||
"eslint-plugin-react": "^7.34.3",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-react-refresh": "^0.4.7",
|
||||
"eslint-plugin-react-refresh": "^0.4.8",
|
||||
"less": "^4.2.0",
|
||||
"postcss-less": "^6.0.0",
|
||||
"postcss-preset-env": "^9.5.14",
|
||||
"prettier": "^3.2.5",
|
||||
"postcss-preset-env": "^9.6.0",
|
||||
"prettier": "^3.3.2",
|
||||
"stylelint": "^16.6.1",
|
||||
"stylelint-config-recess-order": "^5.0.1",
|
||||
"stylelint-config-standard-less": "^3.0.1",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.12",
|
||||
"typescript": "^5.5.3",
|
||||
"vite": "^5.3.3",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-svgr": "^4.2.0"
|
||||
}
|
||||
|
2588
pnpm-lock.yaml
generated
2588
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -120,7 +120,7 @@ const File: FunctionComponent = () => {
|
||||
flexDirection: "row",
|
||||
}}
|
||||
size={"small"}>
|
||||
<Avatar src={ali} size={"small"} />{" "}
|
||||
<Avatar src={ali} size={"small"} />
|
||||
<span style={{ marginLeft: "10px", fontWeight: "bolder" }}>
|
||||
阿里云OSS
|
||||
</span>
|
||||
|
@@ -1,12 +1,10 @@
|
||||
/** @format */
|
||||
|
||||
import { useUserStore } from "./modules/user.ts";
|
||||
import { useFileStore } from "@/store/modules/file.ts";
|
||||
import { UseStorageSettingStore } from "@/store/modules/storage_setting.ts";
|
||||
|
||||
/** 将每个Store实例化 */
|
||||
export const RootStore = {
|
||||
user: new useUserStore(),
|
||||
file: new useFileStore(),
|
||||
storage: new UseStorageSettingStore(),
|
||||
};
|
||||
/** @format */
|
||||
|
||||
import { useUserStore } from "./modules/user.ts";
|
||||
import { useFileStore } from "@/store/modules/file.ts";
|
||||
|
||||
/** 将每个Store实例化 */
|
||||
export const RootStore = {
|
||||
user: new useUserStore(),
|
||||
file: new useFileStore(),
|
||||
};
|
||||
|
@@ -1,50 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import { action, makeObservable, observable } from "mobx";
|
||||
import { isHydrated, makePersistable } from "mobx-persist-store";
|
||||
import { handleLocalforage } from "@/utils/localforage";
|
||||
|
||||
export class UseStorageSettingStore {
|
||||
selectValue: string = "";
|
||||
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
selectValue: observable,
|
||||
setSelectValue: action,
|
||||
getSelectValue: action,
|
||||
isHydrated: action,
|
||||
});
|
||||
makePersistable(
|
||||
this,
|
||||
{
|
||||
// 在构造函数内使用 makePersistable
|
||||
name: "storage_setting", // 保存的name,用于在storage中的名称标识,只要不和storage中其他名称重复就可以
|
||||
properties: ["selectValue"], // 要保存的字段,这些字段会被保存在name对应的storage中,注意:不写在这里面的字段将不会被保存,刷新页面也将丢失:get字段例外。get数据会在数据返回后再自动计算
|
||||
storage: handleLocalforage, // 保存的位置:可以是localStorage,sessionstorage
|
||||
removeOnExpiration: true, //如果 expireIn 具有值且已过期,则在调用 getItem 时将自动删除存储中的数据。默认值为 true。
|
||||
stringify: false, //如果为 true,则数据在传递给 setItem 之前将是 JSON.stringify。默认值为 true。
|
||||
expireIn: 2592000000, // 一个以毫秒为单位的值,用于确定 getItem 何时不应检索存储中的数据。默认情况下永不过期。
|
||||
debugMode: false, // 如果为 true,将为多个 mobx-persist-store 项调用 console.info。默认值为 false。
|
||||
},
|
||||
{
|
||||
delay: 0, // 允许您设置一个 delay 选项来限制 write 函数的调用次数。默认情况下没有延迟。
|
||||
fireImmediately: false, // 确定是应立即保留存储数据,还是等到存储中的属性发生更改。 false 默认情况下。
|
||||
},
|
||||
).then(
|
||||
action(() => {
|
||||
// persist 完成的回调,在这里可以执行一些拿到数据后需要执行的操作,如果在页面上要判断是否完成persist,使用 isHydrated
|
||||
// console.log(persistStore)
|
||||
}),
|
||||
);
|
||||
}
|
||||
getSelectValue() {
|
||||
return this.selectValue ? this.selectValue : null;
|
||||
}
|
||||
setSelectValue(value: any) {
|
||||
this.selectValue = value;
|
||||
}
|
||||
|
||||
isHydrated() {
|
||||
return isHydrated(this);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user