提交 aaae6683 作者: vben

perf: update style

上级 562e2af9
## Wip
### 🐛 Bug Fixes
- 修复菜单在 hmr 时数据被置空
## 2.0.0-rc.18 (2021-02-05) ## 2.0.0-rc.18 (2021-02-05)
### ✨ Features ### ✨ Features
......
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
"vite": "2.0.0-beta.64", "vite": "2.0.0-beta.64",
"vite-plugin-html": "^2.0.0", "vite-plugin-html": "^2.0.0",
"vite-plugin-imagemin": "^0.2.2", "vite-plugin-imagemin": "^0.2.2",
"vite-plugin-mock": "^2.0.1", "vite-plugin-mock": "2.0.5",
"vite-plugin-purge-icons": "^0.6.0", "vite-plugin-purge-icons": "^0.6.0",
"vite-plugin-pwa": "^0.4.2", "vite-plugin-pwa": "^0.4.3",
"vite-plugin-style-import": "^0.5.5", "vite-plugin-style-import": "^0.6.6",
"vite-plugin-theme": "0.3.3", "vite-plugin-theme": "0.3.8",
"vue-eslint-parser": "^7.4.1", "vue-eslint-parser": "^7.4.1",
"yargs": "^16.2.0" "yargs": "^16.2.0"
}, },
......
...@@ -321,7 +321,7 @@ export default defineComponent({ ...@@ -321,7 +321,7 @@ export default defineComponent({
return ( return (
isIfShow && ( isIfShow && (
<Col {...realColProps} class={{ hidden: !isShow }}> <Col {...realColProps} v-show={isShow}>
{getContent()} {getContent()}
</Col> </Col>
) )
......
...@@ -122,6 +122,9 @@ ...@@ -122,6 +122,9 @@
watch( watch(
() => props.items, () => props.items,
() => { () => {
if (import.meta.hot && props.items.length === 0) {
return;
}
handleMenuChange(); handleMenuChange();
} }
); );
......
@import './helper/distance.less'; @import './helper/distance.less';
.distance(); .distance();
.hidden {
display: none !important;
}
.flex { .flex {
display: flex; display: flex;
} }
......
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
box-sizing: border-box; box-sizing: border-box;
} }
:root {
-moz-tab-size: 4;
tab-size: 4;
}
input:-webkit-autofill { input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset !important; -webkit-box-shadow: 0 0 0 1000px white inset !important;
} }
...@@ -33,6 +38,8 @@ html, ...@@ -33,6 +38,8 @@ html,
html { html {
overflow: hidden; overflow: hidden;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
} }
html, html,
...@@ -53,34 +60,9 @@ body { ...@@ -53,34 +60,9 @@ body {
} }
body { body {
font-family: 'BlinkMacSystemFont,segoe ui,Microsoft YaHei,Arial,sans-serif,Helvetica Neue,Helvetica,Pingfang SC,Hiragino Sans GB,Roboto,helvetica neue,Arial,noto sans,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol,noto color emoji'; font-family: system-ui, -apple-system, 'Segoe UI', Microsoft YaHei, Arial, sans-serif,
font-style: normal; Helvetica Neue, Helvetica, Pingfang SC, Hiragino Sans GB, Roboto, helvetica neue, noto sans,
font-weight: normal; apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji;
line-height: 1.428571429; // 20/14
letter-spacing: normal;
word-spacing: normal;
text-align: left; // Fallback for where `start` is not supported
text-align: start;
text-decoration: none;
text-size-adjust: 100%;
text-shadow: none;
text-transform: none;
word-break: normal;
word-wrap: normal;
white-space: normal;
line-break: auto;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5em;
font-weight: 500;
color: @heading-color;
} }
ul, ul,
...@@ -92,68 +74,121 @@ li { ...@@ -92,68 +74,121 @@ li {
list-style-type: none; list-style-type: none;
} }
img { a:focus,
vertical-align: top; a:active {
border: 0; outline: none;
}
hr {
height: 0;
color: inherit;
}
abbr[title] {
text-decoration: underline dotted;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
} }
table { table {
border-collapse: collapse; text-indent: 0;
border-spacing: 0; border-color: inherit;
} }
a:focus, button,
a:active { input,
outline: none; optgroup,
select,
textarea {
margin: 0;
font-family: inherit;
font-size: 100%;
line-height: 1.15;
} }
i, button,
em { select {
font-style: normal; text-transform: none;
} }
button, button,
div:focus { [type='button'],
outline: none !important; [type='reset'],
[type='submit'] {
-webkit-appearance: button;
} }
a { ::-moz-focus-inner {
color: @link-color; padding: 0;
text-decoration: none; border-style: none;
cursor: pointer; }
background-color: transparent; // remove the gray background on active links in IE 10.
outline: none;
transition: color 0.3s;
-webkit-text-decoration-skip: objects; // remove gaps in links underline in iOS 8+ and Safari 8+.
&:hover { :-moz-focusring {
color: @link-hover-color; outline: 1px dotted ButtonText;
} }
&:active { :-moz-ui-invalid {
color: @link-active-color; box-shadow: none;
} }
&:active, legend {
&:hover { padding: 0;
text-decoration: none; }
outline: 0;
}
&[disabled] { progress {
color: @disabled-color; vertical-align: baseline;
pointer-events: none; }
cursor: not-allowed;
} ::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
[type='search'] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
} }
img, summary {
svg, display: list-item;
video,
canvas,
audio,
iframe,
embed,
object {
vertical-align: baseline !important;
} }
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<div <div
v-if="getMenuFixed && !getIsMobile" v-if="getMenuFixed && !getIsMobile"
:style="getHiddenDomStyle" :style="getHiddenDomStyle"
:class="{ hidden: !showClassSideBarRef }" v-show="showClassSideBarRef"
></div> ></div>
<Sider <Sider
v-show="showClassSideBarRef"
ref="sideRef" ref="sideRef"
breakpoint="lg" breakpoint="lg"
collapsible collapsible
...@@ -84,7 +85,6 @@ ...@@ -84,7 +85,6 @@
prefixCls, prefixCls,
{ {
[`${prefixCls}--fixed`]: unref(getMenuFixed), [`${prefixCls}--fixed`]: unref(getMenuFixed),
hidden: !unref(showClassSideBarRef),
[`${prefixCls}--mix`]: unref(getIsMixMode) && !unref(getIsMobile), [`${prefixCls}--mix`]: unref(getIsMixMode) && !unref(getIsMobile),
}, },
]; ];
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"allowJs": true, "allowJs": true,
"sourceMap": true, "sourceMap": true,
"esModuleInterop": true, "esModuleInterop": true,
"resolveJsonModule": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"experimentalDecorators": true, "experimentalDecorators": true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论