Skip to content

Commit

Permalink
Merge pull request #461 from lockiechen/staging
Browse files Browse the repository at this point in the history
bugfix(input): Search没有按规范实现
  • Loading branch information
ielgnaw authored Dec 4, 2023
2 parents 1022dd2 + 0e3620d commit 9bf7f40
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
21 changes: 21 additions & 0 deletions example/components/input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
cursor: pointer;
}
}
.btn-search-input {
display: flex;
}
</style>

[[toc]]
Expand Down Expand Up @@ -332,6 +335,21 @@
v-model="value"
@right-icon-click="handlerIconClick">
</bk-input>
<div class="btn-search-input mt10">
<bk-input
clearable
:placeholder="'搜索'"
>
<span slot="append"></span>
</bk-input>
<bk-button
theme="primary"
style="margin-left: -2px; border-radius: 0 2px 2px 0"
@click="handlerIconClick"
>
搜索
</bk-button>
</div>
</div>
</template>
<script>
Expand All @@ -358,6 +376,9 @@
.input-demo {
width: 500px;
}
.btn-search-input {
display: flex;
}
</style>
```
:::
Expand Down
6 changes: 3 additions & 3 deletions src/components/input/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
? inputPasswordIcon[0]
: inputPasswordIcon[1]
]"></i>
<i @click.stop.prevent="handlerClear" class="bk-icon icon-close-circle-shape clear-icon ml5" v-if="showClearIcon"></i>
<i :class="['bk-icon', rightIcon]" v-else-if="rightIcon"></i>
<i v-if="showClearIcon" @click.stop.prevent="handlerClear" class="bk-icon icon-close-circle-shape clear-icon ml5 mr5"></i>
<i :class="['input-right-icon', 'bk-icon', rightIcon]" v-if="rightIcon"></i>
<template v-if="type === 'text'">
<p class="bk-limit-box ml5" style="position: static" v-show="showInputWordLimit">
<span class="strong">{{ (curValue && curValue.length) || 0 }}</span
Expand Down Expand Up @@ -140,8 +140,8 @@
</bk-input>
*/
import emitter from '@/mixins/emitter'
import locale from 'bk-magic-vue/lib/locale'
import { getStyle } from '@/utils/dom'
import locale from 'bk-magic-vue/lib/locale'

// const toString = Object.prototype.toString

Expand Down
7 changes: 7 additions & 0 deletions src/ui/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@
}
}
}

.input-right-icon {
cursor: pointer;
&:hover {
color: $primaryColor;
}
}
}

.bk-form-input,
Expand Down

0 comments on commit 9bf7f40

Please sign in to comment.