JSFiddle - React, Tailwind, and code Playground
by ChangJoo Park
HTML
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<div id="app">
<div id="header">H</div>
<div id="body">
</div>
<div id="footer">
<textarea id="textarea" v-model="textAreaMessage"></textarea>
</div>
</div>
CSS
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#app {
display: flex;
flex-direction: column;
height: 500px;
}
#header {
flex: none;
height: 30px;
background-color: red;
}
#body {
flex: 1;
}
#footer {
flex:none;
background-color: red;
max-height: 90px;
height: 19px;
}
#textarea {
width: 100%;
overflow-y: auto;
resize: none;
}
JavaScript
var limit = 50px;
new Vue({
el: '#app',
data: function () {
return {
textAreaMessage: ''
}
},
watch: {
textAreaMessage: function (newVal) {
console.log('hello')
}
}
})