mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-10 22:49:45 +08:00
feat(DatetimePicker): add readonly prop (#7107)
This commit is contained in:
parent
da193d0b71
commit
07f0b1b637
@ -256,6 +256,7 @@ export default {
|
|||||||
| cancel-button-text | Text of cancel button | _string_ | `Cancel` |
|
| cancel-button-text | Text of cancel button | _string_ | `Cancel` |
|
||||||
| show-toolbar | Whether to show toolbar | _boolean_ | `true` |
|
| show-toolbar | Whether to show toolbar | _boolean_ | `true` |
|
||||||
| loading | Whether to show loading prompt | _boolean_ | `false` |
|
| loading | Whether to show loading prompt | _boolean_ | `false` |
|
||||||
|
| readonly `v2.10.5` | Whether to be readonly | _boolean_ | `false` |
|
||||||
| filter | Option filter | _(type, vals) => vals_ | - |
|
| filter | Option filter | _(type, vals) => vals_ | - |
|
||||||
| formatter | Option text formatter | _(type, val) => val_ | - |
|
| formatter | Option text formatter | _(type, val) => val_ | - |
|
||||||
| columns-order `v2.9.2` | Array for ordering columns, where item can be set to<br> `year`, `month`, `day`, `hour` and `minute` | _string[]_ | - |
|
| columns-order `v2.9.2` | Array for ordering columns, where item can be set to<br> `year`, `month`, `day`, `hour` and `minute` | _string[]_ | - |
|
||||||
|
@ -265,6 +265,7 @@ export default {
|
|||||||
| cancel-button-text | 取消按钮文字 | _string_ | `取消` |
|
| cancel-button-text | 取消按钮文字 | _string_ | `取消` |
|
||||||
| show-toolbar | 是否显示顶部栏 | _boolean_ | `true` |
|
| show-toolbar | 是否显示顶部栏 | _boolean_ | `true` |
|
||||||
| loading | 是否显示加载状态 | _boolean_ | `false` |
|
| loading | 是否显示加载状态 | _boolean_ | `false` |
|
||||||
|
| readonly `v2.10.5` | 是否为只读状态,只读状态下无法切换选项 | _boolean_ | `false` |
|
||||||
| filter | 选项过滤函数 | _(type, vals) => vals_ | - |
|
| filter | 选项过滤函数 | _(type, vals) => vals_ | - |
|
||||||
| formatter | 选项格式化函数 | _(type, val) => val_ | - |
|
| formatter | 选项格式化函数 | _(type, val) => val_ | - |
|
||||||
| columns-order `v2.9.2` | 自定义列排序数组, 子项可选值为<br> `year`、`month`、`day`、`hour`、`minute` | _string[]_ | - |
|
| columns-order `v2.9.2` | 自定义列排序数组, 子项可选值为<br> `year`、`month`、`day`、`hour`、`minute` | _string[]_ | - |
|
||||||
|
@ -7,6 +7,7 @@ export const sharedProps = {
|
|||||||
...pickerProps,
|
...pickerProps,
|
||||||
value: null,
|
value: null,
|
||||||
filter: Function,
|
filter: Function,
|
||||||
|
columnsOrder: Array,
|
||||||
showToolbar: {
|
showToolbar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
@ -15,7 +16,6 @@ export const sharedProps = {
|
|||||||
type: Function,
|
type: Function,
|
||||||
default: (type, value) => value,
|
default: (type, value) => value,
|
||||||
},
|
},
|
||||||
columnsOrder: Array,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TimePickerMixin = {
|
export const TimePickerMixin = {
|
||||||
@ -94,6 +94,7 @@ export const TimePickerMixin = {
|
|||||||
<Picker
|
<Picker
|
||||||
ref="picker"
|
ref="picker"
|
||||||
columns={this.columns}
|
columns={this.columns}
|
||||||
|
readonly={this.readonly}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
onConfirm={this.onConfirm}
|
onConfirm={this.onConfirm}
|
||||||
onCancel={this.onCancel}
|
onCancel={this.onCancel}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user