This commit is contained in:
zhuxiang
2017-02-28 10:24:33 +08:00
parent 44600789dc
commit c78fe71177
10 changed files with 131 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
<template>
<div class="z-search">
<div class="z-search__input-wrap" :class="{ 'is-focus' : isFocus }">
<input type="text" :value="value" :placeholder="placeholder" @focus="handleFocus" @blur="handleBlur">
<span class="zui-icon zui-icon-close"></span>
</div>
</div>
</template>
<script>
export default {
name: 'z-search',
props: {
placeholder: String
},
data() {
return {
value: '',
isFocus: false
};
},
methods: {
handleFocus() {
this.isFocus = true;
},
handleBlur() {
this.isFocus = false;
}
}
};
</script>