Files
JeecgBoot/ant-design-jeecg-vue/src/components/jeecg
2019-02-25 15:58:05 +08:00
..
2019-02-25 15:58:05 +08:00
2019-02-25 15:58:05 +08:00

日期组件 说明antd-vue日期组件需要用moment中转一下用起来不是很方便特二次封装使用时只需要传字符串即可

参数说明

placeholderplaceholder readOnlytrue/false value绑定v-model或是v-decorator后不需要设置 showTime是否展示时间true/false dateFormat日期格式 默认'YYYY-MM-DD' 若showTime设置为true则需要将其设置成对应的时间格式(如YYYY-MM-DD HH:mm:ss) triggerChange触发组件值改变的事件是否是change,当使用v-decorator时且没有设置decorator的option.trigger为input需要设置该值为true

使用示例

1.组件带有v-model的使用方法

2.组件带有v-decorator的使用方法 a).设置trigger-change属性为true b).设置decorator的option.trigger为input

3.其他使用 添加style 添加placeholder 添加readOnly

备注: script内需引入jdate

<script> import JDate from '@/components/jeecg/JDate' export default { name: "demo", components: { JDate }, .... </script>