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

chore: 修复search组件eslint问题 #372

Merged
merged 1 commit into from
Apr 1, 2022
Merged
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
21 changes: 11 additions & 10 deletions packages/devui-vue/devui/search/src/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ export default defineComponent({
};

return () => {
const inputProps = {
size: props.size,
disabled: props.disabled,
autoFocus: props.autoFocus,
modelValue: keywords.value,
placeholder: props.placeholder,
cssClass: props.cssClass,
onKeydown: onInputKeydown,
"onUpdate:modelValue": onInputUpdate,
};
return (
<div class={rootClasses.value}>
{props.iconPosition === 'left' && (
<div class='devui-search__icon' onClick={onClickHandle}>
<d-icon name='search' size='inherit' key='search'></d-icon>
</div>
)}
<DInput
size={props.size}
disabled={props.disabled}
autoFocus={props.autoFocus}
modelValue={keywords.value}
maxLength={props.maxLength}
placeholder={props.placeholder}
cssClass={props.cssClass}
onKeydown={onInputKeydown}
onUpdate:modelValue={onInputUpdate}></DInput>
<DInput {...inputProps}></DInput>
{clearIconShow.value && (
<div class='devui-search__clear' onClick={onClearHandle}>
<d-icon name='close' size='inherit' key='close'></d-icon>
Expand Down