From 9bce51f651aad297ef9eb6df832bfdaf1de05d84 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 22 四月 2026 14:27:54 +0800
Subject: [PATCH] 青岛推送
---
node_modules/uview-plus/components/u-switch/u-switch.vue | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/node_modules/uview-plus/components/u-switch/u-switch.vue b/node_modules/uview-plus/components/u-switch/u-switch.vue
index 7ad5821..dcf0e2d 100644
--- a/node_modules/uview-plus/components/u-switch/u-switch.vue
+++ b/node_modules/uview-plus/components/u-switch/u-switch.vue
@@ -46,17 +46,19 @@
* switch 寮�鍏抽�夋嫨鍣�
* @description 閫夋嫨寮�鍏充竴鑸敤浜庡彧鏈変袱涓�夋嫨锛屼笖鍙兘閫夊叾涓�鐨勫満鏅��
* @tutorial https://uview-plus.jiangruyi.com/components/switch.html
- * @property {Boolean} loading 鏄惁澶勪簬鍔犺浇涓紙榛樿 false 锛�
- * @property {Boolean} disabled 鏄惁绂佺敤锛堥粯璁� false 锛�
- * @property {String | Number} size 寮�鍏冲昂瀵革紝鍗曚綅px 锛堥粯璁� 25 锛�
- * @property {String} activeColor 鎵撳紑鏃剁殑鑳屾櫙鑹� 锛堥粯璁� '#2979ff' 锛�
- * @property {String} inactiveColor 鍏抽棴鏃剁殑鑳屾櫙鑹� 锛堥粯璁� '#ffffff' 锛�
- * @property {Boolean | String | Number} value 閫氳繃v-model鍙屽悜缁戝畾鐨勫�� 锛堥粯璁� false 锛�
- * @property {Boolean | String | Number} activeValue 鎵撳紑閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�� 锛堥粯璁� true 锛�
- * @property {Boolean | String | Number} inactiveValue 鍏抽棴閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�� 锛堥粯璁� false 锛�
- * @property {Boolean} asyncChange 鏄惁寮�鍚紓姝ュ彉鏇达紝寮�鍚悗闇�瑕佹墜鍔ㄦ帶鍒惰緭鍏ュ�� 锛堥粯璁� false 锛�
- * @property {String | Number} space 鍦嗙偣涓庡杈规鐨勮窛绂� 锛堥粯璁� 0 锛�
- * @property {Object} customStyle 瀹氫箟闇�瑕佺敤鍒扮殑澶栭儴鏍峰紡
+ * @property {Boolean} loading 鏄惁澶勪簬鍔犺浇涓紙榛樿 false 锛�
+ * @property {Boolean} disabled 鏄惁绂佺敤锛堥粯璁� false 锛�
+ * @property {String | Number} size 寮�鍏冲昂瀵革紝鍗曚綅px 锛堥粯璁� 25 锛�
+ * @property {String} activeColor 鎵撳紑鏃剁殑鑳屾櫙鑹� 锛堥粯璁� '#2979ff' 锛�
+ * @property {String} inactiveColor 鍏抽棴鏃剁殑鑳屾櫙鑹� 锛堥粯璁� '#ffffff' 锛�
+ * @property {String} dotActiveColor 鎵撳紑鏃跺渾鐐圭殑棰滆壊 锛堥粯璁� '#ffffff' 锛�
+ * @property {String} dotInactiveColor 鍏抽棴鏃跺渾鐐圭殑棰滆壊 锛堥粯璁� '#ffffff' 锛�
+ * @property {Boolean | String | Number} value 閫氳繃v-model鍙屽悜缁戝畾鐨勫�� 锛堥粯璁� false 锛�
+ * @property {Boolean | String | Number} activeValue 鎵撳紑閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�� 锛堥粯璁� true 锛�
+ * @property {Boolean | String | Number} inactiveValue 鍏抽棴閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�� 锛堥粯璁� false 锛�
+ * @property {Boolean} asyncChange 鏄惁寮�鍚紓姝ュ彉鏇达紝寮�鍚悗闇�瑕佹墜鍔ㄦ帶鍒惰緭鍏ュ�� 锛堥粯璁� false 锛�
+ * @property {String | Number} space 鍦嗙偣涓庡杈规鐨勮窛绂� 锛堥粯璁� 0 锛�
+ * @property {Object} customStyle 瀹氫箟闇�瑕佺敤鍒扮殑澶栭儴鏍峰紡
*
* @event {Function} change 鍦╯witch鎵撳紑鎴栧叧闂椂瑙﹀彂
* @example <u-switch v-model="checked" active-color="red" inactive-color="#eee"></u-switch>
@@ -121,6 +123,7 @@
style.height = addUnit(this.size - this.space)
const translateX = this.isActive ? addUnit(this.space) : addUnit(this.size);
style.transform = `translateX(-${translateX})`
+ style.backgroundColor = this.isActive ? this.dotActiveColor : this.dotInactiveColor
return style
},
bgStyle() {
@@ -190,9 +193,8 @@
justify-content: center;
border-radius: 100px;
background-color: #fff;
- border-radius: 100px;
box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.25);
- transition-property: transform;
+ transition-property: transform, background-color;
transition-duration: 0.4s;
transition-timing-function: cubic-bezier(0.3, 1.05, 0.4, 1.05);
}
--
Gitblit v1.9.3