fix: cannot read properties of undefined (reading 'offsetWidthi')
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
"@ant-design/pro-components": "^2.7.0",
|
"@ant-design/pro-components": "^2.7.0",
|
||||||
"@ant-design/use-emotion-css": "^1.0.4",
|
"@ant-design/use-emotion-css": "^1.0.4",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
|
"@vitejs/plugin-legacy": "^5.3.2",
|
||||||
"antd": "^5.16.1",
|
"antd": "^5.16.1",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
|
1184
pnpm-lock.yaml
generated
1184
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
const FooterComponent: React.FC = () => {
|
const FooterComponent: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{ textAlign: 'center', color: 'black' }}>
|
<div
|
||||||
|
style={{
|
||||||
|
textAlign: 'center',
|
||||||
|
color: 'black',
|
||||||
|
bottom: 0,
|
||||||
|
position: 'absolute',
|
||||||
|
width: '100%',
|
||||||
|
}}>
|
||||||
schisandra ©{new Date().getFullYear()} Created by schisandra
|
schisandra ©{new Date().getFullYear()} Created by schisandra
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@@ -17,7 +17,7 @@ const HomeIndex: React.FC = () => {
|
|||||||
r: -8,
|
r: -8,
|
||||||
h: 160,
|
h: 160,
|
||||||
w: (el: any) => {
|
w: (el: any) => {
|
||||||
return Math.max(320, el.parentNode.offsetWidthi * 0.55)
|
return Math.max(320, el.parentNode.offsetWidth * 0.55)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ const HomeIndex: React.FC = () => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
x: () => {
|
x: () => {
|
||||||
return Math.max(260, window.innerWidth * 0.45) * 1
|
return Math.max(260, window.innerWidth * 0.45)
|
||||||
},
|
},
|
||||||
y: -30,
|
y: -30,
|
||||||
r: -5,
|
r: -5,
|
||||||
|
@@ -43,8 +43,8 @@ h1,p{
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
max-width: 99vw;
|
max-width: 98vw;
|
||||||
max-height: 93vh;
|
max-height: 92vh;
|
||||||
background: linear-gradient(180deg, #e0e9fd 0%, #e9ecf1 90%);
|
background: linear-gradient(180deg, #e0e9fd 0%, #e9ecf1 90%);
|
||||||
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.4);
|
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.4);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@@ -10,7 +10,7 @@ const router = createBrowserRouter(routeConfig)
|
|||||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<MobxProvider {...RootStore}>
|
<MobxProvider {...RootStore}>
|
||||||
<RouterProvider router={router} />
|
<RouterProvider router={router} />
|
||||||
</MobxProvider>
|
</MobxProvider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>,
|
||||||
)
|
)
|
||||||
|
@@ -7,13 +7,19 @@ import * as path from 'path'
|
|||||||
import imagemin from 'unplugin-imagemin/vite'
|
import imagemin from 'unplugin-imagemin/vite'
|
||||||
import viteCompression from 'vite-plugin-compression'
|
import viteCompression from 'vite-plugin-compression'
|
||||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||||
|
import legacy from '@vitejs/plugin-legacy'
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
//配置参数
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd())
|
const env = loadEnv(mode, process.cwd())
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
|
legacy({
|
||||||
|
targets: ['defaults', 'ie >= 11', 'chrome 52'],
|
||||||
|
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
|
||||||
|
}),
|
||||||
// 修改 icons 相关配置
|
// 修改 icons 相关配置
|
||||||
createSvgIconsPlugin({
|
createSvgIconsPlugin({
|
||||||
// 指定需要缓存的图标文件夹
|
// 指定需要缓存的图标文件夹
|
||||||
|
Reference in New Issue
Block a user