diff --git a/src/assets/css/common.css b/src/assets/css/common.css index 92f92b67..ee033b1c 100644 --- a/src/assets/css/common.css +++ b/src/assets/css/common.css @@ -7,841 +7,927 @@ /* -- flex弹性布局 -- */ .flex { - display: flex; + display: flex; /* 设置元素为弹性盒子模型 */ } .basis-xs { - flex-basis: 20%; + flex-basis: 20%; /* 设置基础宽度为容器的20% */ } .basis-sm { - flex-basis: 40%; + flex-basis: 40%; /* 设置基础宽度为容器的40% */ } .basis-df { - flex-basis: 50%; + flex-basis: 50%; /* 设置基础宽度为容器的50% */ } .basis-lg { - flex-basis: 60%; + flex-basis: 60%; /* 设置基础宽度为容器的60% */ } .basis-xl { - flex-basis: 80%; + flex-basis: 80%; /* 设置基础宽度为容器的80% */ } .flex-sub { - flex: 1; + flex: 1; /* 设置弹性比例为1 */ } .flex-twice { - flex: 2; + flex: 2; /* 设置弹性比例为2 */ } .flex-treble { - flex: 3; + flex: 3; /* 设置弹性比例为3 */ } .flex-direction { - flex-direction: column; + flex-direction: column; /* 设置主轴方向为纵向 */ } .flex-wrap { - flex-wrap: wrap; + flex-wrap: wrap; /* 允许子元素换行 */ } .align-start { - align-items: flex-start; + align-items: flex-start; /* 子元素在交叉轴上靠起始位置对齐 */ } .align-end { - align-items: flex-end; + align-items: flex-end; /* 子元素在交叉轴上靠结束位置对齐 */ } .align-center { - align-items: center; + align-items: center; /* 子元素在交叉轴上居中对齐 */ } .align-stretch { - align-items: stretch; + align-items: stretch; /* 子元素在交叉轴上拉伸以填充容器 */ } .self-start { - align-self: flex-start; + align-self: flex-start; /* 单个子元素在交叉轴上靠起始位置对齐 */ } .self-center { - align-self: flex-center; + align-self: center; /* 单个子元素在交叉轴上居中对齐 */ } .self-end { - align-self: flex-end; + align-self: flex-end; /* 单个子元素在交叉轴上靠结束位置对齐 */ } .self-stretch { - align-self: stretch; + align-self: stretch; /* 单个子元素在交叉轴上拉伸以填充容器 */ } .align-stretch { - align-items: stretch; + align-items: stretch; /* 子元素在交叉轴上拉伸以填充容器 */ } .justify-start { - justify-content: flex-start; + justify-content: flex-start; /* 子元素在主轴上靠起始位置对齐 */ } .justify-end { - justify-content: flex-end; + justify-content: flex-end; /* 子元素在主轴上靠结束位置对齐 */ } .justify-center { - justify-content: center; + justify-content: center; /* 子元素在主轴上居中对齐 */ } .justify-between { - justify-content: space-between; + justify-content: space-between; /* 子元素在主轴上两端对齐,间隔均匀分布 */ } .justify-around { - justify-content: space-around; + justify-content: space-around; /* 子元素在主轴上均匀分布,每个子元素两侧间隔相等 */ } + /* -- 内外边距 -- */ .margin-0 { - margin: 0; + margin: 0; /* 设置外边距为0 */ } .margin-xs { - margin: 5px; + margin: 5px; /* 设置外边距为5px */ } .margin-sm { - margin: 10px; + margin: 10px; /* 设置外边距为10px */ } .margin { - margin: 15px; + margin: 15px; /* 设置外边距为15px */ } .margin-lg { - margin: 20px; + margin: 20px; /* 设置外边距为20px */ } .margin-xl { - margin: 25px; + margin: 25px; /* 设置外边距为25px */ } .margin-top-xs { - margin-top: 5px; + margin-top: 5px; /* 设置上外边距为5px */ } .margin-top-sm { - margin-top: 10px; + margin-top: 10px; /* 设置上外边距为10px */ } .margin-top { - margin-top: 15px; + margin-top: 15px; /* 设置上外边距为15px */ } .margin-top-lg { - margin-top: 20px; + margin-top: 20px; /* 设置上外边距为20px */ } .margin-top-xl { - margin-top: 25px; + margin-top: 25px; /* 设置上外边距为25px */ } .margin-right-xs { - margin-right: 5px; + margin-right: 5px; /* 设置右外边距为5px */ } .margin-right-sm { - margin-right: 10px; + margin-right: 10px; /* 设置右外边距为10px */ } .margin-right { - margin-right: 15px; + margin-right: 15px; /* 设置右外边距为15px */ } .margin-right-lg { - margin-right: 20px; + margin-right: 20px; /* 设置右外边距为20px */ } .margin-right-xl { - margin-right: 25px; + margin-right: 25px; /* 设置右外边距为25px */ } .margin-bottom-xs { - margin-bottom: 5px; + margin-bottom: 5px; /* 设置下外边距为5px */ } .margin-bottom-sm { - margin-bottom: 10px; + margin-bottom: 10px; /* 设置下外边距为10px */ } .margin-bottom { - margin-bottom: 15px; + margin-bottom: 15px; /* 设置下外边距为15px */ } .margin-bottom-lg { - margin-bottom: 20px; + margin-bottom: 20px; /* 设置下外边距为20px */ } .margin-bottom-xl { - margin-bottom: 25px; + margin-bottom: 25px; /* 设置下外边距为25px */ } .margin-left-xs { - margin-left: 5px; + margin-left: 5px; /* 设置左外边距为5px */ } .margin-left-sm { - margin-left: 10px; + margin-left: 10px; /* 设置左外边距为10px */ } .margin-left { - margin-left: 15px; + margin-left: 15px; /* 设置左外边距为15px */ } .margin-left-lg { - margin-left: 20px; + margin-left: 20px; /* 设置左外边距为20px */ } .margin-left-xl { - margin-left: 25px; + margin-left: 25px; /* 设置左外边距为25px */ } .margin-lr-xs { - margin-left: 5px; - margin-right: 5px; + margin-left: 5px; /* 设置左右外边距为5px */ + margin-right: 5px; /* 设置左右外边距为5px */ } .margin-lr-sm { - margin-left: 10px; - margin-right: 10px; + margin-left: 10px; /* 设置左右外边距为10px */ + margin-right: 10px; /* 设置左右外边距为10px */ } .margin-lr { - margin-left: 15px; - margin-right: 15px; + margin-left: 15px; /* 设置左右外边距为15px */ + margin-right: 15px; /* 设置左右外边距为15px */ } .margin-lr-lg { - margin-left: 20px; - margin-right: 20px; + margin-left: 20px; /* 设置左右外边距为20px */ + margin-right: 20px; /* 设置左右外边距为20px */ } .margin-lr-xl { - margin-left: 25px; - margin-right: 25px; + margin-left: 25px; /* 设置左右外边距为25px */ + margin-right: 25px; /* 设置左右外边距为25px */ } .margin-tb-xs { - margin-top: 5px; - margin-bottom: 5px; + margin-top: 5px; /* 设置上下外边距为5px */ + margin-bottom: 5px; /* 设置上下外边距为5px */ } .margin-tb-sm { - margin-top: 10px; - margin-bottom: 10px; + margin-top: 10px; /* 设置上下外边距为10px */ + margin-bottom: 10px; /* 设置上下外边距为10px */ } .margin-tb { - margin-top: 15px; - margin-bottom: 15px; + margin-top: 15px; /* 设置上下外边距为15px */ + margin-bottom: 15px; /* 设置上下外边距为15px */ } .margin-tb-lg { - margin-top: 20px; - margin-bottom: 20px; + margin-top: 20px; /* 设置上下外边距为20px */ + margin-bottom: 20px; /* 设置上下外边距为20px */ } .margin-tb-xl { - margin-top: 25px; - margin-bottom: 25px; + margin-top: 25px; /* 设置上下外边距为25px */ + margin-bottom: 25px; /* 设置上下外边距为25px */ } .padding-0 { - padding: 0; + padding: 0; /* 设置内边距为0 */ } .padding-xs { - padding: 5px; + padding: 5px; /* 设置内边距为5px */ } .padding-sm { - padding: 10px; + padding: 10px; /* 设置内边距为10px */ } .padding { - padding: 15px; + padding: 15px; /* 设置内边距为15px */ } .padding-lg { - padding: 20px; + padding: 20px; /* 设置内边距为20px */ } .padding-xl { - padding: 25px; + padding: 25px; /* 设置内边距为25px */ } .padding-top-xs { - padding-top: 5px; + padding-top: 5px; /* 设置上内边距为5px */ } .padding-top-sm { - padding-top: 10px; + padding-top: 10px; /* 设置上内边距为10px */ } .padding-top { - padding-top: 15px; + padding-top: 15px; /* 设置上内边距为15px */ } .padding-top-lg { - padding-top: 20px; + padding-top: 20px; /* 设置上内边距为20px */ } .padding-top-xl { - padding-top: 25px; + padding-top: 25px; /* 设置上内边距为25px */ } .padding-right-xs { - padding-right: 5px; + padding-right: 5px; /* 设置右内边距为5px */ } .padding-right-sm { - padding-right: 10px; + padding-right: 10px; /* 设置右内边距为10px */ } .padding-right { - padding-right: 15px; + padding-right: 15px; /* 设置右内边距为15px */ } .padding-right-lg { - padding-right: 20px; + padding-right: 20px; /* 设置右内边距为20px */ } .padding-right-xl { - padding-right: 25px; + padding-right: 25px; /* 设置右内边距为25px */ } .padding-bottom-xs { - padding-bottom: 5px; + padding-bottom: 5px; /* 设置下内边距为5px */ } .padding-bottom-sm { - padding-bottom: 10px; + padding-bottom: 10px; /* 设置下内边距为10px */ } .padding-bottom { - padding-bottom: 15px; + padding-bottom: 15px; /* 设置下内边距为15px */ } .padding-bottom-lg { - padding-bottom: 20px; + padding-bottom: 20px; /* 设置下内边距为20px */ } .padding-bottom-xl { - padding-bottom: 25px; + padding-bottom: 25px; /* 设置下内边距为25px */ } .padding-left-xs { - padding-left: 5px; + padding-left: 5px; /* 设置左内边距为5px */ } .padding-left-sm { - padding-left: 10px; + padding-left: 10px; /* 设置左内边距为10px */ } .padding-left { - padding-left: 15px; + padding-left: 15px; /* 设置左内边距为15px */ } .padding-left-lg { - padding-left: 20px; + padding-left: 20px; /* 设置左内边距为20px */ } .padding-left-xl { - padding-left: 25px; + padding-left: 25px; /* 设置左内边距为25px */ } .padding-lr-xs { - padding-left: 5px; - padding-right: 5px; + padding-left: 5px; /* 设置左右内边距为5px */ + padding-right: 5px; /* 设置左右内边距为5px */ } .padding-lr-sm { - padding-left: 10px; - padding-right: 10px; + padding-left: 10px; /* 设置左右内边距为10px */ + padding-right: 10px; /* 设置左右内边距为10px */ } .padding-lr { - padding-left: 15px; - padding-right: 15px; + padding-left: 15px; /* 设置左右内边距为15px */ + padding-right: 15px; /* 设置左右内边距为15px */ } .padding-lr-lg { - padding-left: 20px; - padding-right: 20px; + padding-left: 20px; /* 设置左右内边距为20px */ + padding-right: 20px; /* 设置左右内边距为20px */ } .padding-lr-xl { - padding-left: 25px; - padding-right: 25px; + padding-left: 25px; /* 设置左右内边距为25px */ + padding-right: 25px; /* 设置左右内边距为25px */ } .padding-tb-xs { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 5px; /* 设置上下内边距为5px */ + padding-bottom: 5px; /* 设置上下内边距为5px */ } .padding-tb-sm { - padding-top: 10px; - padding-bottom: 10px; + padding-top: 10px; /* 设置上下内边距为10px */ + padding-bottom: 10px; /* 设置上下内边距为10px */ } .padding-tb { - padding-top: 15px; - padding-bottom: 15px; + padding-top: 15px; /* 设置上下内边距为15px */ + padding-bottom: 15px; /* 设置上下内边距为15px */ } .padding-tb-lg { - padding-top: 20px; - padding-bottom: 20px; + padding-top: 20px; /* 设置上下内边距为20px */ + padding-bottom: 20px; /* 设置上下内边距为20px */ } .padding-tb-xl { - padding-top: 25px; - padding-bottom: 25px; + padding-top: 25px; /* 设置上下内边距为25px */ + padding-bottom: 25px; /* 设置上下内边距为25px */ } /* -- 浮动 -- */ +/* 清除浮动的伪元素,用于清除浮动影响 */ .cf::after, .cf::before { - content: " "; - display: table; + content: " "; /* 设置内容为一个空格 */ + display: table; /* 将伪元素设置为表格布局 */ } +/* 清除浮动的具体实现 */ .cf::after { - clear: both; + clear: both; /* 清除左右两侧的浮动 */ } +/* 左浮动类 */ .fl { - float: left; + float: left; /* 元素向左浮动 */ } +/* 右浮动类 */ .fr { - float: right; + float: right; /* 元素向右浮动 */ } + /* ================== 背景 ==================== */ - .line-red::after, - .lines-red::after { - border-color: #e54d42; - } - - .line-orange::after, - .lines-orange::after { - border-color: #f37b1d; - } - - .line-yellow::after, - .lines-yellow::after { - border-color: #fbbd08; - } - - .line-olive::after, - .lines-olive::after { - border-color: #8dc63f; - } - - .line-green::after, - .lines-green::after { - border-color: #39b54a; - } - - .line-cyan::after, - .lines-cyan::after { - border-color: #1cbbb4; - } - - .line-blue::after, - .lines-blue::after { - border-color: #0081ff; - } - - .line-purple::after, - .lines-purple::after { - border-color: #6739b6; - } - - .line-mauve::after, - .lines-mauve::after { - border-color: #9c26b0; - } - - .line-pink::after, - .lines-pink::after { - border-color: #e03997; - } - - .line-brown::after, - .lines-brown::after { - border-color: #a5673f; - } - - .line-grey::after, - .lines-grey::after { - border-color: #8799a3; - } - - .line-gray::after, - .lines-gray::after { - border-color: #aaaaaa; - } - - .line-black::after, - .lines-black::after { - border-color: #333333; - } - - .line-white::after, - .lines-white::after { - border-color: #ffffff; - } - - .bg-red { - background-color: #e54d42; - color: #ffffff; - } - - .bg-orange { - background-color: #f37b1d; - color: #ffffff; - } - - .bg-yellow { - background-color: #fbbd08; - color: #333333; - } - - .bg-olive { - background-color: #8dc63f; - color: #ffffff; - } - - .bg-green { - background-color: #39b54a; - color: #ffffff; - } - - .bg-cyan { - background-color: #1cbbb4; - color: #ffffff; - } - - .bg-blue { - background-color: #0081ff; - color: #ffffff; - } - - .bg-purple { - background-color: #6739b6; - color: #ffffff; - } - - .bg-mauve { - background-color: #9c26b0; - color: #ffffff; - } - - .bg-pink { - background-color: #e03997; - color: #ffffff; - } - - .bg-brown { - background-color: #a5673f; - color: #ffffff; - } - - .bg-grey { - background-color: #8799a3; - color: #ffffff; - } - - .bg-gray { - background-color: #f0f0f0; - color: #333333; - } - - .bg-black { - background-color: #333333; - color: #ffffff; - } - - .bg-white { - background-color: #ffffff; - color: #666666; - } - - .bg-red.light { - color: #e54d42; - background-color: #fadbd9; - } - - .bg-orange.light { - color: #f37b1d; - background-color: #fde6d2; - } - - .bg-yellow.light { - color: #fbbd08; - background-color: #fef2ced2; - } - - .bg-olive.light { - color: #8dc63f; - background-color: #e8f4d9; - } - - .bg-green.light { - color: #39b54a; - background-color: #d7f0dbff; - } - - .bg-cyan.light { - color: #1cbbb4; - background-color: #d2f1f0; - } - - .bg-blue.light { - color: #0081ff; - background-color: #cce6ff; - } - - .bg-purple.light { - color: #6739b6; - background-color: #e1d7f0; - } - - .bg-mauve.light { - color: #9c26b0; - background-color: #ebd4ef; - } - - .bg-pink.light { - color: #e03997; - background-color: #f9d7ea; - } - - .bg-brown.light { - color: #a5673f; - background-color: #ede1d9; - } - - .bg-grey.light { - color: #8799a3; - background-color: #e7ebed; - } - - .bg-gradual-red { - background-image: linear-gradient(45deg, #f43f3b, #ec008c); - color: #ffffff; - } - - .bg-gradual-orange { - background-image: linear-gradient(45deg, #ff9700, #ed1c24); - color: #ffffff; - } - - .bg-gradual-green { - background-image: linear-gradient(45deg, #39b54a, #8dc63f); - color: #ffffff; - } - - .bg-gradual-purple { - background-image: linear-gradient(45deg, #9000ff, #5e00ff); - color: #ffffff; - } - - .bg-gradual-pink { - background-image: linear-gradient(45deg, #ec008c, #6739b6); - color: #ffffff; - } - - .bg-gradual-blue { - background-image: linear-gradient(45deg, #0081ff, #1cbbb4); - color: #ffffff; - } - +/* 设置红色线条的伪元素边框颜色 */ +.line-red::after, +.lines-red::after { + border-color: #e54d42; +} + +/* 设置橙色线条的伪元素边框颜色 */ +.line-orange::after, +.lines-orange::after { + border-color: #f37b1d; +} + +/* 设置黄色线条的伪元素边框颜色 */ +.line-yellow::after, +.lines-yellow::after { + border-color: #fbbd08; +} + +/* 设置橄榄色线条的伪元素边框颜色 */ +.line-olive::after, +.lines-olive::after { + border-color: #8dc63f; +} + +/* 设置绿色线条的伪元素边框颜色 */ +.line-green::after, +.lines-green::after { + border-color: #39b54a; +} + +/* 设置青色线条的伪元素边框颜色 */ +.line-cyan::after, +.lines-cyan::after { + border-color: #1cbbb4; +} + +/* 设置蓝色线条的伪元素边框颜色 */ +.line-blue::after, +.lines-blue::after { + border-color: #0081ff; +} + +/* 设置紫色线条的伪元素边框颜色 */ +.line-purple::after, +.lines-purple::after { + border-color: #6739b6; +} + +/* 设置紫罗兰色线条的伪元素边框颜色 */ +.line-mauve::after, +.lines-mauve::after { + border-color: #9c26b0; +} + +/* 设置粉色线条的伪元素边框颜色 */ +.line-pink::after, +.lines-pink::after { + border-color: #e03997; +} + +/* 设置棕色线条的伪元素边框颜色 */ +.line-brown::after, +.lines-brown::after { + border-color: #a5673f; +} + +/* 设置灰色线条的伪元素边框颜色 */ +.line-grey::after, +.lines-grey::after { + border-color: #8799a3; +} + +/* 设置深灰色线条的伪元素边框颜色 */ +.line-gray::after, +.lines-gray::after { + border-color: #aaaaaa; +} + +/* 设置黑色线条的伪元素边框颜色 */ +.line-black::after, +.lines-black::after { + border-color: #333333; +} + +/* 设置白色线条的伪元素边框颜色 */ +.line-white::after, +.lines-white::after { + border-color: #ffffff; +} + +/* 设置红色背景和文字颜色 */ +.bg-red { + background-color: #e54d42; + color: #ffffff; +} + +/* 设置橙色背景和文字颜色 */ +.bg-orange { + background-color: #f37b1d; + color: #ffffff; +} + +/* 设置黄色背景和文字颜色 */ +.bg-yellow { + background-color: #fbbd08; + color: #333333; +} + +/* 设置橄榄色背景和文字颜色 */ +.bg-olive { + background-color: #8dc63f; + color: #ffffff; +} + +/* 设置绿色背景和文字颜色 */ +.bg-green { + background-color: #39b54a; + color: #ffffff; +} + +/* 设置青色背景和文字颜色 */ +.bg-cyan { + background-color: #1cbbb4; + color: #ffffff; +} + +/* 设置蓝色背景和文字颜色 */ +.bg-blue { + background-color: #0081ff; + color: #ffffff; +} + +/* 设置紫色背景和文字颜色 */ +.bg-purple { + background-color: #6739b6; + color: #ffffff; +} + +/* 设置紫罗兰色背景和文字颜色 */ +.bg-mauve { + background-color: #9c26b0; + color: #ffffff; +} + +/* 设置粉色背景和文字颜色 */ +.bg-pink { + background-color: #e03997; + color: #ffffff; +} + +/* 设置棕色背景和文字颜色 */ +.bg-brown { + background-color: #a5673f; + color: #ffffff; +} + +/* 设置灰色背景和文字颜色 */ +.bg-grey { + background-color: #8799a3; + color: #ffffff; +} + +/* 设置深灰色背景和文字颜色 */ +.bg-gray { + background-color: #f0f0f0; + color: #333333; +} + +/* 设置黑色背景和文字颜色 */ +.bg-black { + background-color: #333333; + color: #ffffff; +} + +/* 设置白色背景和文字颜色 */ +.bg-white { + background-color: #ffffff; + color: #666666; +} + +/* 设置红色背景的浅色版本 */ +.bg-red.light { + color: #e54d42; + background-color: #fadbd9; +} + +/* 设置橙色背景的浅色版本 */ +.bg-orange.light { + color: #f37b1d; + background-color: #fde6d2; +} + +/* 设置黄色背景的浅色版本 */ +.bg-yellow.light { + color: #fbbd08; + background-color: #fef2ced2; +} + +/* 设置橄榄色背景的浅色版本 */ +.bg-olive.light { + color: #8dc63f; + background-color: #e8f4d9; +} + +/* 设置绿色背景的浅色版本 */ +.bg-green.light { + color: #39b54a; + background-color: #d7f0dbff; +} + +/* 设置青色背景的浅色版本 */ +.bg-cyan.light { + color: #1cbbb4; + background-color: #d2f1f0; +} + +/* 设置蓝色背景的浅色版本 */ +.bg-blue.light { + color: #0081ff; + background-color: #cce6ff; +} + +/* 设置紫色背景的浅色版本 */ +.bg-purple.light { + color: #6739b6; + background-color: #e1d7f0; +} + +/* 设置紫罗兰色背景的浅色版本 */ +.bg-mauve.light { + color: #9c26b0; + background-color: #ebd4ef; +} + +/* 设置粉色背景的浅色版本 */ +.bg-pink.light { + color: #e03997; + background-color: #f9d7ea; +} + +/* 设置棕色背景的浅色版本 */ +.bg-brown.light { + color: #a5673f; + background-color: #ede1d9; +} + +/* 设置灰色背景的浅色版本 */ +.bg-grey.light { + color: #8799a3; + background-color: #e7ebed; +} + +/* 设置渐变红色背景 */ +.bg-gradual-red { + background-image: linear-gradient(45deg, #f43f3b, #ec008c); + color: #ffffff; +} + +/* 设置渐变橙色背景 */ +.bg-gradual-orange { + background-image: linear-gradient(45deg, #ff9900, #ed1c24); + color: #ffffff; +} + +/* 设置渐变绿色背景 */ +.bg-gradual-green { + background-image: linear-gradient(45deg, #39b54a, #8dc63f); + color: #ffffff; +} + +/* 设置渐变紫色背景 */ +.bg-gradual-purple { + background-image: linear-gradient(45deg, #9000ff, #5e00ff); + color: #ffffff; +} + +/* 设置渐变粉色背景 */ +.bg-gradual-pink { + background-image: linear-gradient(45deg, #ec008c, #6739b6); + color: #ffffff; +} + +/* 设置渐变蓝色背景 */ +.bg-gradual-blue { + background-image: linear-gradient(45deg, #0081ff, #1cbbb4); + color: #ffffff; +} + + /* ================== - 文本 + 文本样式 ==================== */ +/* 超小号字体 */ .text-xs { - font-size: 10px; + font-size: 10px; } +/* 小号字体 */ .text-sm { - font-size: 12px; + font-size: 12px; } +/* 默认字体大小 */ .text-df { - font-size: 14px; + font-size: 14px; } +/* 大号字体 */ .text-lg { - font-size: 16px; + font-size: 16px; } +/* 超大号字体 */ .text-xl { - font-size: 18px; + font-size: 18px; } +/* 特大号字体 */ .text-xxl { - font-size: 22px; + font-size: 22px; } +/* 超大号字体 */ .text-sl { - font-size: 40px; + font-size: 40px; } +/* 极大号字体 */ .text-xsl { - font-size: 60px; + font-size: 60px; } +/* 首字母大写 */ .text-Abc { - text-transform: Capitalize; + text-transform: Capitalize; } +/* 全部大写 */ .text-ABC { - text-transform: Uppercase; + text-transform: Uppercase; } +/* 全部小写 */ .text-abc { - text-transform: Lowercase; + text-transform: Lowercase; } - +/* 文字溢出省略显示 */ .text-cut { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; + text-overflow: ellipsis; /* 使用省略号表示溢出的文本 */ + white-space: nowrap; /* 禁止换行 */ + overflow: hidden; /* 隐藏溢出内容 */ } +/* 加粗字体 */ .text-bold { - font-weight: bold; + font-weight: bold; /* 设置字体为加粗 */ } +/* 文本居中对齐 */ .text-center { - text-align: center; + text-align: center; /* 设置文本居中对齐 */ } +/* 文本内容行高 */ .text-content { - line-height: 1.6; + line-height: 1.6; /* 设置行高为1.6倍字体高度 */ } +/* 文本左对齐 */ .text-left { - text-align: left; + text-align: left; /* 设置文本左对齐 */ } +/* 文本右对齐 */ .text-right { - text-align: right; + text-align: right; /* 设置文本右对齐 */ } +/* 红色文本和线条 */ .text-red, .line-red, .lines-red { - color: #e54d42; + color: #e54d42; /* 设置颜色为红色 */ } +/* 橙色文本和线条 */ .text-orange, .line-orange, .lines-orange { - color: #f37b1d; + color: #f37b1d; /* 设置颜色为橙色 */ } +/* 黄色文本和线条 */ .text-yellow, .line-yellow, .lines-yellow { - color: #fbbd08; + color: #fbbd08; /* 设置颜色为黄色 */ } +/* 橄榄色文本和线条 */ .text-olive, .line-olive, .lines-olive { - color: #8dc63f; + color: #8dc63f; /* 设置颜色为橄榄色 */ } +/* 绿色文本和线条 */ .text-green, .line-green, .lines-green { - color: #39b54a; + color: #39b54a; /* 设置颜色为绿色 */ } +/* 青色文本和线条 */ .text-cyan, .line-cyan, .lines-cyan { - color: #1cbbb4; + color: #1cbbb4; /* 设置颜色为青色 */ } +/* 蓝色文本和线条 */ .text-blue, .line-blue, .lines-blue { - color: #0081ff; + color: #0081ff; /* 设置颜色为蓝色 */ } +/* 紫色文本和线条 */ .text-purple, .line-purple, .lines-purple { - color: #6739b6; + color: #6739b6; /* 设置颜色为紫色 */ } +/* 紫罗兰色文本和线条 */ .text-mauve, .line-mauve, .lines-mauve { - color: #9c26b0; + color: #9c26b0; /* 设置颜色为紫罗兰色 */ } +/* 粉色文本和线条 */ .text-pink, .line-pink, .lines-pink { - color: #e03997; + color: #e03997; /* 设置颜色为粉色 */ } +/* 棕色文本和线条 */ .text-brown, .line-brown, .lines-brown { - color: #a5673f; + color: #a5673f; /* 设置颜色为棕色 */ } +/* 灰色文本和线条 */ .text-grey, .line-grey, .lines-grey { - color: #8799a3; + color: #8799a3; /* 设置颜色为灰色 */ } +/* 深灰色文本和线条 */ .text-gray, .line-gray, .lines-gray { - color: #aaaaaa; + color: #aaaaaa; /* 设置颜色为深灰色 */ } +/* 黑色文本和线条 */ .text-black, .line-black, .lines-black { - color: #333333; + color: #333333; /* 设置颜色为黑色 */ } +/* 白色文本和线条 */ .text-white, .line-white, .lines-white { - color: #ffffff; -} \ No newline at end of file + color: #ffffff; /* 设置颜色为白色 */ +} diff --git a/src/assets/css/wx-menu.css b/src/assets/css/wx-menu.css index eebbb6e9..73a7415c 100644 --- a/src/assets/css/wx-menu.css +++ b/src/assets/css/wx-menu.css @@ -1,167 +1,166 @@ @charset "utf-8"; * { - box-sizing: border-box; + box-sizing: border-box; /* 设置所有元素的盒子模型为border-box */ } #app-menu ul { - padding: 0; + padding: 0; /* 移除列表的默认内边距 */ } #app-menu li { - list-style: none; + list-style: none; /* 移除列表项的默认样式 */ } #app-menu { - overflow: hidden; - width: 100%; + overflow: hidden; /* 隐藏溢出的内容 */ + width: 100%; /* 设置宽度为100% */ } .weixin-preview { - position: relative; - width: 320px; - height: 540px; - float: left; - margin-right: 10px; - border: 1px solid #e7e7eb; + position: relative; /* 相对定位 */ + width: 320px; /* 设置宽度 */ + height: 540px; /* 设置高度 */ + float: left; /* 左浮动 */ + margin-right: 10px; /* 右边距 */ + border: 1px solid #e7e7eb; /* 边框颜色和宽度 */ } .weixin-preview a { - text-decoration: none; - color: #616161; + text-decoration: none; /* 移除链接下划线 */ + color: #616161; /* 文字颜色 */ } .weixin-preview .weixin-hd .weixin-title { - color: #fff; - font-size: 15px; - width: 100%; - text-align: center; - position: absolute; - top: 33px; - left: 0px; + color: #fff; /* 文字颜色 */ + font-size: 15px; /* 字体大小 */ + width: 100%; /* 宽度 */ + text-align: center; /* 文字居中对齐 */ + position: absolute; /* 绝对定位 */ + top: 33px; /* 顶部位置 */ + left: 0px; /* 左侧位置 */ } .weixin-preview .weixin-header{ - text-align: center; - padding: 10px 0; - background-color: #616161; - color: #ffffff; + text-align: center; /* 文字居中对齐 */ + padding: 10px 0; /* 上下内边距 */ + background-color: #616161; /* 背景颜色 */ + color: #ffffff; /* 文字颜色 */ } .weixin-preview .weixin-menu { - position: absolute; - bottom: 0; - left: 0; - right: 0; - border-top: 1px solid #e7e7e7; - background-position: 0 0; - background-repeat: no-repeat; - margin-bottom: 0px; + position: absolute; /* 绝对定位 */ + bottom: 0; /* 底部位置 */ + left: 0; /* 左侧位置 */ + right: 0; /* 右侧位置 */ + border-top: 1px solid #e7e7e7; /* 上边框颜色和宽度 */ + background-position: 0 0; /* 背景图像位置 */ + background-repeat: no-repeat; /* 背景图像不重复 */ + margin-bottom: 0px; /* 底部外边距 */ } /*一级*/ .weixin-preview .weixin-menu .menu-item { - position: relative; - float: left; - line-height: 50px; - height: 50px; - text-align: center; - width: 33.33%; - border-left: 1px solid #e7e7e7; - cursor: pointer; - color: #616161; + position: relative; /* 相对定位 */ + float: left; /* 左浮动 */ + line-height: 50px; /* 行高 */ + height: 50px; /* 高度 */ + text-align: center; /* 文字居中对齐 */ + width: 33.33%; /* 宽度 */ + border-left: 1px solid #e7e7e7; /* 左边框颜色和宽度 */ + cursor: pointer; /* 鼠标指针变为手型 */ + color: #616161; /* 文字颜色 */ } /*二级*/ .weixin-preview .weixin-sub-menu { - position: absolute; - bottom: 60px; - left: 0; - right: 0; - border-top: 1px solid #d0d0d0; - margin-bottom: 0px; - background: #fafafa; - display: block; - padding: 0; + position: absolute; /* 绝对定位 */ + bottom: 60px; /* 底部位置 */ + left: 0; /* 左侧位置 */ + right: 0; /* 右侧位置 */ + border-top: 1px solid #d0d0d0; /* 上边框颜色和宽度 */ + margin-bottom: 0px; /* 底部外边距 */ + background: #fafafa; /* 背景颜色 */ + display: block; /* 块级显示 */ + padding: 0; /* 内边距 */ } .weixin-preview .weixin-sub-menu .menu-sub-item { - line-height: 50px; - height: 50px; - text-align: center; - width: 100%; - border: 1px solid #d0d0d0; - border-top-width: 0px; - cursor: pointer; - position: relative; - color: #616161; + line-height: 50px; /* 行高 */ + height: 50px; /* 高度 */ + text-align: center; /* 文字居中对齐 */ + width: 100%; /* 宽度 */ + border: 1px solid #d0d0d0; /* 边框颜色和宽度 */ + border-top-width: 0px; /* 顶部边框宽度 */ + cursor: pointer; /* 鼠标指针变为手型 */ + position: relative; /* 相对定位 */ + color: #616161; /* 文字颜色 */ } .weixin-preview .weixin-sub-menu .menu-sub-item.on-drag-over{ - border-top: 2px solid #44b549; + border-top: 2px solid #44b549; /* 顶部边框颜色和宽度 */ } .weixin-preview .menu-arrow { - position: absolute; - left: 50%; - margin-left: -6px; + position: absolute; /* 绝对定位 */ + left: 50%; /* 左侧位置 */ + margin-left: -6px; /* 左边距调整 */ } .weixin-preview .arrow_in { - bottom: -4px; - display: inline-block; - width: 0px; - height: 0px; - border-width: 6px 6px 0px; - border-style: solid dashed dashed; - border-color: #fafafa transparent transparent; + bottom: -4px; /* 底部位置 */ + display: inline-block; /* 行内块级显示 */ + width: 0px; /* 宽度 */ + height: 0px; /* 高度 */ + border-width: 6px 6px 0px; /* 边框宽度 */ + border-style: solid dashed dashed; /* 边框样式 */ + border-color: #fafafa transparent transparent; /* 边框颜色 */ } .weixin-preview .arrow_out { - bottom: -5px; - display: inline-block; - width: 0px; - height: 0px; - border-width: 6px 6px 0px; - border-style: solid dashed dashed; - border-color: #d0d0d0 transparent transparent; + bottom: -5px; /* 底部位置 */ + display: inline-block; /* 行内块级显示 */ + width: 0px; /* 宽度 */ + height: 0px; /* 高度 */ + border-width: 6px 6px 0px; /* 边框宽度 */ + border-style: solid dashed dashed; /* 边框样式 */ + border-color: #d0d0d0 transparent transparent; /* 边框颜色 */ } .weixin-preview .menu-item .menu-item-title, .weixin-preview .menu-sub-item .menu-item-title { - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - box-sizing: border-box; + width: 100%; /* 宽度 */ + overflow: hidden; /* 内容溢出时隐藏 */ + white-space: nowrap; /* 不换行 */ + text-overflow: ellipsis; /* 文本溢出时显示省略号 */ + box-sizing: border-box; /* 盒子模型为border-box */ } - .weixin-preview .menu-item.current, .weixin-preview .menu-sub-item.current { - border: 1px solid #44b549; - background: #fff; - color: #44b549; + border: 1px solid #44b549; /* 边框颜色和宽度 */ + background: #fff; /* 背景颜色 */ + color: #44b549; /* 文字颜色 */ } .weixin-preview .weixin-sub-menu.show { - display: block; + display: block; /* 块级显示 */ } .weixin-preview .icon_menu_dot { /* background: url(../images/index_z354723.png) 0px -36px no-repeat; */ - width: 7px; - height: 7px; - vertical-align: middle; - display: inline-block; - margin-right: 2px; - margin-top: -2px; + width: 7px; /* 宽度 */ + height: 7px; /* 高度 */ + vertical-align: middle; /* 垂直居中对齐 */ + display: inline-block; /* 行内块级显示 */ + margin-right: 2px; /* 右边距 */ + margin-top: -2px; /* 顶部外边距调整 */ } .weixin-preview .icon14_menu_add { /* background: url(../images/index_z354723.png) 0px 0px no-repeat; */ - width: 14px; - height: 14px; - vertical-align: middle; - display: inline-block; - margin-top: -2px; + width: 14px; /* 宽度 */ + height: 14px; /* 高度 */ + vertical-align: middle; /* 垂直居中对齐 */ + display: inline-block; /* 行内块级显示 */ + margin-top: -2px; /* 顶部外边距调整 */ } .weixin-preview li:hover .icon14_menu_add { @@ -169,197 +168,197 @@ } .weixin-preview .menu-item:hover { - color: #000; + color: #000; /* 文字颜色 */ } .weixin-preview .menu-sub-item:hover { - background: #eee; + background: #eee; /* 背景颜色 */ } .weixin-preview li.current:hover { - background: #fff; - color: #44b549; + background: #fff; /* 背景颜色 */ + color: #44b549; /* 文字颜色 */ } /*菜单内容*/ .weixin-menu-detail { - width: 600px; - padding: 0px 20px 5px; - background-color: #f4f5f9; - border: 1px solid #e7e7eb; - float: left; - min-height: 540px; + width: 600px; /* 宽度 */ + padding: 0px 20px 5px; /* 内边距 */ + background-color: #f4f5f9; /* 背景颜色 */ + border: 1px solid #e7e7eb; /* 边框颜色和宽度 */ + float: left; /* 左浮动 */ + min-height: 540px; /* 最小高度 */ } .weixin-menu-detail .menu-name { - float: left; - height: 40px; - line-height: 40px; - font-size: 18px; + float: left; /* 左浮动 */ + height: 40px; /* 高度 */ + line-height: 40px; /* 行高 */ + font-size: 18px; /* 字体大小 */ } .weixin-menu-detail .menu-del { - float: right; - height: 40px; - line-height: 40px; - color: #459ae9; - cursor: pointer; + float: right; /* 右浮动 */ + height: 40px; /* 高度 */ + line-height: 40px; /* 行高 */ + color: #459ae9; /* 文字颜色 */ + cursor: pointer; /* 鼠标指针变为手型 */ } .weixin-menu-detail .menu-input-group { - width: 540px; - margin: 10px 0 30px 0; - overflow: hidden; + width: 540px; /* 宽度 */ + margin: 10px 0 30px 0; /* 外边距 */ + overflow: hidden; /* 隐藏溢出的内容 */ } .weixin-menu-detail .menu-label { - float: left; - height: 30px; - line-height: 30px; - width: 80px; - text-align: right; + float: left; /* 左浮动 */ + height: 30px; /* 高度 */ + line-height: 30px; /* 行高 */ + width: 80px; /* 宽度 */ + text-align: right; /* 文字右对齐 */ } .weixin-menu-detail .menu-input { - float: left; - width: 380px + float: left; /* 左浮动 */ + width: 380px; /* 宽度 */ } .weixin-menu-detail .menu-input-text { - border: 0px; - outline: 0px; - background: #fff; - width: 300px; - padding: 5px 0px 5px 0px; - margin-left: 10px; - text-indent: 10px; - height: 35px; + border: 0px; /* 边框宽度 */ + outline: 0px; /* focus时的轮廓宽度 */ + background: #fff; /* 背景颜色 */ + width: 300px; /* 宽度 */ + padding: 5px 0px 5px 0px; /* 内边距 */ + margin-left: 10px; /* 左边距 */ + text-indent: 10px; /* text缩进 */ + height: 35px; /* 高度 */ } .weixin-menu-detail .menu-tips { - color: #8d8d8d; - padding-top: 4px; - margin: 0; + color: #8d8d8d; /* 文字颜色 */ + padding-top: 4px; /* top方向的内边距 */ + margin: 0; /* margin属性值设置为0 */ } .weixin-menu-detail .menu-tips.cursor { - color: #459ae9; - cursor: pointer; + color: #459ae9; /* 文字颜色 */ + cursor: pointer; /* mouse指针变为手型图标 */ } .weixin-menu-detail .menu-input .menu-tips { - margin: 0 0 0 10px; + margin: 0 0 0 10px; /* margin属性值设置为0,最后一个参数为10px */ } .weixin-menu-detail .menu-content { - padding: 16px 20px; - border: 1px solid #e7e7eb; - background-color: #fff; + padding: 16px 20px; /* Padding属性值设置为16px和20px */ + border: 1px solid #e7e7eb; /* Border属性值设置为1px和#e7e7eb颜色值 */ + background-color: #fff; /* background-color属性值设置为白色 */ } .weixin-menu-detail .menu-content .menu-input-group { - margin: 0px 0 10px 0; + margin: 0px 0 10px 0; /* margin属性值设置为0px,10px和0px */ } .weixin-menu-detail .menu-content .menu-label { - text-align: left; - width: 100px; + text-align: left; /* text对齐方式设置为左对齐 */ + width: 100px; /* width属性值设置为100px */ } .weixin-menu-detail .menu-content .menu-input-text { - border: 1px solid #e7e7eb; + border: 1px solid #e7e7eb; /* border属性值设置为1px和#e7e7eb颜色值 */ } .weixin-menu-detail .menu-content .menu-tips { - padding-bottom: 10px; + padding-bottom: 10px; /* bottom方向的内边距设置为10px */ } .weixin-menu-detail .menu-msg-content { - padding: 0; - border: 1px solid #e7e7eb; - background-color: #fff; + padding: 0; /* Padding属性值设置为0 */ + border: 1px solid #e7e7eb; /* Border属性值设置为1px和#e7e7eb颜色值 */ + background-color: #fff; /* background-color属性值设置为白色 */ } .weixin-menu-detail .menu-msg-content .menu-msg-head { - overflow: hidden; - border-bottom: 1px solid #e7e7eb; - line-height: 38px; - height: 38px; - padding: 0 20px; + overflow: hidden; /* Overflow属性值设置为hidden */ + border-bottom: 1px solid #e7e7eb; /* Border属性值设置为1px和#e7e7eb颜色值 */ + line-height: 38px; /* Line height属性值设置为38px */ + height: 38px; /* height属性值设置为38px */ + padding: 0 20px; /* Padding属性值设置为0和20px */ } .weixin-menu-detail .menu-msg-content .menu-msg-panel { - padding: 30px 50px; + padding: 30px 50px; /* Padding属性值设置为30px和50px */ } .weixin-menu-detail .menu-msg-content .menu-msg-select { - padding: 40px 20px; - border: 2px dotted #d9dadc; - text-align: center; + padding: 40px 20px; /* Padding属性值设置为40px和20px */ + border: 2px dotted #d9dadc; /* Border属性值设置为2px虚线和#d9dadc颜色值 */ + text-align: center; /* text对齐方式设置为居中对齐 */ } .weixin-menu-detail .menu-msg-content .menu-msg-select:hover { - border-color: #b3b3b3; + border-color: #b3b3b3; /* border颜色值设置为#b3b3b3 */ } .weixin-menu-detail .menu-msg-content strong { - display: block; - padding-top: 3px; - font-weight: 400; - font-style: normal; + display: block; /* Display属性值设置为block */ + padding-top: 3px; /* Top方向的内边距设置为3px */ + font-weight: 400; /* font weight属性值设置为400 */ + font-style: normal; /* font style属性值设置为normal */ } .weixin-menu-detail .menu-msg-content .menu-msg-title { - float: left; - width: 310px; - height: 30px; - line-height: 30px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + float: left; /* float属性值设置为left */ + width: 310px; /* width属性值设置为310px */ + height: 30px; /* height属性值设置为30px */ + line-height: 30px; /* line height属性值设置为30px */ + overflow: hidden; /* Overflow属性值设置为hidden */ + text-overflow: ellipsis; /* TextOverflow属性值设置为ellipsis */ + white-space: nowrap; /* WhiteSpace属性值设置为nowrap */ } .icon36_common { - width: 36px; - height: 36px; - vertical-align: middle; - display: inline-block; + width: 36px; /* width属性值设置为36px */ + height: 36px; /* height属性值设置为36px */ + vertical-align: middle; /* vertical align属性值设置为middle */ + display: inline-block; /* Display属性值设置为inline block */ } .icon_msg_sender { - margin-right: 3px; - margin-top: -2px; - width: 20px; - height: 20px; - vertical-align: middle; - display: inline-block; + margin-right: 3px; /* Right方向的外边距设置为3px */ + margin-top: -2px; /* Top方向的外边距设置为负2px */ + width: 20px; /* width属性值设置为20px */ + height: 20px; /* height属性值设置为20px */ + vertical-align: middle; /* vertical align属性值设置为middle */ + display: inline-block; /* Display属性值设置为inline block */ /* background: url(../images/msg_tab_z25df2d.png) 0 -270px no-repeat; */ } .weixin-btn-group { - text-align: center; - width: 100%; - margin: 30px 0px; - overflow: hidden; + text-align: center; /* text对齐方式设置为居中对齐 */ + width: 100%; /* width属性值设置为100% */ + margin: 30px 0px; /* margin属性值设置为30px和0px */ + overflow: hidden; /* Overflow属性值设置为hidden */ } .weixin-btn-group .btn { - width: 100px; - border-radius: 0px; + width: 100px; /* width属性值设置为100px */ + border-radius: 0px; /* border radius属性值设置为0px */ } #material-list { - padding: 20px; - overflow-y: scroll; - height: 558px; + padding: 20px; /* Padding属性值设置为20px */ + overflow-y: scroll; /* Overflow y属性值设置为scroll,使内容可滚动 */ + height: 558px; /* height属性值设置为558px */ } #news-list { - padding: 20px; - overflow-y: scroll; - height: 558px; + padding: 20px; /* Padding属性值设置为20px */ + overflow-y: scroll; /* Overflow y属性值设置为scroll,使内容可滚动 */ + height: 558px; /* height属性值设置为558px */ } #material-list table { - width: 100%; + width: 100%; /* width属性值设置为100% */ } diff --git a/src/assets/scss/_base.scss b/src/assets/scss/_base.scss index 366d5566..ae77ce0f 100644 --- a/src/assets/scss/_base.scss +++ b/src/assets/scss/_base.scss @@ -1,9 +1,11 @@ +/* 设置所有元素和伪元素的 box-sizing 为 border-box */ *, *:before, *:after { box-sizing: border-box; } +/* 设置 body 的字体、大小、行高和颜色 */ body { font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-size: 14px; @@ -12,10 +14,12 @@ body { background-color: #fff; } +/* 设置链接的颜色和文本装饰 */ a { - color: mix(#fff, $--color-primary, 20%); - text-decoration: none; + color: mix(#fff, $--color-primary, 20%); /* 使用混合色函数设置颜色 */ + text-decoration: none; /* 去掉下划线 */ + /* 当链接获得焦点或悬停时,改变颜色并添加下划线 */ &:focus, &:hover { color: $--color-primary; @@ -23,97 +27,104 @@ a { } } +/* 设置图片垂直对齐方式为中间 */ img { vertical-align: middle; } - /* Utils ------------------------------ */ +/* 清除浮动工具类 */ .clearfix:before, .clearfix:after { - content: " "; - display: table; + content: " "; /* 生成内容以触发 clearfix */ + display: table; /* 设置为表格布局 */ } .clearfix:after { - clear: both; + clear: both; /* 清除浮动 */ } - /* Animation ------------------------------ */ +/* 淡入淡出动画过渡效果 */ .fade-enter-active, .fade-leave-active { - transition: opacity .5s; + transition: opacity .5s; /* 设置透明度变化的过渡时间 */ } .fade-enter, .fade-leave-to { - opacity: 0; + opacity: 0; /* 初始透明度为 0 */ } - /* Reset element-ui ------------------------------ */ +/* 重置 element-ui 样式 */ .site-wrapper { .el-pagination { - margin-top: 15px; - text-align: right; + margin-top: 15px; /* 设置分页组件的上边距 */ + text-align: right; /* 设置分页组件的文本对齐方式 */ } } - /* Layout ------------------------------ */ +/* 设置布局相关样式 */ .site-wrapper { - position: relative; - min-width: 1180px; + position: relative; /* 相对定位 */ + min-width: 1180px; /* 最小宽度 */ } - /* Sidebar fold ------------------------------ */ +/* 侧边栏折叠样式 */ .site-sidebar--fold { + /* 设置导航栏头部、品牌、侧边栏及其内部元素的宽度 */ .site-navbar__header, .site-navbar__brand, .site-sidebar, .site-sidebar__inner, .el-menu.site-sidebar__menu { - width: 64px; + width: 64px; /* 宽度为 64px */ } + /* 设置导航栏主体和内容包装器的左边距 */ .site-navbar__body, .site-content__wrapper { - margin-left: 64px; + margin-left: 64px; /* 左边距为 64px */ } + /* 设置品牌图标在不同状态下的显示方式 */ .site-navbar__brand { &-lg { - display: none; + display: none; /* 大尺寸时隐藏 */ } &-mini { - display: inline-block; + display: inline-block; /* 小尺寸时内联显示 */ } } + /* 设置侧边栏和其内部元素的溢出处理 */ .site-sidebar, .site-sidebar__inner { - overflow: initial; + overflow: initial; /* 初始溢出处理 */ } + /* 设置侧边栏菜单图标的右边距和字体大小 */ .site-sidebar__menu-icon { - margin-right: 0; - font-size: 20px; + margin-right: 0; /* 右边距为 0 */ + font-size: 20px; /* 字体大小为 20px */ } + /* 设置标签页内容的左边距 */ .site-content--tabs > .el-tabs > .el-tabs__header { - left: 64px; + left: 64px; /* 左边距为 64px */ } } -// animation +//* animation */ .site-navbar__header, .site-navbar__brand, .site-navbar__body, @@ -123,154 +134,154 @@ img { .site-sidebar__menu-icon, .site-content__wrapper, .site-content--tabs > .el-tabs .el-tabs__header { + // 设置过渡效果,包括内联块、左边距、宽度、左边距和字体大小的变化 transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s; } - -/* Navbar ------------------------------- */ +/* Navbar */ .site-navbar { + // 固定定位在顶部 position: fixed; top: 0; right: 0; left: 0; - z-index: 1030; - height: 50px; - box-shadow: 0 2px 4px rgba(0, 0, 0, .08); - background-color: $navbar--background-color; + z-index: 1030; // 设置层级 + height: 50px; // 高度为50px + box-shadow: 0 2px 4px rgba(0, 0, 0, .08); // 阴影效果 + background-color: $navbar--background-color; // 背景颜色变量 &--inverse { .site-navbar__body { - background-color: transparent; + background-color: transparent; // 透明背景 } .el-menu { > .el-menu-item, > .el-submenu > .el-submenu__title { - color: #fff; + color: #fff; // 白色文字 &:focus, &:hover { - color: #fff; - background-color: mix(#000, $navbar--background-color, 15%); + color: #fff; // 悬停时保持白色 + background-color: mix(#000, $navbar--background-color, 15%); // 混合背景色 } } > .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title { - border-bottom-color: mix(#fff, $navbar--background-color, 85%); + border-bottom-color: mix(#fff, $navbar--background-color, 85%); // 活动项边框颜色 } .el-menu-item i, .el-submenu__title i, .el-dropdown { - color: #fff; + color: #fff; // 图标和下拉菜单白色 } } .el-menu--popup-bottom-start { - background-color: $navbar--background-color; + background-color: $navbar--background-color; // 弹出菜单背景色 } } &__header { - position: relative; - float: left; - width: 230px; - height: 50px; - overflow: hidden; + position: relative; // 相对定位 + float: left; // 左浮动 + width: 230px; // 宽度230px + height: 50px; // 高度50px + overflow: hidden; // 隐藏溢出内容 } &__brand { - display: table-cell; - vertical-align: middle; - width: 230px; - height: 50px; - margin: 0; - line-height: 50px; - font-size: 20px; - text-align: center; - text-transform: uppercase; - white-space: nowrap; - color: #fff; + display: table-cell; // 表格单元格显示 + vertical-align: middle; // 垂直居中 + width: 230px; // 宽度230px + height: 50px; // 高度50px + margin: 0; // 无外边距 + line-height: 50px; // 行高50px + font-size: 20px; // 字体大小20px + text-align: center; // 文本居中 + text-transform: uppercase; // 大写转换 + white-space: nowrap; // 不换行 + color: #fff; // 白色文字 &-lg, &-mini { - margin: 0 5px; - color: #fff; + margin: 0 5px; // 左右边距5px + color: #fff; // 白色文字 &:focus, &:hover { - color: #fff; - text-decoration: none; + color: #fff; // 悬停时保持白色 + text-decoration: none; // 无下划线 } } &-mini { - display: none; + display: none; // 隐藏小尺寸品牌标志 } } &__switch { - font-size: 18px; - border-bottom: none !important; + font-size: 18px; // 字体大小18px + border-bottom: none !important; // 取消底部边框 } &__avatar { - border-bottom: none !important; + border-bottom: none !important; // 取消底部边框 * { - vertical-align: inherit; + vertical-align: inherit; // 继承垂直对齐方式 } .el-dropdown-link { > img { - width: 36px; - height: auto; - margin-right: 5px; - border-radius: 100%; - vertical-align: middle; + width: 36px; // 图片宽度36px + height: auto; // 自动高度 + margin-right: 5px; // 右边距5px + border-radius: 100%; // 圆形边框 + vertical-align: middle; // 垂直居中对齐 } } } &__body { - position: relative; - margin-left: 230px; - padding-right: 15px; - background-color: #fff; + position: relative; // 相对定位 + margin-left: 230px; // 左边距230px + padding-right: 15px; // 右边内边距15px + background-color: #fff; // 白色背景 } &__menu { - float: left; - background-color: transparent; - border-bottom: 0; + float: left; // 左浮动 + background-color: transparent; // 透明背景 + border-bottom: 0; // 无底部边框 &--right { - float: right; + float: right; // 右浮动 } a:focus, a:hover { - text-decoration: none; + text-decoration: none; // 无下划线 } .el-menu-item, .el-submenu > .el-submenu__title { - height: 50px; - line-height: 50px; + height: 50px; // 高度50px + line-height: 50px; // 行高50px } .el-submenu > .el-menu { - top: 55px; + top: 55px; // 上偏移55px } .el-badge { - display: inline; - z-index: 2; + display: inline; // 内联显示 + z-index: 2; // z轴索引2 &__content { - line-height: 16px; + line-height: 16px; // 行高16px } } } @@ -280,124 +291,123 @@ img { /* Sidebar ------------------------------ */ .site-sidebar { - position: fixed; - top: 50px; - left: 0; - bottom: 0; - z-index: 1020; - width: 230px; - overflow: hidden; + position: fixed; // 固定定位 + top: 50px; // 距离顶部50px + left: 0; // 左边距为0 + bottom: 0; // 底部对齐 + z-index: 1020; // z轴索引 + width: 230px; // 宽度230px + overflow: hidden; // 隐藏溢出内容 &--dark, &--dark-popper { - background-color: $sidebar--background-color-dark; + background-color: $sidebar--background-color-dark; // 背景颜色 .site-sidebar__menu.el-menu, > .el-menu--popup { - background-color: $sidebar--background-color-dark; + background-color: $sidebar--background-color-dark; // 菜单背景颜色 .el-menu-item, .el-submenu > .el-submenu__title { - color: $sidebar--color-text-dark; + color: $sidebar--color-text-dark; // 文字颜色 &:focus, &:hover { - color: mix(#fff, $sidebar--color-text-dark, 50%); - background-color: mix(#fff, $sidebar--background-color-dark, 2.5%); + color: mix(#fff, $sidebar--color-text-dark, 50%); // 悬停时的文字颜色 + background-color: mix(#fff, $sidebar--background-color-dark, 2.5%); // 悬停时的背景颜色 } } .el-menu, .el-submenu.is-opened { - background-color: mix(#000, $sidebar--background-color-dark, 15%); + background-color: mix(#000, $sidebar--background-color-dark, 15%); // 打开的子菜单背景颜色 } .el-menu-item.is-active, .el-submenu.is-active > .el-submenu__title { - color: mix(#fff, $sidebar--color-text-dark, 80%); + color: mix(#fff, $sidebar--color-text-dark, 80%); // 激活项的颜色 } } } &__inner { - position: relative; - z-index: 1; - width: 250px; - height: 100%; - padding-bottom: 15px; - overflow-y: scroll; + position: relative; // 相对定位 + z-index: 1; // z轴索引 + width: 250px; // 宽度250px + height: 100%; // 高度100% + padding-bottom: 15px; // 底部内边距15px + overflow-y: scroll; // y轴滚动条 } &__menu.el-menu { - width: 230px; - border-right: 0; + width: 230px; // 菜单宽度230px + border-right: 0; // 无右边框 } &__menu-icon { - width: 24px; - margin-right: 5px; - text-align: center; - font-size: 16px; - color: inherit !important; + width: 24px; // 图标宽度24px + margin-right: 5px; // 右边距5px + text-align: center; // 文本居中 + font-size: 16px; // 字体大小16px + color: inherit !important; // 继承父元素颜色,并强制生效 } } - /* Content ------------------------------ */ .site-content { - position: relative; - padding: 15px; + position: relative; // 相对定位 + padding: 15px; // 内边距15px &__wrapper { - position: relative; - padding-top: 50px; - margin-left: 230px; - min-height: 100%; - background: $content--background-color; + position: relative; // 相对定位 + padding-top: 50px; // 顶部内边距50px + margin-left: 230px; // 左边距230px + min-height: 100%; // 最小高度100% + background: $content--background-color; // 背景颜色 } &--tabs { - padding: 55px 0 0; + padding: 55px 0 0; // 上内边距55px,左右为0,下内边距为0 } > .el-tabs { > .el-tabs__header { - position: fixed; - top: 50px; - left: 230px; - right: 0; - z-index: 930; - padding: 0 55px 0 15px; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04); - background-color: #fff; + position: fixed; // 固定定位 + top: 50px; // 距离顶部50px + left: 230px; // 左边距230px + right: 0; // 右边距为0 + z-index: 930; // z轴索引 + padding: 0 55px 0 15px; // 内边距 + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04); // 阴影效果 + background-color: #fff; // 背景颜色白色 > .el-tabs__nav-wrap { - margin-bottom: 0; + margin-bottom: 0; // 底部外边距为0 &:after { - display: none; + display: none; // 隐藏伪元素 } } } > .el-tabs__content { - padding: 0 15px 15px; + padding: 0 15px 15px; // 内边距 > .site-tabs__tools { - position: fixed; - top: 50px; - right: 0; - z-index: 931; - height: 40px; - padding: 0 12px; - font-size: 16px; - line-height: 40px; - background-color: $content--background-color; - cursor: pointer; + position: fixed; // 固定定位 + top: 50px; // 距离顶部50px + right: 0; // 右边距为0 + z-index: 931; // z轴索引 + height: 40px; // 高度40px + padding: 0 12px; // 内边距 + font-size: 16px; // 字体大小16px + line-height: 40px; // 行高40px + background-color: $content--background-color; // 背景颜色 + cursor: pointer; // 鼠标指针样式为指针 .el-icon--right { - margin-left: 0; + margin-left: 0; // 左边距为0 } } } @@ -405,8 +415,8 @@ img { } .el-table__expand-icon { - display: inline-block; - width: 14px; - vertical-align: middle; - margin-right: 5px; + display: inline-block; // 内联块级元素 + width: 14px; // 宽度14px + vertical-align: middle; // 垂直居中对齐 + margin-right: 5px; // 右边距5px } diff --git a/src/assets/scss/_normalize.scss b/src/assets/scss/_normalize.scss index 1dddea42..1bf93208 100644 --- a/src/assets/scss/_normalize.scss +++ b/src/assets/scss/_normalize.scss @@ -1,12 +1,11 @@ /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ -/* Document - ========================================================================== */ +//* Document +========================================================================== */ /** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. + * 1. 修正所有浏览器中的行高。 + * 2. 防止在 Windows Phone 和 iOS 上的 IE 中调整字体大小。 */ html { @@ -19,7 +18,7 @@ html { ========================================================================== */ /** - * Remove the margin in all browsers (opinionated). + * 在所有浏览器中移除边距(有意见)。 */ body { @@ -27,7 +26,7 @@ body { } /** - * Add the correct display in IE 9-. + * 在 IE 9- 中添加正确的显示方式。 */ article, @@ -40,8 +39,7 @@ section { } /** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. + * 在 Chrome、Firefox 和 Safari 中修正 `h1` 元素在 `section` 和 `article` 上下文中的字体大小和外边距。 */ h1 { @@ -53,8 +51,8 @@ h1 { ========================================================================== */ /** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. + * 在 IE 9- 中添加正确的显示方式。 + * 1. 在 IE 中添加正确的显示方式。 */ figcaption, @@ -64,7 +62,7 @@ main { /* 1 */ } /** - * Add the correct margin in IE 8. + * 在 IE 8 中添加正确的外边距。 */ figure { @@ -72,8 +70,8 @@ figure { } /** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. + * 1. 在 Firefox 中添加正确的盒模型。 + * 2. 在 Edge 和 IE 中显示溢出内容。 */ hr { @@ -83,8 +81,8 @@ hr { } /** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. + * 1. 修正所有浏览器中的字体大小继承和缩放。 + * 2. 修正所有浏览器中的奇数 `em` 字体大小。 */ pre { @@ -96,8 +94,8 @@ pre { ========================================================================== */ /** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + * 1. 在 IE 10 中移除活动链接的灰色背景。 + * 2. 移除 iOS 8+ 和 Safari 8+ 下链接下划线中的间隙。 */ a { @@ -106,8 +104,8 @@ a { } /** - * 1. Remove the bottom border in Chrome 57- and Firefox 39-. - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + * 1. 在 Chrome 57- 和 Firefox 39- 中移除底部边框。 + * 2. 在 Chrome、Edge、IE、Opera 和 Safari 中添加正确的文本装饰。 */ abbr[title] { @@ -117,7 +115,7 @@ abbr[title] { } /** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + * 防止在 Safari 6 中通过下一个规则重复应用 `bolder`。 */ b, @@ -126,7 +124,7 @@ strong { } /** - * Add the correct font weight in Chrome, Edge, and Safari. + * 在 Chrome、Edge 和 Safari 中添加正确的字体粗细。 */ b, @@ -135,8 +133,8 @@ strong { } /** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. + * 1. 修正所有浏览器中的字体大小继承和缩放。 + * 2. 修正所有浏览器中的奇数 `em` 字体大小。 */ code, @@ -147,7 +145,7 @@ samp { } /** - * Add the correct font style in Android 4.3-. + * 在 Android 4.3- 中添加正确的字体样式。 */ dfn { @@ -155,7 +153,7 @@ dfn { } /** - * Add the correct background and color in IE 9-. + * 在 IE 9- 中添加正确的背景颜色和文字颜色。 */ mark { @@ -164,7 +162,7 @@ mark { } /** - * Add the correct font size in all browsers. + * 在所有浏览器中添加正确的字体大小。 */ small { @@ -172,8 +170,7 @@ small { } /** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. + * 防止 `sub` 和 `sup` 元素影响所有浏览器中的行高。 */ sub, @@ -196,7 +193,7 @@ sup { ========================================================================== */ /** - * Add the correct display in IE 9-. + * 在 IE 9- 中添加正确的显示方式。 */ audio, @@ -205,7 +202,7 @@ video { } /** - * Add the correct display in iOS 4-7. + * 在 iOS 4-7 中添加正确的显示方式。 */ audio:not([controls]) { @@ -214,7 +211,7 @@ audio:not([controls]) { } /** - * Remove the border on images inside links in IE 10-. + * 移除 IE 10- 中链接内图片的边框。 */ img { @@ -222,19 +219,20 @@ img { } /** - * Hide the overflow in IE. + * 隐藏 IE 中的溢出内容。 */ svg:not(:root) { overflow: hidden; } + /* Forms ========================================================================== */ /** - * 1. Change the font styles in all browsers (opinionated). - * 2. Remove the margin in Firefox and Safari. + * 1. 改变所有浏览器中的字体样式(带有主观意见)。 + * 2. 移除 Firefox 和 Safari 中的外边距。 */ button, @@ -249,8 +247,8 @@ textarea { } /** - * Show the overflow in IE. - * 1. Show the overflow in Edge. + * 在 IE 中显示溢出。 + * 1. 在 Edge 中显示溢出。 */ button, @@ -259,8 +257,8 @@ input { /* 1 */ } /** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. + * 移除 Edge、Firefox 和 IE 中文本变换的继承。 + * 1. 移除 Firefox 中文本变换的继承。 */ button, @@ -269,9 +267,8 @@ select { /* 1 */ } /** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. + * 1. 防止 WebKit 的一个 bug,该 bug 会破坏 Android 4 中原生的 `audio` 和 `video` 控件。 + * 2. 修正 iOS 和 Safari 中无法为可点击类型添加样式的问题。 */ button, @@ -282,7 +279,7 @@ html [type="button"], /* 1 */ } /** - * Remove the inner border and padding in Firefox. + * 移除 Firefox 中的内边框和填充。 */ button::-moz-focus-inner, @@ -294,7 +291,7 @@ button::-moz-focus-inner, } /** - * Restore the focus styles unset by the previous rule. + * 恢复上一个规则取消的焦点样式。 */ button:-moz-focusring, @@ -305,7 +302,7 @@ button:-moz-focusring, } /** - * Correct the padding in Firefox. + * 修正 Firefox 中的填充。 */ fieldset { @@ -313,10 +310,9 @@ fieldset { } /** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. + * 1. 修正 Edge 和 IE 中的文本换行。 + * 2. 修正 IE 中从 `fieldset` 元素继承颜色。 + * 3. 移除填充以避免在所有浏览器中将 `fieldset` 元素的填充设为零时开发者被误导。 */ legend { @@ -329,8 +325,8 @@ legend { } /** - * 1. Add the correct display in IE 9-. - * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + * 1. 在 IE 9+ 中添加正确的显示。 + * 2. 在 Chrome、Firefox 和 Opera 中添加正确的垂直对齐。 */ progress { @@ -339,7 +335,7 @@ progress { } /** - * Remove the default vertical scrollbar in IE. + * 移除 IE 中的默认垂直滚动条。 */ textarea { @@ -347,8 +343,8 @@ textarea { } /** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. + * 1. 在 IE 10+ 中添加正确的盒子大小。 + * 2. 移除 IE 10+ 中的填充。 */ [type="checkbox"], @@ -358,7 +354,7 @@ textarea { } /** - * Correct the cursor style of increment and decrement buttons in Chrome. + * 修正 Chrome 中增减按钮的光标样式。 */ [type="number"]::-webkit-inner-spin-button, @@ -367,8 +363,8 @@ textarea { } /** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. + * 1. 修正 Chrome 和 Safari 中的异常外观。 + * 2. 修正 Safari 中的轮廓样式。 */ [type="search"] { @@ -377,7 +373,7 @@ textarea { } /** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + * 移除 Chrome 和 Safari on macOS 中的内部填充和取消按钮。 */ [type="search"]::-webkit-search-cancel-button, @@ -386,8 +382,8 @@ textarea { } /** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. + * 1. 修正 iOS 和 Safari 中无法为可点击类型添加样式的问题。 + * 2. 更改 Safari 中的字体属性为 `inherit`。 */ ::-webkit-file-upload-button { @@ -399,8 +395,8 @@ textarea { ========================================================================== */ /* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. + * 添加 IE 9+ 中的正确显示。 + * 1. 在 Edge、IE 和 Firefox 中添加正确显示。 */ details, /* 1 */ @@ -409,7 +405,7 @@ menu { } /* - * Add the correct display in all browsers. + * 在所有浏览器中添加正确显示。 */ summary { @@ -420,7 +416,7 @@ summary { ========================================================================== */ /** - * Add the correct display in IE 9-. + * 添加 IE 9+ 中的正确显示。 */ canvas { @@ -428,7 +424,7 @@ canvas { } /** - * Add the correct display in IE. + * 添加 IE 中的正确显示。 */ template { @@ -439,9 +435,9 @@ template { ========================================================================== */ /** - * Add the correct display in IE 10-. + * 添加 IE 10+ 中的正确显示。 */ [hidden] { display: none; -} \ No newline at end of file +} diff --git a/src/assets/scss/_variables.scss b/src/assets/scss/_variables.scss index b136ceec..5cdcb885 100644 --- a/src/assets/scss/_variables.scss +++ b/src/assets/scss/_variables.scss @@ -3,11 +3,15 @@ $--color-primary: #409EFF; // Navbar +// 设置导航栏背景颜色为站点主色 $navbar--background-color: $--color-primary; // Sidebar +// 设置侧边栏深色背景颜色 $sidebar--background-color-dark: #263238; +// 设置侧边栏深色文字颜色 $sidebar--color-text-dark: #8a979e; // Content +// 设置内容区域背景颜色 $content--background-color: #f1f4f5; diff --git a/src/assets/scss/index.scss b/src/assets/scss/index.scss index 0336d9aa..04907bb3 100644 --- a/src/assets/scss/index.scss +++ b/src/assets/scss/index.scss @@ -1,5 +1,7 @@ @import "normalize"; +// 导入normalize.css,用于标准化浏览器的默认样式 // api: https://github.com/necolas/normalize.css/ @import "variables"; -// 站点变量 +// 导入站点变量,定义项目中使用的全局变量 @import "base"; +// 导入基础样式,定义项目的通用样式规则 diff --git a/src/components/icon-svg/index.vue b/src/components/icon-svg/index.vue index 6d09ba00..5d1c9043 100644 --- a/src/components/icon-svg/index.vue +++ b/src/components/icon-svg/index.vue @@ -1,36 +1,40 @@ diff --git a/src/components/table-tree-column/index.vue b/src/components/table-tree-column/index.vue index e8dd534c..f26f7573 100644 --- a/src/components/table-tree-column/index.vue +++ b/src/components/table-tree-column/index.vue @@ -1,7 +1,11 @@