diff --git a/package.json b/package.json index c565f22..45949d9 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "prepare": "husky install" }, "devDependencies": { + "@honkhonk/vite-plugin-svgr": "^1.1.0", "@types/echarts": "^4.9.13", "@types/lodash": "^4.14.178", "@types/mockjs": "^1.0.6", diff --git a/readme.md b/readme.md index aa68dbd..65621f2 100644 --- a/readme.md +++ b/readme.md @@ -2,15 +2,15 @@
- +
@@ -30,7 +30,6 @@ TDesign React Starter 是一个基于 tdesign-react,使用 `React`、`Vite2` - 多种空间布局 - 内置 Mock 数据方案 - ### 开发 ```bash @@ -84,12 +83,11 @@ npm run lint:fix - [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) - ### 兼容性 | [](http://godban.github.io/browsers-support-badges/) IE / Edge | [](http://godban.github.io/browsers-support-badges/)Firefox | [](http://godban.github.io/browsers-support-badges/)Chrome | [](http://godban.github.io/browsers-support-badges/)Safari | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 | +| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 | ### License diff --git a/src/assets/svg/assets-product-1.svg b/src/assets/svg/assets-product-1.svg new file mode 100644 index 0000000..29e97f0 --- /dev/null +++ b/src/assets/svg/assets-product-1.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/assets/svg/assets-product-2.svg b/src/assets/svg/assets-product-2.svg new file mode 100644 index 0000000..827c8bf --- /dev/null +++ b/src/assets/svg/assets-product-2.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/assets/svg/assets-product-3.svg b/src/assets/svg/assets-product-3.svg new file mode 100644 index 0000000..a3d461b --- /dev/null +++ b/src/assets/svg/assets-product-3.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/assets/svg/assets-product-4.svg b/src/assets/svg/assets-product-4.svg new file mode 100644 index 0000000..7ac1abc --- /dev/null +++ b/src/assets/svg/assets-product-4.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/src/components/ErrorPage/index.module.less b/src/components/ErrorPage/index.module.less index 0762cbe..75937c8 100644 --- a/src/components/ErrorPage/index.module.less +++ b/src/components/ErrorPage/index.module.less @@ -6,7 +6,7 @@ height: 75vh; padding: 24px; min-height: 400px; - + color: var(--td-brand-color); img { width: 200px; height: 140px; diff --git a/src/components/ErrorPage/index.tsx b/src/components/ErrorPage/index.tsx index 733cdad..7a71403 100644 --- a/src/components/ErrorPage/index.tsx +++ b/src/components/ErrorPage/index.tsx @@ -1,9 +1,9 @@ import React, { memo } from 'react'; import { Button } from 'tdesign-react'; -import Light403Icon from 'assets/svg/assets-result-403.svg'; -import Light404Icon from 'assets/svg/assets-result-404.svg'; -import Light500Icon from 'assets/svg/assets-result-500.svg'; +import Light403Icon from 'assets/svg/assets-result-403.svg?component'; +import Light404Icon from 'assets/svg/assets-result-404.svg?component'; +import Light500Icon from 'assets/svg/assets-result-500.svg?component'; import style from './index.module.less'; enum ECode { @@ -22,17 +22,17 @@ const errorInfo = { [ECode.forbidden]: { title: '403 Forbidden', desc: '抱歉,您无权限访问此页面', - icon: Light403Icon, + icon: