Browse Source

avatar组件增加defaultErrorImg属性

ming 3 years ago
parent
commit
9ef4e0ca4d
2 changed files with 6 additions and 1 deletions
  1. 4 0
      components/fs-avatar/fs-avatar.vue
  2. 2 1
      utils/config.js

+ 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