Commit 8a72c3a3 authored by 前端-许佳敏's avatar 前端-许佳敏

优化目录结构,调整样式全局引入

parent 717b0458
......@@ -5,6 +5,12 @@
- god页面模板, 依赖于[umi](https://umijs.org/), 更多配置可以查看
- god组件库[文档](http://10.0.0.22:8080/)
### 项目运行请先执行 scripts:build
可获取项目所需配置, 在/src/constants/cacheConfig.ts
### 全局引入的文件
- src/styles/theme.less 可使用其中的less变量
### scripts 所需依赖
- gulp 流程工具
- chalk 控制台样式控制工具
......
{"global":{"logo":"","countryList":[{"name":"简体中文-ZH","key":"cn","icon":""},{"name":"English-EN","key":"en","icon":""},{"name":"日本語-JP","key":"jp","icon":""},{"name":"한국어-KO","key":"ko","icon":""}]}}
{
"global": {
"logo": "",
"countryList": [
{
"name": "简体中文-ZH",
"key": "cn",
"icon": ""
},
{
"name": "English-EN",
"key": "en",
"icon": ""
},
{
"name": "日本語-JP",
"key": "jp",
"icon": ""
},
{
"name": "한국어-KO",
"key": "ko",
"icon": ""
}
]
}
}
\ No newline at end of file
......@@ -42,8 +42,12 @@ export default defineConfig({
cssLoader: {
localsConvention: 'camelCase', // 将style中的class由 .foo-body 转化为fooBody调用
},
cssModulesTypescriptLoader: {
mode: 'emit'
lessLoader: {
// 所有less文件都会引入的变量
modifyVars: {
// 或者可以通过 less 文件覆盖(文件路径为绝对路径)
'hack': `true; @import "~@/global/styles/theme.less";`
}
},
dynamicImport: {
loading: '@/components/Loading'
......
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'header': string;
'listCard': string;
}
export const cssExports: CssExports;
export default cssExports;
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'link': string;
}
export const cssExports: CssExports;
export default cssExports;
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'lingxi-business-content1024': string;
'lingxi-business-margin_content': string;
'lingxiBusinessContent1024': string;
'lingxiBusinessMarginContent': string;
}
export const cssExports: CssExports;
export default cssExports;
......@@ -6,7 +6,7 @@
* **********
*/
import SELF_CONFIG from '../../config/base.config.json'
import { RootObject } from '../../global'
import SELF_CONFIG from '../../../config/base.config.json'
import { RootObject } from '../../../global'
export const GlobalConfig: RootObject = SELF_CONFIG
@import '~@/styles/theme.less';
// antd default
h1, h2, h3, h4, h5, h6 {
......
......@@ -27,21 +27,4 @@ const UserHeader:React.FC<UserHeaderProps> = (props) => {
)
}
UserHeader.defaultProps = {
// 开发环境下的替代logo
logo: require('../../../mockStatic/logo.png'),
countryList: [
{
name: '中国',
key: 'China',
icon: require('../../../mockStatic/china.png')
},
{
name: '美国',
key: 'US',
icon: require('../../../mockStatic/us.png')
}
]
}
export default UserHeader
\ No newline at end of file
@import '~@/styles/theme.less';
.@{prefix}-margin_content {
width: 1190px;
......
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'fixed': string;
'lingxi-business-logo': string;
'lingxi-business-margin_content': string;
'lingxi-business-user-bg': string;
'lingxi-business-user-footer': string;
'lingxi-business-user-header': string;
'lingxi-business-user-layout': string;
'lingxiBusinessLogo': string;
'lingxiBusinessMarginContent': string;
'lingxiBusinessUserBg': string;
'lingxiBusinessUserFooter': string;
'lingxiBusinessUserHeader': string;
'lingxiBusinessUserLayout': string;
}
export const cssExports: CssExports;
export default cssExports;
@import '~@/global.less';
@import '~@/global/styles/global.less';
.login-item {
flex: 1;
......
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'agreement': string;
'btnCenter': string;
'checkTypes': string;
'default': string;
'form-box': string;
'formBefore': string;
'formBox': string;
'large': string;
'lingxi-business-content1024': string;
'lingxi-business-margin_content': string;
'lingxiBusinessContent1024': string;
'lingxiBusinessMarginContent': string;
'login-ctl': string;
'login-item': string;
'loginCtl': string;
'loginDesc': string;
'loginItem': string;
'loginMain': string;
'loginVerBtn': string;
'loginWrap': string;
'margin320': string;
'register': string;
'registerBox': string;
'stepWrap': string;
'thirdLogin': string;
}
export const cssExports: CssExports;
export default cssExports;
import React from 'react';
import globalStyles from '@/global.less';
import globalStyles from '@/global/styles/global.less';
import styles from './index.less'
import cx from 'classnames';
import { Row, Col, Form, Input, Button, Space } from 'antd';
......
import React, { useState, useRef } from 'react'
import { Input, Form, Steps, Button, Row, Space, message } from 'antd'
import styles from './index.less'
import globalStyles from '@/global.less'
import globalStyles from '@/global/styles/global.less'
import cx from 'classnames'
import { FormPage } from 'god'
import { IFormControllers, IFormButtonTypes } from 'god/dist/src/form-page'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment