¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦æ¾ç¤ºåç¹ |
| | | isDot: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.isDot |
| | | }, |
| | | // æ¾ç¤ºçå
容 |
| | | value: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.badge.value |
| | | }, |
| | | // æ¯å¦æ¾ç¤º |
| | | show: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.show |
| | | }, |
| | | // æå¤§å¼ï¼è¶
è¿æå¤§å¼ä¼æ¾ç¤º '{max}+' |
| | | max: { |
| | | type: [Number, String], |
| | | default: uni.$u.props.badge.max |
| | | }, |
| | | // 主é¢ç±»åï¼error|warning|success|primary |
| | | type: { |
| | | type: String, |
| | | default: uni.$u.props.badge.type |
| | | }, |
| | | // 彿°å¼ä¸º 0 æ¶ï¼æ¯å¦å±ç¤º Badge |
| | | showZero: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.showZero |
| | | }, |
| | | // èæ¯é¢è²ï¼ä¼å
级æ¯typeé«ï¼å¦è®¾ç½®ï¼typeåæ°ä¼å¤±æ |
| | | bgColor: { |
| | | type: [String, null], |
| | | default: uni.$u.props.badge.bgColor |
| | | }, |
| | | // åä½é¢è² |
| | | color: { |
| | | type: [String, null], |
| | | default: uni.$u.props.badge.color |
| | | }, |
| | | // å¾½æ å½¢ç¶ï¼circle-åè§å为åè§ï¼horn-å·¦ä¸è§ä¸ºç´è§ |
| | | shape: { |
| | | type: String, |
| | | default: uni.$u.props.badge.shape |
| | | }, |
| | | // 设置æ°åçæ¾ç¤ºæ¹å¼ï¼overflow|ellipsis|limit |
| | | // overflow伿 ¹æ®maxåæ®µå¤æï¼è¶
åºæ¾ç¤º`${max}+` |
| | | // ellipsis伿 ¹æ®max夿ï¼è¶
åºæ¾ç¤º`${max}...` |
| | | // limitä¼ä¾æ®1000ä½ä¸ºå¤ææ¡ä»¶ï¼è¶
åº1000ï¼æ¾ç¤º`${value/1000}K`ï¼æ¯å¦2.2kã3.34wï¼æå¤ä¿ç2ä½å°æ° |
| | | numberType: { |
| | | type: String, |
| | | default: uni.$u.props.badge.numberType |
| | | }, |
| | | // 设置badgeçä½ç½®åç§»ï¼æ ¼å¼ä¸º [x, y]ï¼ä¹å³è®¾ç½®ç为topårightçå¼ï¼absolute为trueæ¶ææ |
| | | offset: { |
| | | type: Array, |
| | | default: uni.$u.props.badge.offset |
| | | }, |
| | | // æ¯å¦åè½¬èæ¯ååä½é¢è² |
| | | inverted: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.inverted |
| | | }, |
| | | // æ¯å¦ç»å¯¹å®ä½ |
| | | absolute: { |
| | | type: Boolean, |
| | | default: uni.$u.props.badge.absolute |
| | | } |
| | | } |
| | | } |