- 公司内部ui组件库
npm install elu-ui -s
yarn add elu-ui -s
main.js:
import elu-ui from 'elu-ui'
vue.use(elu-ui)
template:
<elu-select-time-picker
:modelValue="timeValue"
@update:modelValue="timeValue = $event"
:selectRange="timeRange"
/>
js:
data(){
return{
timeValue:"",
timeRange:"05:00-01:00"
}
}
参数 | 说明 |
---|---|
modelValue | 动态绑定的属性值 |
selectRange | 传递时间范围 |
方法名 | 说明 |
---|---|
update:modelValue | 返回子组件修改的值 |
template:
<elu-select-granularity-picker
@getTime="getTime"
propStartTime="05:00"
propEndTime="01:00"
propTimeSpan="60"
/>
js:
getTime(val){
console.log('val: ', val);
}
参数 | 说明 |
---|---|
propStartTime | 开始时间 |
propEndTime | 结束时间 |
propTimeSpan | 时间粒度 |
方法名 | 说明 |
---|---|
getTime | 获取修改时间 |