Updated TheTool Frontend Framework & Table
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
Vue.component('tt-textarea', {
|
||||
props: {
|
||||
label: String,
|
||||
required: Boolean,
|
||||
value: String,
|
||||
rows: {
|
||||
type: String,
|
||||
default: "3",
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentText: this.value,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(newValue) {
|
||||
this.currentText = newValue;
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="form-group">
|
||||
<label :for="label">{{ label }}</label>
|
||||
<textarea class="form-control" :id="label" :required="required" v-model="currentText"
|
||||
@input="$emit('input', $event.target.value)" :rows="rows"></textarea>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
Reference in New Issue
Block a user