hae
Version:
Mobile web UI based on Vux
132 lines (124 loc) • 3.6 kB
YAML
category:
en: Form
'zh-CN': 表单
icon: ''
extra:
zh-CN: |
```html
<group>
<calendar title="title" v-model="value"></calendar>
</group>
```
::: tip
`calendar`只能在`Group`中使用
<br>
除了`title`和 `value`, 其他`props`和`inline-calendar`完全一致。
:::
::: tip
当绑定值为数组时,日历将为多选模式
:::
en: |
```html
<group>
<calendar title="title" v-model="value"></calendar>
</group>
```
::: tip
`calendar` can be only used in `Group`
<br>
Except `title` and `value`, other `props` are the same as those of `inline-calendar`.
:::
tags:
en:
- calendar
- time
- date
zh-CN:
- 日历
- 日期
extends:
- inline-calendar
- popup
- cell
intro:
zh-CN: 扩展自inline-calendar, 相关属性可查看inline-calendar文档
en: extends from inline-calendar. Related props can be found in the document of inline-calendar
props:
value:
type: String
default: ''
zh-CN: "表单值, v-model 绑定。当值为空时,为单选;当值为[]时,为多选;设置值为'TODAY'可快捷选取当前日期。`placeholder`只有在值为空或[]时显示。"
en: form value, binding by v-model. Empty means single seleciton; [] means multiple selection. When the value is "TODAY", can quick pick current date. `placeholder` is valid only when the value is empty or [].
title:
type: String
default: ''
zh-CN: label文字
en: text of label
placeholder:
type: String
en: placeholder
zh-CN: 占位提示文字
show-popup-header:
version: v2.6.0
type: Boolean
en: whether show popup header. Show under multiple selection mode; hide under single selection mode.
zh-CN: 是否显示弹窗头部,当为多选时强制显示,单选时默认不显示
popup-header-title:
version: v2.6.0
type: String
en: popup header title
zh-CN: 弹窗头部文字
display-format:
version: v2.6.4
type: Function
params: '`(value, type)`'
en: format value before displaying in cell
zh-CN: 格式化显示值
readonly:
version: v2.7.2
en: whether disable selecting
zh-CN: 是否禁用弹窗选择
events:
on-change:
params: (value)
en: emits when value changes
zh-CN: 值改变时触发
on-show:
en: emits when popup shows
zh-CN: 弹窗显示时触发
on-hide:
en: emits when popup hides
zh-CN: 弹窗关闭时触发
changes:
2.7.6:
en:
- '[fix] fix no hiding after selecting the same value #2306'
zh-CN:
- '[fix] 修复选中同个日期时无法自动关闭的问题 #2306'
v2.7.2:
en:
- '[feature] add prop:readonly #2178'
- '[fix] fix event:on-change fires multiple times'
zh-CN:
- '[feature] 支持禁用选择属性 prop:readonly #2178'
- '[fix] 修复 on-change 事件重复触发的问题'
v2.7.0:
en:
- '[fix] fix top border #2104'
zh-CN:
- '[fix] 修复上边框 #2104'
v2.6.4:
en:
- '[feature] support prop:display-format #2023'
zh-CN:
- '[feature] 支持格式化值显示 #2023'
v2.6.0:
en:
- '[feature] support prop:show-popup-header'
zh-CN:
- '[feature] 支持显示弹窗头部(取消,确定)'
v2.5.10:
en:
- '[feature] Support prop:placeholder'
zh-CN:
- '[feature] 支持 prop:placeholder'