Skip to content

Commit a8f2156

Browse files
committed
fix(ChatPrompt): proxy disabled prop
Resolves #5300
1 parent 6485d21 commit a8f2156

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/runtime/components/ChatPrompt.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { ComponentConfig } from '../types/tv'
66
77
type ChatPrompt = ComponentConfig<typeof theme, AppConfig, 'chatPrompt'>
88
9-
export interface ChatPromptProps extends /** @vue-ignore */ Pick<TextareaProps, 'autofocusDelay' | 'autoresizeDelay' | 'maxrows' | 'icon' | 'avatar' | 'loading' | 'loadingIcon'> {
9+
export interface ChatPromptProps extends Pick<TextareaProps, 'rows' | 'autofocus' | 'autofocusDelay' | 'autoresize' | 'autoresizeDelay' | 'maxrows' | 'icon' | 'avatar' | 'loading' | 'loadingIcon' | 'disabled'> {
1010
/**
1111
* The element or component this component should render as.
1212
* @defaultValue 'form'
@@ -17,9 +17,6 @@ export interface ChatPromptProps extends /** @vue-ignore */ Pick<TextareaProps,
1717
* @defaultValue t('chatPrompt.placeholder')
1818
*/
1919
placeholder?: string
20-
autofocus?: TextareaProps['autofocus']
21-
autoresize?: TextareaProps['autoresize']
22-
rows?: TextareaProps['rows']
2320
/**
2421
* @defaultValue 'outline'
2522
*/
@@ -66,7 +63,7 @@ const model = defineModel<string>({ default: '' })
6663
const { t } = useLocale()
6764
const appConfig = useAppConfig() as ChatPrompt['AppConfig']
6865
69-
const textareaProps = useForwardProps(reactivePick(props, 'autofocus', 'autoresize', 'rows'))
66+
const textareaProps = useForwardProps(reactivePick(props, 'rows', 'autofocus', 'autofocusDelay', 'autoresize', 'autoresizeDelay', 'maxrows', 'icon', 'avatar', 'loading', 'loadingIcon'))
7067
7168
const getProxySlots = () => omit(slots, ['header', 'footer'])
7269
@@ -105,7 +102,7 @@ defineExpose({
105102
ref="textarea"
106103
v-model="model"
107104
:placeholder="placeholder || t('chatPrompt.placeholder')"
108-
:disabled="Boolean(error)"
105+
:disabled="Boolean(error) || disabled"
109106
variant="none"
110107
v-bind="{ ...textareaProps, ...$attrs }"
111108
:ui="transformUI(omit(ui, ['root', 'body', 'header', 'footer']), props.ui)"

0 commit comments

Comments
 (0)