|
- /*
- * @Author: 赵伟
- * @Date: 2024-04-28 08:47:43
- * @Description: 全局变量,可以直接在 less 文件里使用,无需引入;也可以导入到 js 里使用;为 antd 主题修改提供常量值
- */
-
- // 颜色
- @primary-color: #1664ff; // 主色调
- @primary-color-secondary: #4e89ff;
- @primary-color-hover: #69b1ff;
- @sider-background-color: #f2f5f7; // 侧边栏背景颜色
- @background-color: #f9fafb; // 页面背景颜色
- @text-color: #1d1d20;
- @text-color-secondary: #575757;
- @text-color-tertiary: #8a8a8a;
- @text-placeholder-color: rgba(0, 0, 0, 0.25);
- @text-disabled-color: rgba(0, 0, 0, 0.25);
- @success-color: #6ac21d;
- @error-color: #c73131;
- @warning-color: #f98e1b;
- @abort-color: #8a8a8a;
- @pending-color: #ecb934;
- @underline-color: #5d93ff;
- @border-color: #eaeaea;
-
- @link-hover-color: #69b1ff;
- @heading-color: rgba(0, 0, 0, 0.85);
- @input-icon-hover-color: rgba(0, 0, 0, 0.85);
-
- @workspace-background: linear-gradient(
- 179.03deg,
- rgba(138, 138, 138, 0.06) 0%,
- rgba(22, 100, 255, 0.02) 100%
- );
-
- // 字体大小
- @font-size-input: 14px;
- @font-size: 15px;
- @font-size-content: 16px;
- @font-size-input-lg: @font-size-content;
- @font-size-title: 18px;
-
- // padding
- @content-padding: 25px;
-
- // 函数,hex 添加 alpha 值
- .addAlpha(@color, @alpha) {
- @red: red(@color);
- @green: green(@color);
- @blue: blue(@color);
- @result: rgba(@red, @green, @blue, @alpha);
- }
-
- // 混合
- // 单行
- .singleLine() {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- word-break: break-all;
- }
-
- // 多行
- .multiLine(@line) {
- display: -webkit-box;
- overflow: hidden;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: @line;
- }
-
- // 背景
- .backgroundFullImage(@url) {
- background-image: @url;
- background-repeat: no-repeat;
- background-position: top center;
- background-size: 100% 100%;
- }
-
- // 导出变量
- :export {
- primaryColor: @primary-color;
- successColor: @success-color;
- errorColor: @error-color;
- warningColor: @warning-color;
- textColor: @text-color;
- textColorSecondary: @text-color-secondary;
- textColorTertiary: @text-color-tertiary;
- fontSize: @font-size;
- fontSizeTitle: @font-size-title;
- fontSizeContent: @font-size-content;
- fontSizeInput: @font-size-input;
- fontSizeInputLg: @font-size-input-lg;
- siderBGColor: @sider-background-color;
- abortColor: @abort-color;
- pendingColor: @pending-color;
- }
|