@beisen/upaas-avatar-show
v0.0.9
Published
* 文本框的搜索态组件
Downloads
25
Maintainers
Readme
@beisen/upaas-avatar-show
文本框的搜索态组件
默认需要的参数
/**必传参数
* @param {String} title 下拉按钮文本---必传
* @param {Array} userinfo 用户信息
* @param "userinfo": [
{
id: "11",
name: "测试111",
Avatar: {
hasAvatar: true, //是否有头像
big: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_b.jpg",
medium: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_m.jpg",
original: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_o.jpg",
small: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_s.jpg"
}
},
{
id: "12",
name: "技术员",
Avatar: {
hasAvatar: false,
big: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_b.jpg",
medium: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_m.jpg",
original: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_o.jpg",
small: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_s.jpg"
}
}
]
*/
/**可选参数
* @param {Boolean} isLink 是否为链接
* @param {String} linkURL 链接url
* @param {String} OpenMode 链接模式(_blank、_self、_parent、_top)
* @param {Boolean} Boolean 是否隐藏
* @param {Boolean} isTip 是否使用提示
- 使用demo
import AvatarShow from '@beisen/upaas-avatar-show';
class Demo extends Component{
constructor(props){
super(props);
this.state = {
"title": "同事(多选)", //标题
"isLink": true,
"linkURL": "http://www.baidu.com",
"OpenMode": "_blank",
"hidden": false,
"isTip": true,
"userinfo": [
{
id: "11",
name: "测试111",
Avatar: {
hasAvatar: true,
big: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_b.jpg",
medium: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_m.jpg",
original: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_o.jpg",
small: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_s.jpg"
}
},
{
id: "12",
name: "技术员",
Avatar: {
hasAvatar: false,
big: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_b.jpg",
medium: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_m.jpg",
original: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_o.jpg",
small: "//cache.tita.gift/Image/100013/4233e527dcd24ea594614b707f21cb1d_s.jpg"
}
}
]
}
}
render () {
return (
<div>
<AvatarShow {...this.state} />
</div>
)
}
}