add Transfer component
add Transfer component
This commit is contained in:
parent
306e3f74e8
commit
77f7bb9533
15 changed files with 519 additions and 6 deletions
32
src/components/transfer/search.vue
Normal file
32
src/components/transfer/search.vue
Normal file
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<div :class="prefixCls">
|
||||
<i-input
|
||||
:value.sync="query"
|
||||
size="small"
|
||||
:icon="icon"
|
||||
:placeholder="placeholder"
|
||||
@on-click="handleClick"></i-input>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iInput from '../input/input.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
prefixCls: String,
|
||||
placeholder: String,
|
||||
query: String
|
||||
},
|
||||
computed: {
|
||||
icon () {
|
||||
return this.query === '' ? 'ios-search' : 'ios-close';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
if (this.query === '') return;
|
||||
this.query = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue