Skip to content
Open
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/components/cascader/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/checkbox/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/radio/_usage/radio-group-props.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/radio/_usage/radio-props.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/range-input/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select-input/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/steps/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
2 changes: 1 addition & 1 deletion packages/components/tag-input/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
]
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
10 changes: 5 additions & 5 deletions packages/components/tag-input/useTagScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ import type { InputRef } from '../input';
import type { TdTagInputProps } from './type';

export default function useTagScroll(props: TdTagInputProps) {
const { excessTagsDisplayType, disabled } = props;
const readOnly = props.readOnly || props.readonly;
const { excessTagsDisplayType } = props;

const { classPrefix: prefix } = useConfig();

/** 标签输入框组件 ref */
const tagInputRef = useRef<InputRef>(null);
/** 滚动容器元素缓存(.input__prefix) */
const scrollElementRef = useRef<HTMLElement>();
const scrollElementRef = useRef<HTMLElement>(null);
/** 进入防抖定时器 */
const mouseEnterTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);

/** 是否为可交互的 scroll 模式 */
const isScrollMode = excessTagsDisplayType === 'scroll' && !readOnly && !disabled;
/** 是否为 scroll 模式 */
const isScrollMode = excessTagsDisplayType === 'scroll';

/** 获取滚动容器(带缓存) */
const getScrollElement = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/textarea/_usage/props.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"options": []
},
{
"name": "readonly",
"name": "readOnly",
"type": "Boolean",
"defaultValue": false,
"options": []
Expand Down
Loading