piros-ui
v1.2.0
Published
yuantu piros-ui for react
Downloads
2
Readme
piros-ui
安装
npm install piros-ui
示例
###引入样式
import 'piros-ui/style.css';
###日历选择组件
import React from 'react';
import {RangeDate} from 'piros-ui';
import 'piros-ui/style.css';
function onChange(startDate,endDate) {
console.log(startDate,endDate)
}
function onSelected(year,month,day) {
console.log(year,month,day)
}
var dates = {
startDate: "2016/11/3",//开始时间
endDate: "2016/12/4",//结束时间
isShowPicker: true //默认显示
}
render(
<div>
<RangeDate {...dates} onChange={onChange} onSelected={onSelected}/>
, dmountNode);
###select选择器
import React from 'react';
import {Select} from 'piros-ui';
import 'piros-ui/style.css';
function onChange(value,text){
console.log(value,text);
}
render(
<div>
<Select defaultValve="青岛市口腔医院" onChange={onChange}>
<Option value="青岛市口腔医院">青岛市口腔医院</Option>
<Option value="青岛市胶州中心医院">青岛市胶州中心医院</Option>
<Option value="青岛海慈医院(未开通)" disabled>青岛海慈医院(未开通)</Option>
<Option value="平度市人民医院">平度市人民医院</Option>
</Select>
<Select defaultValve="青岛市口腔医院" disabled onChange={onChange}>
<Option value="青岛市口腔医院">青岛市口腔医院</Option>
<Option value="青岛海慈医院(未开通)" disabled>青岛海慈医院(未开通)</Option>
</Select>
</div>
, dmountNode);