<template>
    <div class="container w-auto m-auto bg-gray-200 mb-10">
        
        <div class="p-4">
            
            <span>添加内容</span>
            <textarea class="block my-2 w-full" :value="newContent"></textarea>
            <button class="bg-gray-300 py-2  px-4 rounded hover:bg-gray-400" @click="add"> add</button>
        </div>
    </div>
    
</template>
<script>
import Config from '../../js/config'
import RepEs from '../../js/repEs'

const esClient = new RepEs(Config.getData().data.ext)
export default {
    name: 'contentIndex',
    components: {
    },
    data() {
        return {
            newContent: '测试内容'
        }
    },
    methods: {
        add () {
            esClient.add(this.newContent)
        }
    }
}
</script>