From 22446a5d662b04c69cad7ff4d71f69058e91158d Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Fri, 23 Aug 2024 14:11:28 +0800 Subject: [PATCH] 主题包更改、webpack添加@=src配置 --- gz-customerSystem/package.json | 1 + gz-customerSystem/craco.config.js | 24 ++++++++++++++---------- gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 3 +-- gz-customerSystem/src/components/Search/index.jsx | 2 +- gz-customerSystem/src/views/register/visit/index.jsx | 8 ++++---- gz-customerSystem/yarn.lock | 5 +++++ 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/gz-customerSystem/craco.config.js b/gz-customerSystem/craco.config.js index 13892fa..73c8f16 100644 --- a/gz-customerSystem/craco.config.js +++ b/gz-customerSystem/craco.config.js @@ -8,18 +8,22 @@ * @Description: less配置 */ const CracoLessPlugin = require('craco-less'); +const path = require('path'); module.exports = { - plugins: [ - { - plugin: CracoLessPlugin, - options: { - lessLoaderOptions: { - lessOptions: { - javascriptEnabled: true, - }, + plugins: [{ + plugin: CracoLessPlugin, + options: { + lessLoaderOptions: { + lessOptions: { + javascriptEnabled: true, }, }, }, - ], -}; + }, ], + webpack: { + alias: { + '@': path.resolve(__dirname, 'src'), + }, + }, +}; \ No newline at end of file diff --git a/gz-customerSystem/package.json b/gz-customerSystem/package.json index da96f23..92498ec 100644 --- a/gz-customerSystem/package.json +++ b/gz-customerSystem/package.json @@ -9,6 +9,7 @@ "@ant-design/plots": "^1.2.5", "@antv/g2": "^4.2.1", "@arco-design/web-react": "^2.63.1", + "@arco-themes/react-gzzz": "^0.0.2", "@craco/craco": "^6.4.3", "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^12.1.2", diff --git a/gz-customerSystem/src/components/Search/index.jsx b/gz-customerSystem/src/components/Search/index.jsx index 6bb2bfd..03d2eb6 100644 --- a/gz-customerSystem/src/components/Search/index.jsx +++ b/gz-customerSystem/src/components/Search/index.jsx @@ -11,7 +11,7 @@ import PropTypes from 'prop-types'; import { Form, Button, TreeSelect, } from 'antd'; import { Grid, Input, Select, DatePicker } from '@arco-design/web-react'; -import "@arco-design/web-react/dist/css/arco.css"; +import "@arco-themes/react-gzzz/css/arco.css"; import { DownOutlined } from '@ant-design/icons'; import * as $$ from '../../utils/utility'; import './index.less'; diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx index 8615c90..fb4bb25 100644 --- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx +++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import { Row, Col, Space, Tooltip, Button } from 'antd'; import { Form, Input, Radio, Select, DatePicker, Cascader, Modal, Upload, InputNumber } from '@arco-design/web-react'; -import "@arco-design/web-react/dist/css/arco.css"; +import '@arco-themes/react-gzzz/index.less'; import PersonCard from '../../../../components/personCard'; import * as $$ from '../../../../utils/utility'; import { @@ -13,7 +13,6 @@ } from '../../../../assets/images'; import { CheckOutlined, } from '@ant-design/icons'; -import "@arco-design/web-react/dist/css/arco.css"; import TableView from '../../../../components/TableView'; import '../../index.less'; import ApplyDialog from "./applyDialog"; diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx index 2521a76..1a001b1 100644 --- a/gz-customerSystem/src/views/register/visit/index.jsx +++ b/gz-customerSystem/src/views/register/visit/index.jsx @@ -8,10 +8,10 @@ */ import React, { useState, useEffect, useRef, Fragment } from "react"; -import NewPage from '../../../components/NewPage'; -import RegisterTab from '../../../components/registerTab'; -import * as $$ from '../../../utils/utility'; -import "@arco-design/web-react/dist/css/arco.css"; +import NewPage from '@/components/NewPage'; +import RegisterTab from '@/components/registerTab'; +import * as $$ from '@/utils/utility'; +import "@arco-themes/react-gzzz/css/arco.css"; import '../index.less'; import { Space } from 'antd'; import { Button } from '@arco-design/web-react'; diff --git a/gz-customerSystem/yarn.lock b/gz-customerSystem/yarn.lock index 9dffffa..6802eb0 100644 --- a/gz-customerSystem/yarn.lock +++ b/gz-customerSystem/yarn.lock @@ -868,6 +868,11 @@ "@babel/types" "^7.12.12" "@types/node" "^16.11.10" +"@arco-themes/react-gzzz@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@arco-themes/react-gzzz/-/react-gzzz-0.0.2.tgz#4a413958e662fff64c1e31b36ccf0484be0e2388" + integrity sha512-YQGlkswfowsuaodIevDPMx+UPpJW7Is6b3+xFKh49GDNCJf5sIz37bSiK5zxLsIl1pBj16PkUIXzm7Fq4AdHgw== + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.8.3": version "7.24.7" resolved "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.24.7.tgz" -- Gitblit v1.8.0