

<template>
    <h-search v-model="value" @input="handleIn" @enter="handleEnter" @keypress="handlePree" type="btn" placeholderAlign="center"/>
</template>

<script>
import hSearch from './index'
export default {
    name: "search-demo",
    components: {
        hSearch
    },
    data() {
        return {
            value: ''
        }
    },
    methods: {
        handleIn( v ) {
            console.log('外部 v',v);
            console.log('外部 value',this.value);
        },
        handlePree() {
            console.log('按键事件');
        },
        handleEnter() {
            console.log('确定事件');
        }
    }
}
</script>