Эх сурвалжийг харах

avatar组件增加defaultErrorImg属性

ming 3 жил өмнө
parent
commit
9ef4e0ca4d

+ 4 - 0
components/fs-avatar/fs-avatar.vue

@@ -81,6 +81,10 @@ const props = defineProps({
 	bottom: {
 		type: String,
 		default: '30rpx'
+	},
+	defaultErrorImg: {
+		type: String,
+		default: config.defaultErrorImg
 	}
 })
 

+ 2 - 1
utils/config.js

@@ -7,7 +7,8 @@ const config = {
 		showLoading: true,
 		showErrorMsg: true,
 		isAuth: true,
-	},
+	},
+	defaultErrorImg: ''
 }
 
 export default config