Commit 5b6cb318 authored by iamkun's avatar iamkun Committed by hetech

chore: generate theme (#14666)

* update es fr i18n

* update no need edit pages

* move var name to frontend

* add i18n

* update i18n

* fix bug

* update style

* add callback

* add shortcut

* redo undo logic

* update picker style

* update shadow style

* save config to local

* button color

* button color

* add message

* update save logic
parent 463ed66a
...@@ -6,17 +6,19 @@ export default { ...@@ -6,17 +6,19 @@ export default {
data() { data() {
return { return {
docs: '', // content of docs css docs: '', // content of docs css
theme: ORIGINAL_THEME theme: ORIGINAL_THEME,
asyncCb: true
}; };
}, },
methods: { methods: {
updateDocStyle(e) { updateDocStyle(e, cb) {
const val = e.global['$--color-primary'] || ORIGINAL_THEME; const val = e.global['$--color-primary'] || ORIGINAL_THEME;
const oldVal = this.theme; const oldVal = this.theme;
const getHandler = (variable, id) => { const getHandler = (variable, id) => {
return () => { return () => {
let newStyle = this.updateStyle(this[variable], ORIGINAL_THEME, val); let newStyle = this.updateStyle(this[variable], ORIGINAL_THEME, val);
updateDomHeadStyle(id, newStyle); updateDomHeadStyle(id, newStyle);
this.asyncCb && cb();
}; };
}; };
const docsHandler = getHandler('docs', 'docs-style'); const docsHandler = getHandler('docs', 'docs-style');
...@@ -24,11 +26,14 @@ export default { ...@@ -24,11 +26,14 @@ export default {
const links = [].filter.call(document.querySelectorAll('link'), link => { const links = [].filter.call(document.querySelectorAll('link'), link => {
return /docs\..+\.css/.test(link.href || ''); return /docs\..+\.css/.test(link.href || '');
}); });
links[0] && this.getCSSString(links[0].href, docsHandler, 'docs'); if (links[0]) {
this.getCSSString(links[0].href, docsHandler, 'docs');
} else {
this.asyncCb = false;
}
} else { } else {
docsHandler(); docsHandler();
} }
const styles = [].slice.call(document.querySelectorAll('style')) const styles = [].slice.call(document.querySelectorAll('style'))
.filter(style => { .filter(style => {
const text = style.innerText; const text = style.innerText;
...@@ -40,6 +45,7 @@ export default { ...@@ -40,6 +45,7 @@ export default {
style.innerText = this.updateStyle(innerText, oldVal, val); style.innerText = this.updateStyle(innerText, oldVal, val);
}); });
this.theme = val; this.theme = val;
!this.asyncCb && cb();
}, },
updateStyle(style, oldColor, newColor) { updateStyle(style, oldColor, newColor) {
return style.replace(new RegExp(oldColor, 'ig'), newColor); return style.replace(new RegExp(oldColor, 'ig'), newColor);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<el-button <el-button
type="primary" type="primary"
:loading=downloading :loading=downloading
style="background: #66b1ff;border-color: #66b1ff"
@click.stop="onDownload"> @click.stop="onDownload">
{{getActionDisplayName("download-theme")}} {{getActionDisplayName("download-theme")}}
</el-button> </el-button>
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
.plus-button { .plus-button {
position: absolute; position: absolute;
left: 90%; left: 90%;
margin-top: 4px;
} }
.colorPicker { .colorPicker {
margin-left: 0; margin-left: 0;
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
</span> </span>
<div class="color-list-item-label"> <div class="color-list-item-label">
{{item.info.label}} {{item.info.label}}
</div> <div class="color-list-item-value">
<div class="color-list-item-value"> {{item.info.value}}
{{item.info.value}} </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
width: 100%; width: 100%;
cursor: pointer; cursor: pointer;
margin: 2px 0; margin: 2px 0;
position: relative;
} }
.color-list-item:hover { .color-list-item:hover {
background: #efefef; background: #efefef;
...@@ -44,22 +45,19 @@ ...@@ -44,22 +45,19 @@
margin-top: 2px; margin-top: 2px;
margin-left: 5px; margin-left: 5px;
border-radius: 100%; border-radius: 100%;
display: inline-block; display: block;
position: absolute;
} }
.color-list-item-label { .color-list-item-label {
margin-left: 15px; margin-left: 35px;
font-size: 13px; font-size: 13px;
line-height: 24px; line-height: 24px;
display: inline-block; display: inline-block;
vertical-align: super; width: 85%;
width: 30%; overflow: hidden;
} }
.color-list-item-value { .color-list-item-value {
margin-left: 15px; float: right;
font-size: 13px;
line-height: 24px;
display: inline-block;
vertical-align: super;
} }
</style> </style>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
round round
type="primary" type="primary"
size="mini" size="mini"
style="background: #66b1ff;border-color: #66b1ff"
@click.stop="showConfigurator" @click.stop="showConfigurator"
>{{getActionDisplayName("theme-editor")}}</el-button> >{{getActionDisplayName("theme-editor")}}</el-button>
<transition name="fade"> <transition name="fade">
...@@ -23,7 +24,8 @@ ...@@ -23,7 +24,8 @@
</div> </div>
<div v-if="init && !currentConfig" class="no-config"> <div v-if="init && !currentConfig" class="no-config">
<img src="../../assets/images/theme-no-config.png" alt> <img src="../../assets/images/theme-no-config.png" alt>
<span>{{getActionDisplayName("no-config")}}</span> <span v-if="pageCouldEdit">{{getActionDisplayName("no-config")}}</span>
<span v-else>{{getActionDisplayName("no-need-config")}}</span>
</div> </div>
<download-area></download-area> <download-area></download-area>
</div> </div>
...@@ -100,8 +102,16 @@ import { ...@@ -100,8 +102,16 @@ import {
} from './utils/utils.js'; } from './utils/utils.js';
import DocStyle from './docStyle'; import DocStyle from './docStyle';
import Loading from './loading'; import Loading from './loading';
import Shortcut from './shortcut';
import DownloadArea from './download'; import DownloadArea from './download';
const ELEMENT_THEME_USER_CONFIG = 'ELEMENT_THEME_USER_CONFIG';
const DEFAULT_USER_CONFIG = {
global: {},
local: {}
};
export default { export default {
components: { components: {
mainPanel, mainPanel,
...@@ -117,21 +127,33 @@ export default { ...@@ -117,21 +127,33 @@ export default {
global: {}, global: {},
local: {} local: {}
}, },
lastApply: 0 lastApply: 0,
userConfigHistory: [],
userConfigRedoHistory: [],
hasLocalConfig: false
}; };
}, },
mixins: [DocStyle, Loading], mixins: [DocStyle, Loading, Shortcut],
computed: { computed: {
globalValue() { globalValue() {
return filterGlobalValue(this.defaultConfig, this.userConfig); return filterGlobalValue(this.defaultConfig, this.userConfig);
},
pageCouldEdit() {
const noNeedEdit = ['installation', 'quickstart', 'i18n', 'custom-theme', 'transition'];
const lastPath = this.$route.path.split('/').slice(-1).pop();
return noNeedEdit.indexOf(lastPath) < 0;
} }
}, },
mounted() {
this.checkLocalThemeConfig();
},
methods: { methods: {
getActionDisplayName(key) { getActionDisplayName(key) {
return getActionDisplayName(key); return getActionDisplayName(key);
}, },
showConfigurator() { showConfigurator() {
this.visible = !this.visible; this.visible = !this.visible;
this.visible ? this.enableShortcut() : this.disableShortcut();
bus.$emit('user-theme-config-visible', this.visible); bus.$emit('user-theme-config-visible', this.visible);
window.userThemeConfigVisible = Boolean(this.visible); window.userThemeConfigVisible = Boolean(this.visible);
if (this.init) return; if (this.init) return;
...@@ -154,25 +176,46 @@ export default { ...@@ -154,25 +176,46 @@ export default {
this.defaultConfig = defaultConfig; this.defaultConfig = defaultConfig;
this.filterCurrentConfig(); this.filterCurrentConfig();
this.init = true; this.init = true;
this.checkLocalThemeConfig();
} }
loading.close(); loading.close();
}, 300); // action after transition }, 300); // action after transition
}); });
}); });
}, },
checkLocalThemeConfig() {
try {
if (this.hasLocalConfig) {
this.$message(getActionDisplayName('load-local-theme-config'));
this.onAction();
return;
}
const config = JSON.parse(localStorage.getItem(ELEMENT_THEME_USER_CONFIG));
if (config && config.global) {
this.userConfig = config;
this.hasLocalConfig = true;
this.showConfigurator();
}
} catch (e) {
// bad local config
}
},
filterCurrentConfig() { filterCurrentConfig() {
this.currentConfig = this.defaultConfig.find((config) => { this.currentConfig = this.defaultConfig.find((config) => {
return config.name === this.$route.path.split('/').pop().toLowerCase(); return config.name === this.$route.path.split('/').pop().toLowerCase().replace('-', '');
}); });
}, },
userConfigChange(e) { userConfigChange(e) {
this.userConfigHistory.push(JSON.stringify(this.userConfig));
this.userConfigRedoHistory = [];
this.$set(this.userConfig[filterConfigType(this.currentConfig.name)], e.key, e.value); this.$set(this.userConfig[filterConfigType(this.currentConfig.name)], e.key, e.value);
this.onAction(); this.onAction();
}, },
applyStyle(res, time) { applyStyle(res, time) {
if (time < this.lastApply) return; if (time < this.lastApply) return;
this.updateDocs(); this.updateDocs(() => {
updateDomHeadStyle('chalk-style', res); updateDomHeadStyle('chalk-style', res);
});
this.lastApply = time; this.lastApply = time;
}, },
onDownload() { onDownload() {
...@@ -190,6 +233,12 @@ export default { ...@@ -190,6 +233,12 @@ export default {
onAction() { onAction() {
this.triggerComponentLoading(true); this.triggerComponentLoading(true);
const time = +new Date(); const time = +new Date();
const currentConfigString = JSON.stringify(this.userConfig);
if (JSON.stringify(DEFAULT_USER_CONFIG) === currentConfigString) {
localStorage.removeItem(ELEMENT_THEME_USER_CONFIG);
} else {
localStorage.setItem(ELEMENT_THEME_USER_CONFIG, currentConfigString);
}
updateVars(this.userConfig) updateVars(this.userConfig)
.then((res) => { .then((res) => {
this.applyStyle(res, time); this.applyStyle(res, time);
...@@ -213,10 +262,24 @@ export default { ...@@ -213,10 +262,24 @@ export default {
triggerComponentLoading(val) { triggerComponentLoading(val) {
bus.$emit('user-theme-config-loading', val); bus.$emit('user-theme-config-loading', val);
}, },
updateDocs() { updateDocs(cb) {
window.userThemeConfig = JSON.parse(JSON.stringify(this.userConfig)); window.userThemeConfig = JSON.parse(JSON.stringify(this.userConfig));
bus.$emit('user-theme-config-update', this.userConfig); bus.$emit('user-theme-config-update', this.userConfig);
this.updateDocStyle(this.userConfig); this.updateDocStyle(this.userConfig, cb);
},
undo() {
if (this.userConfigHistory.length > 0) {
this.userConfigRedoHistory.push(JSON.stringify(this.userConfig));
this.userConfig = JSON.parse(this.userConfigHistory.pop());
this.onAction();
}
},
redo() {
if (this.userConfigRedoHistory.length > 0) {
this.userConfigHistory.push(JSON.stringify(this.userConfig));
this.userConfig = JSON.parse(this.userConfigRedoHistory.shift());
this.onAction();
}
} }
}, },
watch: { watch: {
......
<script>
export default {
data() {
return {
downloading: false
};
},
methods: {
shortcut(e) {
if (e.keyCode === 90 && (e.ctrlKey || e.metaKey)) {
if (e.shiftKey) {
this.redo();
} else {
this.undo();
}
}
},
enableShortcut() {
document.addEventListener('keydown', this.shortcut);
},
disableShortcut() {
document.removeEventListener('keydown', this.shortcut);
}
}
};
</script>
\ No newline at end of file
...@@ -46,12 +46,14 @@ const getNameFromI18N = (name) => { ...@@ -46,12 +46,14 @@ const getNameFromI18N = (name) => {
return constant.filter(config => config.lang === lang)[0][name]; return constant.filter(config => config.lang === lang)[0][name];
}; };
export const getVariableDisplayName = (key) => {
return getNameFromI18N('variable-name')[key] || key;
};
export const getStyleDisplayName = (config, componentName) => { export const getStyleDisplayName = (config, componentName) => {
const displayNameMap = getNameFromI18N('display-name'); const displayNameMap = getNameFromI18N('display-name');
if (config.name !== '[]') { if (config.name) {
const langIndex = {'zh-CN': '0', 'es': 2, 'fr-FR': 3}[getLang()] || 1; return getVariableDisplayName(config.key.replace('$--', ''));
const nameArr = config.name.replace(/\[?\]?/g, '').split(',');
return nameArr[langIndex] || nameArr[1];
} }
let displayName = config.key.replace(`$--${componentName}-`, '').replace(); let displayName = config.key.replace(`$--${componentName}-`, '').replace();
Object.keys(displayNameMap).forEach((name) => { Object.keys(displayNameMap).forEach((name) => {
......
...@@ -9,11 +9,29 @@ ...@@ -9,11 +9,29 @@
"font-size": "文字大小", "font-size": "文字大小",
"font-line-height": "文字行高", "font-line-height": "文字行高",
"border-radius": "边框圆角", "border-radius": "边框圆角",
"vertical": "纵向",
"horizontal": "横向",
"padding": "内间距",
"margin": "外间距",
"icon": "图标",
"placeholder": "占位符",
"dropdown": "下拉菜单",
"max": "最大",
"min": "最小",
"focus": "聚焦",
"selected": "选中",
"height": "高度",
"size": "大小",
"group": "分组",
"radius": "圆角",
"width": "宽度",
"color": "颜色" "color": "颜色"
}, },
"action": { "action": {
"theme-editor": "主题编辑器", "theme-editor": "主题编辑器",
"no-config": "暂不可编辑,敬请期待", "no-config": "暂不可编辑,敬请期待",
"no-need-config": "本页无需编辑,看看其他页面吧",
"load-local-theme-config": "正在恢复您上次自定义的主题",
"reset-theme": "重置", "reset-theme": "重置",
"download-theme": "下载" "download-theme": "下载"
}, },
...@@ -29,13 +47,82 @@ ...@@ -29,13 +47,82 @@
"Font": "文字", "Font": "文字",
"Radius": "边框圆角", "Radius": "边框圆角",
"Shadow": "阴影", "Shadow": "阴影",
"Spacing": "间距",
"FontSize": "文字大小", "FontSize": "文字大小",
"FontWeight": "文字粗细", "FontWeight": "文字粗细",
"LineHeight": "文字行高" "LineHeight": "文字行高"
},
"variable-name" : {
"color-primary": "主题色",
"color-white": "基础白色",
"color-black": "基础黑色",
"color-success": "成功颜色",
"color-warning": "警告颜色",
"color-danger": "危险颜色",
"color-info": "信息颜色",
"color-text-primary": "主要文字颜色",
"color-text-regular": "常规文字颜色",
"color-text-secondary": "次要文字颜色",
"color-text-placeholder": "占位文字颜色",
"border-color-base": "一级边框颜色",
"border-color-light": "二级边框颜色",
"border-color-lighter": "三级边框颜色",
"border-color-extra-light": "四级边框颜色",
"background-color-base": "基础背景色",
"border-radius-base": "大圆角",
"border-radius-small": "小圆角",
"border-radius-circle": "圆形圆角",
"box-shadow-base": "基础投影",
"box-shadow-dark": "深色投影",
"box-shadow-light": "浅色投影",
"font-size-extra-large": "主标题文字大小",
"font-size-large": "标题文字大小",
"font-size-medium": "小标题文字大小",
"font-size-base": "正文文字大小",
"font-size-small": "正文(小)文字大小",
"font-size-extra-small": "辅助文字大小",
"font-weight-primary": "主要文字粗细",
"font-weight-secondary": "次要文字粗细",
"font-line-height-primary": "主要文字行高",
"font-line-height-secondary": "次要文字行高"
} }
}, },
{ {
"lang": "en-US", "lang": "en-US",
"variable-name" : {
"color-primary": "primary color",
"color-white": "basic white",
"color-black": "basic black",
"color-success": "success color",
"color-warning": "warning color",
"color-danger": "danger color",
"color-info": "info color",
"color-text-primary": "primary text color",
"color-text-regular": "regular text color",
"color-text-secondary": "secondary text color",
"color-text-placeholder": "placeholder text color",
"border-color-base": "border color base",
"border-color-light": "border color light",
"border-color-lighter": "border color lighter",
"border-color-extra-light": "border color extra light",
"background-color-base": "base background color",
"border-radius-base": "border radius base",
"border-radius-small": "border radius small",
"border-radius-circle": "border radius circle",
"box-shadow-base": "box shadow base",
"box-shadow-dark": "box shadow dark",
"box-shadow-light": "box shadow light",
"font-size-extra-large": "extra large font size",
"font-size-large": "large font size",
"font-size-medium": "medium font size",
"font-size-base": "base font size",
"font-size-small": "small font size",
"font-size-extra-small": "extra small font size",
"font-weight-primary": "primary font weight",
"font-weight-secondary": "secondary font weight",
"font-line-height-primary": "primary font line height",
"font-line-height-secondary": "secondary font line height"
},
"display-name": { "display-name": {
"border-color": "border color", "border-color": "border color",
"font-color": "font color", "font-color": "font color",
...@@ -48,6 +135,8 @@ ...@@ -48,6 +135,8 @@
"action": { "action": {
"theme-editor": "Theme Editor", "theme-editor": "Theme Editor",
"no-config": "Please stay tuned", "no-config": "Please stay tuned",
"load-local-theme-config": "Loading your last edit theme config",
"no-need-config": "No config in this page",
"reset-theme": "Reset", "reset-theme": "Reset",
"download-theme": "Download" "download-theme": "Download"
}, },
...@@ -65,11 +154,61 @@ ...@@ -65,11 +154,61 @@
{ {
"lang": "es", "lang": "es",
"display-name": { "display-name": {
"border-color": "border color",
"font-color": "font color",
"background-color": "background color",
"font-weight": "font weight",
"font-size": "font size",
"font-line-height": "font line height",
"border-radius": "border radius"
},
"action": {
"theme-editor": "Theme Editor",
"no-config": "Please stay tuned",
"load-local-theme-config": "Loading your last edit theme config",
"no-need-config": "No config in this page",
"reset-theme": "Reset",
"download-theme": "Download"
},
"category": {
"BrandColor": "Brand Color",
"SecondaryColor": "Secondary Color",
"FontColor": "Font Color",
"BorderColor": "Border Color",
"BackgroundColor": "Background Color",
"FontSize": "Font Size",
"FontWeight": "Font Weight",
"LineHeight": "Line Height"
} }
}, },
{ {
"lang": "fr-FR", "lang": "fr-FR",
"display-name": { "display-name": {
"border-color": "border color",
"font-color": "font color",
"background-color": "background color",
"font-weight": "font weight",
"font-size": "font size",
"font-line-height": "font line height",
"border-radius": "border radius"
},
"action": {
"theme-editor": "Theme Editor",
"no-config": "Please stay tuned",
"load-local-theme-config": "Loading your last edit theme config",
"no-need-config": "No config in this page",
"reset-theme": "Reset",
"download-theme": "Download"
},
"category": {
"BrandColor": "Brand Color",
"SecondaryColor": "Secondary Color",
"FontColor": "Font Color",
"BorderColor": "Border Color",
"BackgroundColor": "Background Color",
"FontSize": "Font Size",
"FontWeight": "Font Weight",
"LineHeight": "Line Height"
} }
} }
] ]
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
top: 0; top: 0;
height: 100%; height: 100%;
padding: 0 25px 0 15px; padding: 0 25px 0 15px;
color: $--input-color; color: $--cascader-menu-font-color;
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
} }
@include when(active) { @include when(active) {
color: $--select-option-selected; color: $--cascader-menu-selected-font-color;
} }
&:hover, &:focus:not(:active) { &:hover, &:focus:not(:active) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@import "mixins/utils"; @import "mixins/utils";
@include b(checkbox) { @include b(checkbox) {
color: $--checkbox-color; color: $--checkbox-font-color;
font-weight: $--checkbox-font-weight; font-weight: $--checkbox-font-weight;
font-size: $--font-size-base; font-size: $--font-size-base;
position: relative; position: relative;
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
@include when(checked) { @include when(checked) {
.el-checkbox__inner { .el-checkbox__inner {
background-color: $--checkbox-checked-input-fill; background-color: $--checkbox-checked-input-background-color;
border-color: $--checkbox-checked-input-border-color; border-color: $--checkbox-checked-input-border-color;
&::after { &::after {
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
} }
& + .el-checkbox__label { & + .el-checkbox__label {
color: $--checkbox-checked-text-color; color: $--checkbox-checked-font-color;
} }
} }
@include when(focus) { /*focus时 视觉上区分*/ @include when(focus) { /*focus时 视觉上区分*/
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
} }
@include when(indeterminate) { @include when(indeterminate) {
.el-checkbox__inner { .el-checkbox__inner {
background-color: $--checkbox-checked-input-fill; background-color: $--checkbox-checked-input-background-color;
border-color: $--checkbox-checked-input-border-color; border-color: $--checkbox-checked-input-border-color;
&::before { &::before {
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
box-sizing: border-box; box-sizing: border-box;
width: $--checkbox-input-width; width: $--checkbox-input-width;
height: $--checkbox-input-height; height: $--checkbox-input-height;
background-color: $--checkbox-input-fill; background-color: $--checkbox-input-background-color;
z-index: $--index-normal; z-index: $--index-normal;
transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46), transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46),
background-color .25s cubic-bezier(.71,-.46,.29,1.46); background-color .25s cubic-bezier(.71,-.46,.29,1.46);
...@@ -294,8 +294,8 @@ ...@@ -294,8 +294,8 @@
&.is-checked { &.is-checked {
& .el-checkbox-button__inner { & .el-checkbox-button__inner {
color: $--checkbox-button-checked-color; color: $--checkbox-button-checked-font-color;
background-color: $--checkbox-button-checked-fill; background-color: $--checkbox-button-checked-background-color;
border-color: $--checkbox-button-checked-border-color; border-color: $--checkbox-button-checked-border-color;
box-shadow: -1px 0 0 0 $--color-primary-light-4; box-shadow: -1px 0 0 0 $--color-primary-light-4;
} }
......
This diff is collapsed.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
background-color: $--datepicker-inrange-color; background-color: $--datepicker-inrange-color;
} }
td.available:hover { td.available:hover {
color: $--datepicker-color; color: $--datepicker-font-color;
} }
td:first-child div { td:first-child div {
margin-left: 5px; margin-left: 5px;
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
&.next-month, &.next-month,
&.prev-month { &.prev-month {
color: $--datepicker-off-color; color: $--datepicker-off-font-color;
} }
&.today { &.today {
...@@ -138,13 +138,13 @@ ...@@ -138,13 +138,13 @@
&.week { &.week {
font-size: 80%; font-size: 80%;
color: $--datepicker-header-color; color: $--datepicker-header-font-color;
} }
} }
th { th {
padding: 5px; padding: 5px;
color: $--datepicker-header-color; color: $--datepicker-header-font-color;
font-weight: 400; font-weight: 400;
border-bottom: solid 1px $--border-color-lighter; border-bottom: solid 1px $--border-color-lighter;
} }
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
height: 36px; height: 36px;
display: block; display: block;
line-height: 36px; line-height: 36px;
color: $--datepicker-color; color: $--datepicker-font-color;
margin: 0 auto; margin: 0 auto;
border-radius: 18px; border-radius: 18px;
&:hover { &:hover {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
background-color: transparent; background-color: transparent;
line-height: 28px; line-height: 28px;
font-size: 14px; font-size: 14px;
color: $--datepicker-color; color: $--datepicker-font-color;
padding-left: 12px; padding-left: 12px;
text-align: left; text-align: left;
outline: none; outline: none;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
height: 32px; height: 32px;
display: block; display: block;
line-height: 32px; line-height: 32px;
color: $--datepicker-color; color: $--datepicker-font-color;
margin: 0 auto; margin: 0 auto;
&:hover { &:hover {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
font-size: inherit; font-size: inherit;
color: $--input-color; color: $--input-font-color;
background-color: $--input-fill; background-color: $--input-background-color;
background-image: none; background-image: none;
border: $--input-border; border: $--input-border;
border-radius: $--input-border-radius; border-radius: $--input-border-radius;
...@@ -71,12 +71,12 @@ ...@@ -71,12 +71,12 @@
@include e(inner) { @include e(inner) {
-webkit-appearance: none; -webkit-appearance: none;
background-color: $--input-fill; background-color: $--input-background-color;
background-image: none; background-image: none;
border-radius: $--input-border-radius; border-radius: $--input-border-radius;
border: $--input-border; border: $--input-border;
box-sizing: border-box; box-sizing: border-box;
color: $--input-color; color: $--input-font-color;
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
height: $--input-height; height: $--input-height;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
} }
&.selected { &.selected {
color: $--select-option-selected; color: $--select-option-selected-font-color;
font-weight: bold; font-weight: bold;
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@include when(multiple) { @include when(multiple) {
& .el-select-dropdown__item.selected { & .el-select-dropdown__item.selected {
color: $--select-option-selected; color: $--select-option-selected-font-color;
background-color: $--select-dropdown-background; background-color: $--select-dropdown-background;
&.hover { &.hover {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
padding-right: 35px; padding-right: 35px;
&:focus { &:focus {
border-color: $--select-input-focus-background; border-color: $--select-input-focus-border-color;
} }
} }
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
} }
&.is-focus .el-input__inner { &.is-focus .el-input__inner {
border-color: $--select-input-focus-background; border-color: $--select-input-focus-border-color;
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
max-width: 100%; max-width: 100%;
background-color: $--color-white; background-color: $--color-white;
font-size: 14px; font-size: 14px;
color: $--table-text-color; color: $--table-font-color;
// 数据为空 // 数据为空
@include e(empty-block) { @include e(empty-block) {
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
user-select: none; user-select: none;
background-color: $--table-header-background; background-color: $--table-header-background-color;
div { div {
display: inline-block; display: inline-block;
...@@ -361,8 +361,8 @@ ...@@ -361,8 +361,8 @@
& tbody td { & tbody td {
border-top: $--table-border; border-top: $--table-border;
background-color: $--table-row-hover-background; background-color: $--table-row-hover-background-color;
color: $--table-text-color; color: $--table-font-color;
} }
} }
...@@ -394,8 +394,8 @@ ...@@ -394,8 +394,8 @@
overflow: hidden; overflow: hidden;
& tbody td { & tbody td {
background-color: $--table-row-hover-background; background-color: $--table-row-hover-background-color;
color: $--table-text-color; color: $--table-font-color;
} }
} }
...@@ -489,7 +489,7 @@ ...@@ -489,7 +489,7 @@
} }
&.current-row td { &.current-row td {
background-color: $--table-current-row-background; background-color: $--table-current-row-background-color;
} }
} }
} }
...@@ -500,14 +500,14 @@ ...@@ -500,14 +500,14 @@
&, &.el-table__row--striped { &, &.el-table__row--striped {
&, &.current-row { &, &.current-row {
> td { > td {
background-color: $--table-current-row-background; background-color: $--table-current-row-background-color;
} }
} }
} }
} }
tr.current-row > td { tr.current-row > td {
background-color: $--table-current-row-background; background-color: $--table-current-row-background-color;
} }
} }
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
@include m(enable-row-hover) { @include m(enable-row-hover) {
.el-table__body tr:hover > td { .el-table__body tr:hover > td {
background-color: $--table-row-hover-background; background-color: $--table-row-hover-background-color;
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
height: 32px; height: 32px;
line-height: 30px; line-height: 30px;
font-size: $--tag-font-size; font-size: $--tag-font-size;
color: $--tag-color; color: $--tag-font-color;
border-radius: $--tag-border-radius; border-radius: $--tag-border-radius;
box-sizing: border-box; box-sizing: border-box;
border: 1px solid $--tag-border; border: 1px solid $--tag-border;
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
vertical-align: middle; vertical-align: middle;
top: -1px; top: -1px;
right: -5px; right: -5px;
color: $--tag-color; color: $--tag-font-color;
&::before { &::before {
display: block; display: block;
} }
&:hover { &:hover {
background-color: $--tag-color; background-color: $--tag-background-color;
color: $--color-white; color: $--color-white;
} }
} }
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
.el-transfer-panel__header { .el-transfer-panel__header {
height: $--transfer-panel-header-height; height: $--transfer-panel-header-height;
line-height: $--transfer-panel-header-height; line-height: $--transfer-panel-header-height;
background: $--transfer-panel-header-background; background: $--transfer-panel-header-background-color;
margin: 0; margin: 0;
padding-left: 15px; padding-left: 15px;
border-bottom: 1px solid $--transfer-border-color; border-bottom: 1px solid $--transfer-border-color;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
position: relative; position: relative;
cursor: default; cursor: default;
background: $--color-white; background: $--color-white;
color: $--tree-text-color; color: $--tree-font-color;
@include e(empty-block) { @include e(empty-block) {
position: relative; position: relative;
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
outline: none; outline: none;
&:focus { /* focus */ &:focus { /* focus */
> .el-tree-node__content { > .el-tree-node__content {
background-color: $--tree-node-hover-color; background-color: $--tree-node-hover-background-color;
} }
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
margin-right: 8px; margin-right: 8px;
} }
&:hover { &:hover {
background-color: $--tree-node-hover-color; background-color: $--tree-node-hover-background-color;
} }
.el-tree.is-dragging & { .el-tree.is-dragging & {
......
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