Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(time-picker): fix issue with read-only mode still being editable #3173

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/web-vue/components/time-picker/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ description: Select the time on the pop-up panel to conveniently complete the ti
|readonly|Whether it is read-only mode|`boolean`|`false`|
|error|Whether it is an error state|`boolean`|`false`|
|format|Display the format of the date, refer to [String Parsing Format](#String Parsing Format)|`string`|`'HH:mm:ss'`|
|placeholder|Prompt copy|`string`|`-`|
|placeholder|Prompt copy|`string \| string[]`|`-`|
|size|Input box size|`'mini' \| 'small' \| 'medium' \| 'large'`|`'medium'`|
|popup-container|Mount container for pop-up box|`string \| HTMLElement`|`-`|
|use12-hours|12 hour clock|`boolean`|`false`|
Expand Down
2 changes: 1 addition & 1 deletion packages/web-vue/components/time-picker/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ description: 在弹出面板上选择时间,以便捷完成时间输入的控
|readonly|是否为只读模式|`boolean`|`false`|
|error|是否为错误状态|`boolean`|`false`|
|format|展示日期的格式,参考[字符串解析格式](#字符串解析格式)|`string`|`'HH:mm:ss'`|
|placeholder|提示文案|`string`|`-`|
|placeholder|提示文案|`string \| string[]`|`-`|
|size|输入框尺寸|`'mini' \| 'small' \| 'medium' \| 'large'`|`'medium'`|
|popup-container|弹出框的挂载容器|`string \| HTMLElement`|`-`|
|use12-hours|12 小时制|`boolean`|`false`|
Expand Down
4 changes: 2 additions & 2 deletions packages/web-vue/components/time-picker/time-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
:visible="panelVisible"
:disabled="mergedDisabled"
:error="error"
:readonly="readonly"
:editable="!readonly"
:allow-clear="allowClear && !readonly"
:placeholder="computedPlaceholder"
Expand Down Expand Up @@ -93,7 +94,6 @@ import Trigger, { TriggerProps } from '../trigger';
import DateInput from '../_components/picker/input.vue';
import DateRangeInput from '../_components/picker/input-range.vue';
import IconClockCircle from '../icon/icon-clock-circle';
import { TimePickerProps } from './interface';
import useState from '../_hooks/use-state';
import useTimeFormat from './hooks/use-time-format';
import useTimeState from './hooks/use-time-state';
Expand Down Expand Up @@ -190,7 +190,7 @@ export default defineComponent({
* @en Prompt copy
* */
placeholder: {
type: String,
type: [String, Array] as PropType<string | string[]>,
},
/**
* @zh 输入框尺寸
Expand Down
Loading