Appearance

so-time

so-time组件 是基于 u-picker 包装的一个专门选择日期时间的输入组件,可根据需要返回 日期时间 格式数据,没有列出的参数继承 u-picker 接口。

代码示例

模板代码

<so-time v-model="form.time" mode="date" @change="changeTime" :disabled="true" />

js代码

...
data(){
    return {
        form:{
            time:'2021-01-14'
        }
    }
},
methods:{
	changeTime(value){
        console.log(value);
    },
}
...

Props

参数说明类型默认值可选值
v-model/value输入值String''-
splitLetter日期分隔符String'-'-
mode日期选择器格式Boolean'date'month|date|dateTime|dateMinute|time|hourMinute
disabled是否禁用,禁用后能选择,但输入值不会变化Booleanfalsetrue
clearValue是否可以清空值Booleantruefalse

Events

方法名参数说明
changeFunction(record)返回选择值

Method

参数参数说明

更多说明请查看 u-picker 的日期选择模式介绍open in new window