perf: 使用 %placeholder 代替 @mixin (#131)
This commit is contained in:
parent
7bfacf333a
commit
574f47cb00
@ -51,7 +51,7 @@ const handleClickOutside = () => {
|
|||||||
$transition-time: 0.35s;
|
$transition-time: 0.35s;
|
||||||
|
|
||||||
.app-wrapper {
|
.app-wrapper {
|
||||||
@include clearfix;
|
@extend %clearfix;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ const layoutClasses = computed(() => {
|
|||||||
$transition-time: 0.35s;
|
$transition-time: 0.35s;
|
||||||
|
|
||||||
.app-wrapper {
|
.app-wrapper {
|
||||||
@include clearfix;
|
@extend %clearfix;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ const { showTagsView, showLogo } = storeToRefs(settingsStore)
|
|||||||
$transition-time: 0.35s;
|
$transition-time: 0.35s;
|
||||||
|
|
||||||
.app-wrapper {
|
.app-wrapper {
|
||||||
@include clearfix;
|
@extend %clearfix;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ const settingsStore = useSettingsStore()
|
|||||||
.app-scrollbar {
|
.app-scrollbar {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@include scrollbar;
|
@extend %scrollbar;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.app-container-grow {
|
.app-container-grow {
|
||||||
|
@ -74,7 +74,7 @@ watchEffect(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.setting-name {
|
.setting-name {
|
||||||
@include ellipsis;
|
@extend %ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-button {
|
.el-button {
|
||||||
|
@ -77,7 +77,7 @@ const tipLineWidth = computed(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@mixin tip-line {
|
%tip-line {
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -147,7 +147,7 @@ const tipLineWidth = computed(() => {
|
|||||||
|
|
||||||
:deep(.el-menu-item) {
|
:deep(.el-menu-item) {
|
||||||
&.is-active {
|
&.is-active {
|
||||||
@include tip-line;
|
@extend %tip-line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ const tipLineWidth = computed(() => {
|
|||||||
:deep(.el-sub-menu) {
|
:deep(.el-sub-menu) {
|
||||||
&.is-active {
|
&.is-active {
|
||||||
.el-sub-menu__title {
|
.el-sub-menu__title {
|
||||||
@include tip-line;
|
@extend %tip-line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ body {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
|
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
|
||||||
sans-serif;
|
sans-serif;
|
||||||
@include scrollbar;
|
@extend %scrollbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** 清除浮动 */
|
/** 清除浮动 */
|
||||||
@mixin clearfix {
|
%clearfix {
|
||||||
&::after {
|
&::after {
|
||||||
content: "";
|
content: "";
|
||||||
display: table;
|
display: table;
|
||||||
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 美化原生滚动条 */
|
/** 美化原生滚动条 */
|
||||||
@mixin scrollbar {
|
%scrollbar {
|
||||||
// 整个滚动条
|
// 整个滚动条
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
@ -32,7 +32,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 文本溢出时显示省略号 */
|
/** 文本溢出时显示省略号 */
|
||||||
@mixin ellipsis {
|
%ellipsis {
|
||||||
// 隐藏溢出的文本
|
// 隐藏溢出的文本
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// 防止文本换行
|
// 防止文本换行
|
||||||
|
Loading…
x
Reference in New Issue
Block a user