¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // 头åå¾çè·¯å¾(ä¸è½ä¸ºç¸å¯¹è·¯å¾) |
| | | src: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.src |
| | | }, |
| | | // 头åå½¢ç¶ï¼circle-åå½¢ï¼square-æ¹å½¢ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.shape |
| | | }, |
| | | // 头å尺寸 |
| | | size: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatar.size |
| | | }, |
| | | // è£åªæ¨¡å¼ |
| | | mode: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.mode |
| | | }, |
| | | // æ¾ç¤ºçæå |
| | | text: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.text |
| | | }, |
| | | // èæ¯è² |
| | | bgColor: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.bgColor |
| | | }, |
| | | // æåé¢è² |
| | | color: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.color |
| | | }, |
| | | // æåå¤§å° |
| | | fontSize: { |
| | | type: [String, Number], |
| | | default: uni.$u.props.avatar.fontSize |
| | | }, |
| | | // æ¾ç¤ºç徿 |
| | | icon: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.icon |
| | | }, |
| | | // æ¾ç¤ºå°ç¨åºå¤´åï¼åªå¯¹ç¾åº¦ï¼å¾®ä¿¡ï¼QQå°ç¨åºææ |
| | | mpAvatar: { |
| | | type: Boolean, |
| | | default: uni.$u.props.avatar.mpAvatar |
| | | }, |
| | | // æ¯å¦ä½¿ç¨éæºèæ¯è² |
| | | randomBgColor: { |
| | | type: Boolean, |
| | | default: uni.$u.props.avatar.randomBgColor |
| | | }, |
| | | // å 载失败çé»è®¤å¤´å(ç»ä»¶æå
ç½®é»è®¤å¾ç) |
| | | defaultUrl: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.defaultUrl |
| | | }, |
| | | // 妿é
ç½®äºrandomBgColor为trueï¼ä¸é
ç½®äºæ¤å¼ï¼åä»é»è®¤çèæ¯è²æ°ç»ä¸ååºå¯¹åºç´¢å¼çé¢è²å¼ï¼åå¼0-19ä¹é´ |
| | | colorIndex: { |
| | | type: [String, Number], |
| | | // æ ¡éªåæ°è§åï¼ç´¢å¼å¨0-19ä¹é´ |
| | | validator(n) { |
| | | return uni.$u.test.range(n, [0, 19]) || n === '' |
| | | }, |
| | | default: uni.$u.props.avatar.colorIndex |
| | | }, |
| | | // ç»ä»¶æ è¯ç¬¦ |
| | | name: { |
| | | type: String, |
| | | default: uni.$u.props.avatar.name |
| | | } |
| | | } |
| | | } |