From c357e4a8859a0974f15dbf223e0f328a3b4f4f2c Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Tue, 16 Sep 2025 17:03:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=8E=9F=E6=96=99?= =?UTF-8?q?=E5=BA=93=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD=E5=92=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 `raw-material` 组件中添加上传按钮和抽屉组件 - 新增 `add-raw-material-drawer` 组件及其样式文件 - 更新样式文件以支持新的上传界面 - 调整 Ant Select 和 Drawer 组件的样式 --- src/styles/components/ant-drawer.scss | 20 ++ src/styles/components/ant-select.scss | 72 +++++- src/styles/components/ant-textarea.scss | 14 + src/styles/components/index.scss | 3 +- src/utils/tools.ts | 1 + .../login/components/login-form/index.vue | 24 +- .../add-raw-material-drawer/index.vue | 244 ++++++++++++++++++ .../add-raw-material-drawer/style.scss | 48 ++++ .../components/raw-material/index.vue | 5 +- 9 files changed, 407 insertions(+), 24 deletions(-) create mode 100644 src/styles/components/ant-drawer.scss create mode 100644 src/views/material-center/components/raw-material/components/add-raw-material-drawer/index.vue create mode 100644 src/views/material-center/components/raw-material/components/add-raw-material-drawer/style.scss diff --git a/src/styles/components/ant-drawer.scss b/src/styles/components/ant-drawer.scss new file mode 100644 index 0000000..9d98490 --- /dev/null +++ b/src/styles/components/ant-drawer.scss @@ -0,0 +1,20 @@ +.ant-drawer { + .ant-drawer-header { + .ant-drawer-header-title { + justify-content: space-between; + + .ant-drawer-close { + order: 2; + } + + .ant-drawer-title { + color: #211f24; + font-family: $font-family-medium; + font-size: 18px; + font-style: normal; + font-weight: 500; + line-height: 26px; + } + } + } +} diff --git a/src/styles/components/ant-select.scss b/src/styles/components/ant-select.scss index b459794..c66e615 100644 --- a/src/styles/components/ant-select.scss +++ b/src/styles/components/ant-select.scss @@ -36,7 +36,6 @@ border-color: $color-error !important; } - } .ant-select { @@ -103,20 +102,69 @@ } } + &.ant-select-single { + .ant-select-selector { + height: 32px !important; + } + + &.ant-select-lg { + .ant-select-selector { + height: 36px !important; + } + } + + &.ant-select-sm { + .ant-select-selector { + height: 28px !important; + } + } + } } -.ant-select.ant-select-single { - .ant-select-selector { - height: 32px !important; - } - &.ant-select-lg { - .ant-select-selector { - height: 36px !important; +.ant-select-dropdown { + padding: 4px 0; + + .ant-select-item-option { + padding: 0 12px; + height: 36px; + align-items: center; + + .ant-select-item-option-state { + display: none; } - } - &.ant-select-sm { - .ant-select-selector { - height: 28px !important; + + &:not(.ant-select-item-option-disabled) { + &:hover { + background-color: #F2F3F5 !important; + } + + .ant-select-item-option-content { + color: #211F24; + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + + &.ant-select-item-option-selected { + background-color: transparent !important; + color: #6D4CFE !important; + + &:hover { + background-color: #F2F3F5 !important; + } + + .ant-select-item-option-content { + color: #6D4CFE; + font-weight: 500; + font-family: $font-family-medium; + } + + } + + &.ant-select-item-option-active { + } } } } diff --git a/src/styles/components/ant-textarea.scss b/src/styles/components/ant-textarea.scss index 42cd057..5c46dae 100644 --- a/src/styles/components/ant-textarea.scss +++ b/src/styles/components/ant-textarea.scss @@ -2,4 +2,18 @@ .ant-input { padding: 8px 12px 4px 12px; } + + &.ant-input-textarea-show-count { + &::after { + position: absolute; + right: 8px; + bottom: 4px; + font-family: $font-family-regular; + color: #939499; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + } } diff --git a/src/styles/components/index.scss b/src/styles/components/index.scss index 471d603..7ad1b65 100644 --- a/src/styles/components/index.scss +++ b/src/styles/components/index.scss @@ -26,4 +26,5 @@ @import "./ant-tag.scss"; @import "./ant-switch.scss"; @import "./ant-step.scss"; -@import "./ant-spin.scss"; \ No newline at end of file +@import "./ant-spin.scss"; +@import "./ant-drawer.scss"; diff --git a/src/utils/tools.ts b/src/utils/tools.ts index da345bb..5df5a36 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -4,6 +4,7 @@ */ import dayjs from 'dayjs'; + export function toFixed(num: number | string, n: number): number { return parseFloat(parseFloat(num.toString()).toFixed(n)); } diff --git a/src/views/login/components/login-form/index.vue b/src/views/login/components/login-form/index.vue index 3630f5a..488bdf5 100644 --- a/src/views/login/components/login-form/index.vue +++ b/src/views/login/components/login-form/index.vue @@ -43,12 +43,12 @@ -

+

{{ errMsg }}

- +
- +
+ +
+