diff --git a/front-end/mall4v/src/App.vue b/front-end/mall4v/src/App.vue index 964ca7f..67a2a2c 100644 --- a/front-end/mall4v/src/App.vue +++ b/front-end/mall4v/src/App.vue @@ -1,12 +1,18 @@ + diff --git a/front-end/mall4v/src/assets/app.scss b/front-end/mall4v/src/assets/app.scss index 48d5832..8ad03c9 100644 --- a/front-end/mall4v/src/assets/app.scss +++ b/front-end/mall4v/src/assets/app.scss @@ -1,26 +1,31 @@ // 商品卡片信息的名称删除按钮组 -.card-prod-info-btn{ - font-size: 14px; - .prod-name{ - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - padding: 0 8px; +.card-prod-info-btn { + font-size: 14px; // 设置整个容器的基础字体大小为14像素 + + .prod-name { // 商品名称样式 + white-space: nowrap; // 强制在同一行内显示文本,不进行换行 + text-overflow: ellipsis; // 当文本溢出其容器时,用省略号(...)表示被截断的文本 + overflow: hidden; // 隐藏溢出容器的内容,与text-overflow配合使用以实现文本截断效果 + padding: 0 8px; // 为商品名称添加左右各8像素的内边距,使其与容器边缘保持适当距离 } - .del-btn{ - line-height: 20px; - text-align: right; - padding-right: 8px; - user-select: none; - span{ - color: #155bd4; - cursor: pointer; - &:hover{ - opacity: 0.8; + + .del-btn { // 删除按钮样式 + line-height: 20px; // 设置行高为20像素,确保按钮内的文本垂直居中对齐 + text-align: right; // 文本右对齐,使删除图标或文字靠右显示 + padding-right: 8px; // 为删除按钮右侧添加8像素的内边距,保证与其他元素有足够的间距 + user-select: none; // 禁止用户选中文本,改善用户体验,特别是对于交互性元素 + + span { // 删除按钮内部span标签的样式 + color: #155bd4; // 设置删除按钮文本颜色为蓝色,用于指示可点击状态 + cursor: pointer; // 更改鼠标指针为手型,提示用户该元素是可交互的 + + &:hover { // 当鼠标悬停在删除按钮上时 + opacity: 0.8; // 减少不透明度到80%,提供视觉反馈,表明元素处于悬停状态 } - &.disabled{ - opacity: 0.6; - cursor: not-allowed; + + &.disabled { // 当删除按钮具有.disabled类时(即禁用状态) + opacity: 0.6; // 进一步降低不透明度到60%,表示按钮不可用 + cursor: not-allowed; // 改变鼠标指针为禁止符号,明确传达按钮不可点击的状态 } } } diff --git a/front-end/mall4v/src/assets/scss/_base.scss b/front-end/mall4v/src/assets/scss/_base.scss index f2dde4d..68784ed 100644 --- a/front-end/mall4v/src/assets/scss/_base.scss +++ b/front-end/mall4v/src/assets/scss/_base.scss @@ -1,114 +1,110 @@ +/* 全局样式 */ +/* 设置所有元素及其伪元素的盒模型为包含padding和border */ *, *: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; - line-height: 1.15; - color: #303133; - background-color: #fff; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; /* 设置全局字体 */ + font-size: 14px; /* 默认字体大小 */ + line-height: 1.15; /* 行高 */ + color: #303133; /* 文字颜色 */ + background-color: #fff; /* 背景颜色 */ } + +/* 设置链接的基础样式 */ a { - color: mix(#fff, $--color-primary, 20%); - text-decoration: none; + color: mix(#fff, $--color-primary, 20%); /* 使用Sass混合函数设置链接颜色 */ + text-decoration: none; /* 移除默认下划线 */ + &:focus, - &:hover { - color: $--color-primary; - text-decoration: underline; + &:hover { /* 当链接被聚焦或悬停时 */ + color: $--color-primary; /* 改变链接颜色 */ + text-decoration: underline; /* 添加下划线 */ } } + +/* 设置图片的基础样式 */ img { - vertical-align: middle; - max-width: 100%; + vertical-align: middle; /* 图片垂直对齐方式 */ + max-width: 100%; /* 确保图片不会超出容器宽度 */ } -.el-cascader-menu { - .el-scrollbar__wrap { - overflow-y: auto !important; - width: 100% !important; - margin: 0 !important; - overflow: auto !important; - } +/* 修改Element UI级联菜单滚动条的行为 */ +.el-cascader-menu .el-scrollbar__wrap { + overflow-y: auto !important; /* 确保Y轴可以滚动 */ + width: 100% !important; /* 滚动内容占据全部宽度 */ + margin: 0 !important; /* 移除默认边距 */ + overflow: auto !important; /* 确保溢出内容可见 */ } -/* Utils ------------------------------- */ +/* 清除浮动 */ .clearfix:before, .clearfix:after { content: " "; 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; /* 初始和结束状态透明度 */ } - -/* Reset element-ui ------------------------------- */ -.site-wrapper { - .el-pagination { - text-align: right; - } +/* 重置Element UI分页组件的文本对齐 */ +.site-wrapper .el-pagination { + 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; /* 折叠后的宽度 */ } .site-navbar__body, .site-content__wrapper { - margin-left: 64px; + margin-left: 64px; /* 折叠后内容区的左边距 */ } - .site-navbar__brand { - &-lg { - display: none; - } - &-mini { - display: inline-block; - } + .site-navbar__brand-lg { + display: none; /* 隐藏大尺寸品牌标志 */ + } + .site-navbar__brand-mini { + 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; /* 移除右边距 */ + font-size: 20px; /* 字体大小 */ } .site-content--tabs > .el-tabs > .el-tabs__header { - left: 64px; + left: 64px; /* 标签头部左侧位置 */ } } -// animation + +/* 侧边栏、导航栏等元素在切换时添加动画效果 */ .site-navbar__header, .site-navbar__brand, .site-navbar__body, @@ -118,48 +114,46 @@ 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; + transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s; /* 动画过渡 */ } - -/* Navbar ------------------------------- */ +/* 导航栏样式 */ .site-navbar { - position: fixed; + 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; /* 高度 */ + box-shadow: 0 2px 4px rgba(0, 0, 0, .08); /* 阴影效果 */ + background-color: $navbar--background-color; /* 背景颜色 */ - &--inverse { + &--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; /* 下拉菜单背景 */ } } @@ -168,7 +162,7 @@ img { float: left; width: 230px; height: 50px; - overflow: hidden; + overflow: hidden; /* 导航栏头部 */ } &__brand { display: table-cell; @@ -181,7 +175,7 @@ img { text-align: center; text-transform: uppercase; white-space: nowrap; - color: #fff; + color: #fff; /* 品牌名称颜色 */ &-lg, &-mini { @@ -194,12 +188,12 @@ img { } } &-mini { - display: none; + display: none; /* 默认隐藏迷你品牌 */ } } &__switch { font-size: 18px; - border-bottom: none !important; + border-bottom: none !important; /* 移除底部边框 */ } &__avatar { border-bottom: none !important; @@ -220,7 +214,7 @@ img { position: relative; margin-left: 230px; padding-right: 15px; - background-color: #fff; + background-color: #fff; /* 导航栏主体背景 */ } &__menu { float: left; @@ -228,7 +222,7 @@ img { border-bottom: 0; &--right { - float: right; + float: right; /* 右对齐 */ } a:focus, a:hover { @@ -252,9 +246,7 @@ img { } } - -/* Sidebar ------------------------------- */ +/* 侧边栏样式 */ .site-sidebar { position: fixed; top: 50px; @@ -266,7 +258,7 @@ img { &--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; @@ -310,9 +302,7 @@ img { } } - -/* Content ------------------------------- */ +/* 内容区样式 */ .site-content { position: relative; padding: 15px; @@ -365,6 +355,7 @@ img { } } -.element-error-message-zindex{ - z-index:3000 !important; +/* 提升错误信息的层级 */ +.element-error-message-zindex { + z-index: 3000 !important; /* 确保错误信息显示在其他元素之上 */ } diff --git a/front-end/mall4v/src/assets/scss/_normalize.scss b/front-end/mall4v/src/assets/scss/_normalize.scss index 9bb2529..13e3319 100644 --- a/front-end/mall4v/src/assets/scss/_normalize.scss +++ b/front-end/mall4v/src/assets/scss/_normalize.scss @@ -2,14 +2,11 @@ /* 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 的 IE 和 iOS 中发生方向变化后字体大小调整。 */ - - html { +html { line-height: 1.15; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ @@ -17,19 +14,16 @@ /* Sections ========================================================================== */ - /** - * Remove the margin in all browsers (opinionated). + * 移除所有浏览器中的 body 边距(这是作者的意见)。 */ - body { margin: 0; } /** - * Add the correct display in IE 9-. + * 在 IE 9- 中正确显示这些 HTML5 元素。 */ - article, aside, footer, @@ -40,10 +34,8 @@ 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 { font-size: 2em; margin: 0.67em 0; @@ -51,12 +43,9 @@ h1 { /* Grouping content ========================================================================== */ - /** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. + * 1. 在 IE 9- 中正确显示这些元素。 */ - figcaption, figure, main { /* 1 */ @@ -64,18 +53,16 @@ main { /* 1 */ } /** - * Add the correct margin in IE 8. + * 在 IE 8 中正确设置 figure 的边距。 */ - figure { margin: 1em 40px; } /** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. + * 1. 在 Firefox 中正确设置 hr 的盒模型。 + * 2. 在 Edge 和 IE 中显示溢出内容。 */ - hr { box-sizing: content-box; /* 1 */ height: 0; /* 1 */ @@ -83,10 +70,9 @@ 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 { font-family: monospace, monospace; /* 1 */ font-size: 1em; /* 2 */ @@ -94,22 +80,19 @@ pre { /* Text-level semantics ========================================================================== */ - /** - * 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 { background-color: transparent; /* 1 */ -webkit-text-decoration-skip: objects; /* 2 */ } /** - * 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- 中 h1 下方的边框。 + * 2. 在 Chrome, Edge, IE, Opera, 和 Safari 中添加正确的文本装饰。 */ - abbr[title] { border-bottom: none; /* 1 */ text-decoration: underline; /* 2 */ @@ -117,28 +100,25 @@ abbr[title] { } /** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + * 防止 Safari 6 中 `bolder` 样式的重复应用。 */ - b, strong { font-weight: inherit; } /** - * Add the correct font weight in Chrome, Edge, and Safari. + * 在 Chrome, Edge, 和 Safari 中添加正确的字体粗细。 */ - b, strong { font-weight: bolder; } /** - * 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, kbd, samp { @@ -147,35 +127,30 @@ samp { } /** - * Add the correct font style in Android 4.3-. + * 在 Android 4.3- 中添加正确的字体风格。 */ - dfn { font-style: italic; } /** - * Add the correct background and color in IE 9-. + * 在 IE 9- 中添加正确的背景色和颜色。 */ - mark { background-color: #ff0; color: #000; } /** - * Add the correct font size in all browsers. + * 在所有浏览器中添加正确的字体大小。 */ - small { font-size: 80%; } /** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. + * 防止 `sub` 和 `sup` 元素影响所有浏览器中的行高。 */ - sub, sup { font-size: 75%; @@ -194,49 +169,42 @@ sup { /* Embedded content ========================================================================== */ - /** - * Add the correct display in IE 9-. + * 在 IE 9- 中正确显示音频和视频元素。 */ - audio, video { display: inline-block; } /** - * Add the correct display in iOS 4-7. + * 在 iOS 4-7 中正确显示没有控制栏的音频元素。 */ - audio:not([controls]) { display: none; height: 0; } /** - * Remove the border on images inside links in IE 10-. + * 移除 IE 10- 中图片链接内的边框。 */ - img { border-style: none; } /** - * Hide the overflow in IE. + * 在 IE 中隐藏 SVG 溢出部分。 */ - 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, input, optgroup, @@ -249,31 +217,27 @@ textarea { } /** - * Show the overflow in IE. - * 1. Show the overflow in Edge. + * 1. 在 IE 中显示溢出。 + * 2. 在 Edge 中显示溢出。 */ - button, input { /* 1 */ overflow: visible; } /** - * 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, select { /* 1 */ text-transform: none; } /** - * 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,在 Android 4 中破坏本地 `audio` 和 `video` 控件。 + * 2. 修正 iOS 和 Safari 中无法自定义可点击类型的样式。 */ - button, html [type="button"], /* 1 */ [type="reset"], @@ -282,9 +246,8 @@ html [type="button"], /* 1 */ } /** - * Remove the inner border and padding in Firefox. + * 移除 Firefox 中按钮和输入框聚焦时的内边距和边框。 */ - button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, @@ -294,9 +257,8 @@ button::-moz-focus-inner, } /** - * Restore the focus styles unset by the previous rule. + * 恢复 Firefox 中移除的按钮和输入框的焦点样式。 */ - button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, @@ -305,20 +267,17 @@ button:-moz-focusring, } /** - * Correct the padding in Firefox. + * 在 Firefox 中修正 fieldset 的内边距。 */ - fieldset { padding: 0.35em 0.75em 0.625em; } /** - * 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 { box-sizing: border-box; /* 1 */ color: inherit; /* 2 */ @@ -329,28 +288,25 @@ 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 { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } /** - * Remove the default vertical scrollbar in IE. + * 移除 IE 中 textarea 的默认垂直滚动条。 */ - textarea { overflow: auto; } /** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. + * 1. 在 IE 10- 中正确设置 checkbox 和 radio 的盒模型。 + * 2. 移除 IE 10- 中 checkbox 和 radio 的内边距。 */ - [type="checkbox"], [type="radio"] { box-sizing: border-box; /* 1 */ @@ -358,38 +314,34 @@ textarea { } /** - * Correct the cursor style of increment and decrement buttons in Chrome. + * 在 Chrome 中修正数字输入框上下箭头的高度。 */ - [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; } /** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. + * 1. 修正 Chrome 和 Safari 中搜索框的奇怪外观。 + * 2. 修正 Safari 中搜索框的轮廓样式。 */ - [type="search"] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } /** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + * 移除 macOS 上 Chrome 和 Safari 中搜索框取消按钮和装饰的内边距。 */ - [type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** - * 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 中更改字体属性以继承。 */ - ::-webkit-file-upload-button { -webkit-appearance: button; /* 1 */ font: inherit; /* 2 */ @@ -397,51 +349,43 @@ textarea { /* Interactive ========================================================================== */ - -/* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. +/** + * 1. 在 IE 9- 中正确显示 details 元素。 + * 2. 在 Edge, IE, 和 Firefox 中正确显示 menu 元素。 */ - details, /* 1 */ menu { display: block; } -/* - * Add the correct display in all browsers. +/** + * 在所有浏览器中正确显示 summary 元素。 */ - summary { display: list-item; } /* Scripting ========================================================================== */ - /** - * Add the correct display in IE 9-. + * 在 IE 9- 中正确显示 canvas 元素。 */ - canvas { display: inline-block; } /** - * Add the correct display in IE. + * 在 IE 中正确显示 template 元素。 */ - template { display: none; } /* Hidden ========================================================================== */ - /** - * Add the correct display in IE 10-. + * 在 IE 10- 中正确显示带有 hidden 属性的元素。 */ - [hidden] { display: none; -} \ No newline at end of file +} diff --git a/front-end/mall4v/src/assets/scss/_variables.scss b/front-end/mall4v/src/assets/scss/_variables.scss index b081e04..1041e18 100644 --- a/front-end/mall4v/src/assets/scss/_variables.scss +++ b/front-end/mall4v/src/assets/scss/_variables.scss @@ -1,13 +1,13 @@ // 站点主色 -// tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-[#17B3A3]/index.css']当前主题色一致 -$--color-primary: #02A1E9; +// tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-#17B3A3/index.css']当前主题色一致 +$--color-primary: #02A1E9; // 定义站点的主要颜色,这是一个蓝色色调(#02A1E9)。这个颜色将用于整个网站的一致性配色方案,包括链接、按钮、强调文字等元素。为了保证一致性,需要确保此颜色与Element UI框架中的主题色相匹配。 -// Navbar -$navbar--background-color: $--color-primary; +// Navbar (导航栏) +$navbar--background-color: $--color-primary; // 使用站点主色作为导航栏的背景颜色。这使得导航栏与站点的整体设计保持一致,并且在视觉上提供了一种连贯的品牌形象。 -// Sidebar -$sidebar--background-color-dark: #263238; -$sidebar--color-text-dark: #8a979e; +// Sidebar (侧边栏) +$sidebar--background-color-dark: #263238; // 设置侧边栏的深色背景颜色(#263238),这是一种深灰色调。这种颜色通常用于创建对比度,使得侧边栏中的内容更加突出。 +$sidebar--color-text-dark: #8a979e; // 设置侧边栏中文本的颜色(#8a979e),这是一种浅灰色调。选择这种颜色是为了确保文本具有良好的可读性,同时与深色背景形成适当的对比。 -// Content -$content--background-color: #f1f4f5; +// Content (内容区) +$content--background-color: #f1f4f5; // 定义内容区的背景颜色(#f1f4f5),这是一种非常浅的灰蓝色。这种颜色可以为主要内容提供一个干净、明亮的背景,同时也不会分散用户的注意力。 diff --git a/front-end/mall4v/src/assets/scss/index.scss b/front-end/mall4v/src/assets/scss/index.scss index c17d72c..8b4c002 100644 --- a/front-end/mall4v/src/assets/scss/index.scss +++ b/front-end/mall4v/src/assets/scss/index.scss @@ -1,3 +1,9 @@ -@import "normalize"; // api: https://github.com/necolas/normalize.css/ -@import "variables"; // 站点变量 -@import "base"; +// 导入 Normalize.css 重置样式 +// api: https://github.com/necolas/normalize.css/ +@import "normalize"; // Normalize.css 是一个CSS库,旨在使浏览器的默认样式更加一致,并修复一些常见的跨浏览器问题。通过导入此文件,可以确保在不同浏览器中呈现的内容具有一致的基础样式。Normalize.css 不会移除所有默认样式,而是保留有用的默认值并进行微调,以提高兼容性和可读性。 + +// 导入站点变量 +@import "variables"; // 这里导入的是包含整个站点所使用的所有Sass变量的文件。这些变量定义了诸如颜色、字体大小、间距等全局样式属性。通过将这些变量集中在一个文件中,可以在整个项目中方便地管理和统一修改样式。例如,如果需要更改站点的主要颜色,只需在一个地方更新变量值即可。 + +// 导入基础样式 +@import "base"; // 此处导入的是包含了项目中所有基本样式的文件,它可能包括但不限于:排版规则、链接样式、按钮样式等。这些基础样式是构建其他更具体组件的基础,确保了一致的外观和感觉。此外,这里还可以设置全局的选择器、清除浮动的实用工具类以及其他任何对整个项目至关重要的样式规则。 diff --git a/front-end/mall4v/src/components/mul-pic-upload/index.vue b/front-end/mall4v/src/components/mul-pic-upload/index.vue index 9b934a4..1fd1788 100644 --- a/front-end/mall4v/src/components/mul-pic-upload/index.vue +++ b/front-end/mall4v/src/components/mul-pic-upload/index.vue @@ -1,60 +1,75 @@ diff --git a/front-end/mall4v/src/components/pic-upload/index.vue b/front-end/mall4v/src/components/pic-upload/index.vue index ed275c1..44ecd17 100644 --- a/front-end/mall4v/src/components/pic-upload/index.vue +++ b/front-end/mall4v/src/components/pic-upload/index.vue @@ -1,96 +1,109 @@ diff --git a/front-end/mall4v/src/components/prods-select/index.vue b/front-end/mall4v/src/components/prods-select/index.vue index c50bad4..8e50f25 100644 --- a/front-end/mall4v/src/components/prods-select/index.vue +++ b/front-end/mall4v/src/components/prods-select/index.vue @@ -1,205 +1,229 @@ diff --git a/front-end/mall4v/src/components/tiny-mce/dynamicLoadScript.js b/front-end/mall4v/src/components/tiny-mce/dynamicLoadScript.js index 9b28e5a..3c1a8fd 100644 --- a/front-end/mall4v/src/components/tiny-mce/dynamicLoadScript.js +++ b/front-end/mall4v/src/components/tiny-mce/dynamicLoadScript.js @@ -1,58 +1,85 @@ +// 定义一个数组来存储所有的回调函数,以便在脚本加载完成后依次调用它们。 let callbacks = [] -function loadedTinymce () { - // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2144 - // check is successfully downloaded script - return window.tinymce +/** + * 检查是否已成功加载TinyMCE编辑器。 + * + * @returns {boolean} 如果window对象存在tinymce属性,则返回true,表示TinyMCE已加载;否则返回false。 + */ +function loadedTinymce() { + // 解决 https://github.com/PanJiaChen/vue-element-admin/issues/2144 的问题 + // 检查是否成功下载了脚本 + return window.tinymce !== undefined } +/** + * 动态加载指定URL的脚本文件,并在加载完成或发生错误时调用提供的回调函数。 + * + * @param {string} src - 脚本文件的URL。 + * @param {Function} [callback] - 可选参数,当脚本加载完成或出错时将被调用的回调函数。 + */ const dynamicLoadScript = (src, callback) => { const existingScript = document.getElementById(src) - const cb = callback || function () {} + const cb = callback || function () {} // 如果没有提供回调,则创建一个空函数作为默认值 if (!existingScript) { + // 创建新的 - + diff --git a/front-end/mall4v/src/components/verifition/Verify/VerifyPoints.vue b/front-end/mall4v/src/components/verifition/Verify/VerifyPoints.vue index 1a38f61..d46beec 100644 --- a/front-end/mall4v/src/components/verifition/Verify/VerifyPoints.vue +++ b/front-end/mall4v/src/components/verifition/Verify/VerifyPoints.vue @@ -1,61 +1,63 @@ + diff --git a/front-end/mall4v/src/components/verifition/Verify/VerifySlide.vue b/front-end/mall4v/src/components/verifition/Verify/VerifySlide.vue index 6a3f144..ef68b5e 100644 --- a/front-end/mall4v/src/components/verifition/Verify/VerifySlide.vue +++ b/front-end/mall4v/src/components/verifition/Verify/VerifySlide.vue @@ -1,86 +1,126 @@ diff --git a/front-end/mall4v/src/layout/main-navbar-update-password.vue b/front-end/mall4v/src/layout/main-navbar-update-password.vue index e981fd9..195b955 100644 --- a/front-end/mall4v/src/layout/main-navbar-update-password.vue +++ b/front-end/mall4v/src/layout/main-navbar-update-password.vue @@ -1,121 +1,157 @@ diff --git a/front-end/mall4v/src/layout/main-navbar.vue b/front-end/mall4v/src/layout/main-navbar.vue index e5cd724..627e51b 100644 --- a/front-end/mall4v/src/layout/main-navbar.vue +++ b/front-end/mall4v/src/layout/main-navbar.vue @@ -1,172 +1,219 @@ diff --git a/front-end/mall4v/src/layout/main-sidebar-sub-menu-item.vue b/front-end/mall4v/src/layout/main-sidebar-sub-menu-item.vue index 867e1af..7c461e8 100644 --- a/front-end/mall4v/src/layout/main-sidebar-sub-menu-item.vue +++ b/front-end/mall4v/src/layout/main-sidebar-sub-menu-item.vue @@ -1,125 +1,154 @@