|
|
<template>
|
|
|
<div class="search">
|
|
|
<input v-if="showInput" type="text" name="">
|
|
|
<div v-else class="input" @click="changeToInput()">
|
|
|
<div v-else class="input" @click='yoho.goSearch()'>
|
|
|
<span class="icon icon-search"></span> Search
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -26,24 +25,16 @@ |
|
|
padding: 5px 0;
|
|
|
}
|
|
|
|
|
|
input {
|
|
|
width: 92%;
|
|
|
height: 55px;
|
|
|
padding: 10px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
const yoho = require('yoho');
|
|
|
|
|
|
module.exports = {
|
|
|
data() {
|
|
|
return {
|
|
|
showInput: false
|
|
|
yoho
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
changeToInput() {
|
|
|
this.showInput = true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script> |
...
|
...
|
|