style: ui style

This commit is contained in:
jialin
2024-07-02 15:03:38 +08:00
parent 6989345088
commit 49efbd1a7f
38 changed files with 336 additions and 135 deletions
+20 -19
View File
@@ -1,4 +1,5 @@
import { defineConfig } from '@umijs/max';
import theme from './theme';
const CompressionWebpackPlugin = require('compression-webpack-plugin');
import proxy from './proxy';
@@ -44,6 +45,24 @@ export default defineConfig({
minRatio: 0.8
}
]);
config.module
.rule('images')
.test(/\.(png|jpe?g|gif|svg|ico)(\?.*)?$/)
.use('url-loader')
.loader(require.resolve('url-loader'))
.tap((options: any) => {
console.log('iamges==options========', options);
return {
...options,
limit: 8192, // 小于8KB的图片会被转为base64
fallback: {
loader: require.resolve('file-loader'),
options: {
name: 'static/[name].[hash:8].[ext]' // 将所有图片输出到 static 目录
}
}
};
});
}
}
: {}),
@@ -58,25 +77,7 @@ export default defineConfig({
style: 'less',
configProvider: {
componentSize: 'large',
theme: {
'root-entry-name': 'variable',
cssVar: true,
hashed: false,
components: {
Input: {
inputFontSize: 12
},
Table: {
cellFontSize: 12
}
},
token: {
colorPrimary: '#2fbf85',
borderRadius: 8,
fontSize: 12,
motion: true
}
}
theme
}
},
hash: true,
+25
View File
@@ -0,0 +1,25 @@
export default {
'root-entry-name': 'variable',
cssVar: true,
hashed: false,
components: {
Input: {
inputFontSize: 12
},
Table: {
cellFontSize: 12,
rowSelectedHoverBg: '#e6f6ff'
},
Menu: {
iconSize: 16,
iconMarginInlineEnd: 12,
itemHeight: 44
}
},
token: {
colorPrimary: '#007BFF',
borderRadius: 8,
fontSize: 12,
motion: true
}
};