From 16213c0f85aa3ac8317797bf4a05fd12940e16d3 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 05 三月 2025 17:29:42 +0800
Subject: [PATCH] -

---
 src/uni_modules/uview-plus/components/u-icon/u-icon.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/uni_modules/uview-plus/components/u-icon/u-icon.vue b/src/uni_modules/uview-plus/components/u-icon/u-icon.vue
index ce3b52a..0255905 100644
--- a/src/uni_modules/uview-plus/components/u-icon/u-icon.vue
+++ b/src/uni_modules/uview-plus/components/u-icon/u-icon.vue
@@ -81,6 +81,16 @@
 	 */
 	export default {
 		name: 'u-icon',
+		beforeCreate() {
+			// #ifdef APP-NVUE
+			if (this.customFontFamily) {
+				domModule.addRule('fontFace', {
+					'fontFamily': `${this.customPrefix}-${this.customFontFamily}`,
+					'src': `url('${this.customFontUrl}')`
+				})
+			}
+        	// #endif
+    	},
 		data() {
 			return {
 
@@ -136,7 +146,9 @@
 			// 閫氳繃鍥炬爣鍚嶏紝鏌ユ壘瀵瑰簲鐨勫浘鏍�
 			icon() {
 				// 浣跨敤鑷畾涔夊浘鏍囩殑鏃跺�欓〉闈笂浼氭妸name灞炴�т篃灞曠ず鍑烘潵锛屾墍浠ュ湪杩欓噷澶勭悊涓�涓�
-				if (this.customPrefix !== "uicon") return "";
+				if (this.customPrefix !== "uicon") {
+					return this.customIcons[this.customPrefix + '-' + this.name] || this.name;
+				}
 				// 濡傛灉鍐呯疆鐨勫浘鏍囦腑鎵句笉鍒板搴旂殑鍥炬爣锛屽氨鐩存帴杩斿洖name鍊硷紝鍥犱负鐢ㄦ埛鍙兘浼犲叆鐨勬槸unicode浠g爜
 				return icons['uicon-' + this.name] || this.name
 			}
@@ -145,7 +157,7 @@
 			addStyle,
 			addUnit,
 			clickHandler(e) {
-				this.$emit('click', this.index)
+				this.$emit('click', this.index, e)
 				// 鏄惁闃绘浜嬩欢鍐掓场
 				this.stop && this.preventEvent(e)
 			}

--
Gitblit v1.9.1