From 8dde030fb7c6f66175daf223bff2ab67cef81380 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Thu, 19 Jun 2025 16:44:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0sass=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=BB=93=E6=9E=84&&=E5=BC=95=E5=85=A5normalize.css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/base/index.scss | 25 ++ .../styles/{ => components}/codePreview.scss | 0 src/assets/styles/components/index.scss | 1 + src/assets/styles/electron/index.scss | 1 + src/assets/styles/electron/linux.scss | 64 ++++ src/assets/styles/element/index.scss | 50 ++- src/assets/styles/main.scss | 102 +---- src/assets/styles/message.scss | 38 -- src/assets/styles/normalize.css | 349 ++++++++++++++++++ src/assets/styles/variables/index.scss | 1 + src/assets/styles/{ => variables}/theme.scss | 0 11 files changed, 493 insertions(+), 138 deletions(-) create mode 100644 src/assets/styles/base/index.scss rename src/assets/styles/{ => components}/codePreview.scss (100%) create mode 100644 src/assets/styles/components/index.scss create mode 100644 src/assets/styles/electron/index.scss create mode 100644 src/assets/styles/electron/linux.scss delete mode 100644 src/assets/styles/message.scss create mode 100644 src/assets/styles/normalize.css create mode 100644 src/assets/styles/variables/index.scss rename src/assets/styles/{ => variables}/theme.scss (100%) diff --git a/src/assets/styles/base/index.scss b/src/assets/styles/base/index.scss new file mode 100644 index 0000000..a585ef3 --- /dev/null +++ b/src/assets/styles/base/index.scss @@ -0,0 +1,25 @@ +/* 滚动条轨道样式 */ +::-webkit-scrollbar-track { + background-image: linear-gradient(180deg, #e7f0fd 1%, #daeafc 40%) !important; + display: none !important; +} + +::-webkit-scrollbar { + width: 4px !important; + height: 4px !important; + color: var(--o-scrollbar-thumb) !important; +} + +/* 滚动条的滑块 */ +::-webkit-scrollbar-thumb { + background-color: var(--o-scrollbar-thumb) !important; + border-radius: 3px !important; +} +::-webkit-scrollbar-corner { + background: transparent !important; +} + +::-webkit-scrollbar-thumb:hover { + background-color: var(--o-scrollbar-thumb) !important; + /* 鼠标悬停时的滚动条按钮颜色 */ +} \ No newline at end of file diff --git a/src/assets/styles/codePreview.scss b/src/assets/styles/components/codePreview.scss similarity index 100% rename from src/assets/styles/codePreview.scss rename to src/assets/styles/components/codePreview.scss diff --git a/src/assets/styles/components/index.scss b/src/assets/styles/components/index.scss new file mode 100644 index 0000000..7d02eea --- /dev/null +++ b/src/assets/styles/components/index.scss @@ -0,0 +1 @@ +@import './codePreview.scss'; \ No newline at end of file diff --git a/src/assets/styles/electron/index.scss b/src/assets/styles/electron/index.scss new file mode 100644 index 0000000..6aee27e --- /dev/null +++ b/src/assets/styles/electron/index.scss @@ -0,0 +1 @@ +@import './linux.scss' \ No newline at end of file diff --git a/src/assets/styles/electron/linux.scss b/src/assets/styles/electron/linux.scss new file mode 100644 index 0000000..9b234c8 --- /dev/null +++ b/src/assets/styles/electron/linux.scss @@ -0,0 +1,64 @@ +// Linux平台窗口圆角和阴影样式 +html.platform-linux { + width: 100vw; + height: 100vh; + padding: 16px; + // 添加过渡动画 + transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1); + + body { + width: calc(100vw - 32px) !important; + height: calc(100vh - 32px) !important; + background: transparent; + border-radius: 12px; + overflow: hidden; + // 添加16px的窗口阴影,向外扩展 + box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); + // 添加过渡动画 + transition: + border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1), + box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1); + } + + #app { + border-radius: 12px; + overflow: hidden; + // 添加过渡动画 + transition: border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1); + } + + .el-overlay { + height: calc(100% - 32px) !important; + width: calc(100% - 32px) !important; + top: 16px !important; + left: 16px !important; + border-radius: 12px; + } + + // 窗口最大化状态下取消圆角和阴影 + &.window-maximized { + padding: 0 !important; + // 保持过渡动画一致性 + transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1); + body, + #app { + width: 100vw !important; + height: 100vh !important; + border-radius: 0 !important; + // 最大化时移除阴影 + box-shadow: none !important; + // 保持过渡动画一致性 + transition: + border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1), + box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1); + } + + .el-overlay { + height: 100% !important; + width: 100% !important; + top: 0 !important; + left: 0 !important; + border-radius: 0 !important; + } + } +} \ No newline at end of file diff --git a/src/assets/styles/element/index.scss b/src/assets/styles/element/index.scss index 8bfb60f..99e4f6f 100644 --- a/src/assets/styles/element/index.scss +++ b/src/assets/styles/element/index.scss @@ -16,8 +16,8 @@ background-color: #6395fd !important; border-color: #6395fd !important; &:hover { - background-color: #7AA5FF !important; - border-color: #7AA5FF !important; + background-color: #7aa5ff !important; + border-color: #7aa5ff !important; } &:active { background-color: #6395fd !important; @@ -28,14 +28,52 @@ background-color: #6395fd !important; border-color: #6395fd !important; &:hover { - background-color: #7AA5FF !important; - border-color: #7AA5FF !important; + background-color: #7aa5ff !important; + border-color: #7aa5ff !important; } &:active { background-color: #6395fd !important; border-color: #6395fd !important; } } + .el-message { + width: 30%; + border-radius: 5px; + } + + .el-message--success { + background-color: #c2e7c7; + color: #000; + border-color: #24ab36; + border-radius: 10px; + .el-message__content { + color: #000; + font-size: 12px; + } + } + + .el-message--warning { + background-color: #f9ecb8; + border-color: #ebaf00; + img { + width: 16px; + height: 16px; + } + .el-message__content { + color: #000; + font-size: 12px; + } + } + + .el-message--error { + background-color: #f7c1c1; + color: #000; + border-color: #e42121; + .el-message__content { + color: #000; + font-size: 12px; + } + } } .euler-copilot-message-box { @@ -129,3 +167,7 @@ top: unset !important; } } + +.el-checkbox.el-checkbox--large { + height: auto !important; +} diff --git a/src/assets/styles/main.scss b/src/assets/styles/main.scss index 796c1bb..e908d89 100644 --- a/src/assets/styles/main.scss +++ b/src/assets/styles/main.scss @@ -1,96 +1,6 @@ -@import './codePreview.scss'; -@import './message.scss'; -@import './theme.scss'; - -// Linux平台窗口圆角和阴影样式 -html.platform-linux { - width: 100vw; - height: 100vh; - padding: 16px; - // 添加过渡动画 - transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1); - - body { - width: calc(100vw - 32px) !important; - height: calc(100vh - 32px) !important; - background: transparent; - border-radius: 12px; - overflow: hidden; - // 添加16px的窗口阴影,向外扩展 - box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); - // 添加过渡动画 - transition: - border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1), - box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1); - } - - #app { - border-radius: 12px; - overflow: hidden; - // 添加过渡动画 - transition: border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1); - } - - .el-overlay { - height: calc(100% - 32px) !important; - width: calc(100% - 32px) !important; - top: 16px !important; - left: 16px !important; - border-radius: 12px; - } - - // 窗口最大化状态下取消圆角和阴影 - &.window-maximized { - padding: 0 !important; - // 保持过渡动画一致性 - transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1); - body, - #app { - width: 100vw !important; - height: 100vh !important; - border-radius: 0 !important; - // 最大化时移除阴影 - box-shadow: none !important; - // 保持过渡动画一致性 - transition: - border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1), - box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1); - } - - .el-overlay { - height: 100% !important; - width: 100% !important; - top: 0 !important; - left: 0 !important; - border-radius: 0 !important; - } - } -} -/* 滚动条轨道样式 */ -::-webkit-scrollbar-track { - background-image: linear-gradient(180deg, #e7f0fd 1%, #daeafc 40%) !important; - display: none !important; -} - -::-webkit-scrollbar { - width: 4px !important; - height: 4px !important; - color: var(--o-scrollbar-thumb) !important; -} - -/* 滚动条的滑块 */ -::-webkit-scrollbar-thumb { - background-color: var(--o-scrollbar-thumb) !important; - border-radius: 3px !important; -} -::-webkit-scrollbar-corner { - background: transparent !important; -} - -::-webkit-scrollbar-thumb:hover { - background-color: var(--o-scrollbar-thumb) !important; - /* 鼠标悬停时的滚动条按钮颜色 */ -} -:deep(.el-checkbox.el-checkbox--large){ - height: auto !important; -} +@import './base/index.scss'; +@import './components/index.scss'; +@import './variables/index.scss'; +@import './electron/index.scss'; +@import './element/index.scss'; +@import './normalize.css' \ No newline at end of file diff --git a/src/assets/styles/message.scss b/src/assets/styles/message.scss deleted file mode 100644 index 54a8670..0000000 --- a/src/assets/styles/message.scss +++ /dev/null @@ -1,38 +0,0 @@ -.el-message { - width: 30%; - border-radius: 5px; -} - -.el-message--success { - background-color: #c2e7c7; - color: #000; - border-color: #24ab36; - border-radius: 10px; - .el-message__content { - color: #000; - font-size: 12px; - } -} - -.el-message--warning { - background-color: #f9ecb8; - border-color: #ebaf00; - img { - width: 16px; - height: 16px; - } - .el-message__content { - color: #000; - font-size: 12px; - } -} - -.el-message--error { - background-color: #f7c1c1; - color: #000; - border-color: #e42121; - .el-message__content { - color: #000; - font-size: 12px; - } -} diff --git a/src/assets/styles/normalize.css b/src/assets/styles/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/src/assets/styles/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and 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. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * 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 { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in 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. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +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. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in 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. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[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. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/src/assets/styles/variables/index.scss b/src/assets/styles/variables/index.scss new file mode 100644 index 0000000..5ad07fa --- /dev/null +++ b/src/assets/styles/variables/index.scss @@ -0,0 +1 @@ +@import './theme.scss'; diff --git a/src/assets/styles/theme.scss b/src/assets/styles/variables/theme.scss similarity index 100% rename from src/assets/styles/theme.scss rename to src/assets/styles/variables/theme.scss -- Gitee From e9fba970dc42f7275eb1a74ff10a07f390e573e7 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Thu, 19 Jun 2025 17:17:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=A0=E9=99=A4qiankun=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +-- src/App.vue | 3 +-- src/main.ts | 30 +----------------------------- src/qiankun.ts | 32 -------------------------------- src/router/index.ts | 3 +-- src/store/account.ts | 6 ------ src/views/dialogue/Copilot.vue | 4 ---- vite.config.ts | 4 ---- 8 files changed, 4 insertions(+), 81 deletions(-) delete mode 100644 src/qiankun.ts diff --git a/package.json b/package.json index 55a4918..a1987f0 100644 --- a/package.json +++ b/package.json @@ -189,8 +189,7 @@ "typescript-eslint": "8.17.0", "uuid": "^11.1.0", "vite": "5.4.11", - "vite-plugin-mock": "^3.0.2", - "vite-plugin-qiankun": "1.0.15" + "vite-plugin-mock": "^3.0.2" }, "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39" } \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index df8c6f2..37a8846 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,5 @@ - - - -- Gitee