From 8cfc654df9f14724f0fd5261b0e90a2faed59b78 Mon Sep 17 00:00:00 2001
From: haoziqaq <357229046@qq.com>
Date: Thu, 18 Nov 2021 18:59:26 +0800
Subject: [PATCH] fix(ui/select, darkmode): fix select disabled color lose, fix
darkmode color
affects: @varlet/ui
---
packages/varlet-ui/src/icon/example/index.vue | 2 +-
packages/varlet-ui/src/pagination/pagination.less | 3 +++
packages/varlet-ui/src/select/Select.vue | 6 +++++-
packages/varlet-ui/src/styles/example/index.vue | 13 +++++++++++--
packages/varlet-ui/src/themes/dark/button.ts | 2 +-
packages/varlet-ui/src/themes/dark/card.ts | 2 +-
packages/varlet-ui/src/themes/dark/collapse.ts | 2 +-
packages/varlet-ui/src/themes/dark/datePicker.ts | 2 +-
packages/varlet-ui/src/themes/dark/divider.ts | 2 +-
packages/varlet-ui/src/themes/dark/index.ts | 3 ++-
packages/varlet-ui/src/themes/dark/pagination.ts | 3 ++-
packages/varlet-ui/src/themes/dark/pullRefresh.ts | 2 +-
packages/varlet-ui/src/themes/dark/select.ts | 2 +-
packages/varlet-ui/src/themes/dark/table.ts | 2 +-
packages/varlet-ui/src/themes/dark/uploader.ts | 6 +++---
15 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/packages/varlet-ui/src/icon/example/index.vue b/packages/varlet-ui/src/icon/example/index.vue
index f253b9e58b1..bec0b066dc2 100644
--- a/packages/varlet-ui/src/icon/example/index.vue
+++ b/packages/varlet-ui/src/icon/example/index.vue
@@ -85,7 +85,7 @@ export default {
watchLang(use)
watchDarkMode(dark, (themes) => {
- background.value = themes === 'darkThemes' ? '#272727' : '#fff'
+ background.value = themes === 'darkThemes' ? '#303030' : '#fff'
})
const prevTouchmoveForbid = context.touchmoveForbid
diff --git a/packages/varlet-ui/src/pagination/pagination.less b/packages/varlet-ui/src/pagination/pagination.less
index fd16d7438d1..037bee89891 100644
--- a/packages/varlet-ui/src/pagination/pagination.less
+++ b/packages/varlet-ui/src/pagination/pagination.less
@@ -6,6 +6,7 @@
@pagination-item-width: 32px;
@pagination-item-height: 32px;
@pagination-item-margin: 0 6px;
+@pagination-item-background: #fff;
@pagination-item-border-radius: 4px;
@pagination-list-bg-color: #fff;
@pagination-list-active-bg-color: #edf5ff;
@@ -27,6 +28,7 @@
--pagination-item-width: @pagination-item-width;
--pagination-item-height: @pagination-item-height;
--pagination-item-margin: @pagination-item-margin;
+ --pagination-item-background: @pagination-item-background;
--pagination-item-border-radius: @pagination-item-border-radius;
--pagination-list-bg-color: @pagination-list-bg-color;
--pagination-list-active-bg-color: @pagination-list-active-bg-color;
@@ -65,6 +67,7 @@
outline: none;
transition: all 0.25s;
user-select: none;
+ background: var(--pagination-item-background);
&:hover {
background-color: var(--pagination-hover-bg-color);
diff --git a/packages/varlet-ui/src/select/Select.vue b/packages/varlet-ui/src/select/Select.vue
index bb228205ac4..1d5c80be7ed 100644
--- a/packages/varlet-ui/src/select/Select.vue
+++ b/packages/varlet-ui/src/select/Select.vue
@@ -76,7 +76,11 @@
diff --git a/packages/varlet-ui/src/styles/example/index.vue b/packages/varlet-ui/src/styles/example/index.vue
index 2a71a8126a6..35261814ba2 100644
--- a/packages/varlet-ui/src/styles/example/index.vue
+++ b/packages/varlet-ui/src/styles/example/index.vue
@@ -1,18 +1,28 @@