Skip to content

Commit

Permalink
fix(time-picker): fix issue with read-only mode still being editable (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oljc authored Jun 7, 2024
1 parent 94d229c commit d67843d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit d67843d

Please sign in to comment.