File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 22 <div class =' form-group' >
33 <label v-uni-for =' label' >{{label}}</label >
44 <textarea
5+ ref =" field"
56 v-uni-id =' label'
67 :placeholder =' placeholder'
78 class =' form-control'
1314 :name =' name'
1415 :wrap =' wrap'
1516 :disabled =" disabled"
16- @input =' updateValue' v-text =" value" ></textarea >
17+ @input =' updateValue'
18+ v-text =" value" ></textarea >
1719 <div v-if =" (validator && validator.errorCount) || error" class =" invalid-feedback" >
1820 <div v-for =" (error, index) in validator.errors.get(this.name)" :key =" index" >{{error}}</div >
1921 <div v-if =" error" >{{error}}</div >
@@ -50,7 +52,7 @@ export default {
5052 computed: {
5153 classList (){
5254 let classList = {
53- ' is-invalid' : (this .validator && this .validator .errorCount ) || this .error ,
55+ ' is-invalid' : (this .validator && this .validator .errorCount ) || this .error ,
5456 }
5557 if (this .controlClass ){
5658 classList[this .controlClass ] = true
@@ -63,6 +65,12 @@ export default {
6365 content: ' ' ,
6466 }
6567 },
68+ watch: {
69+ value () {
70+ this .$refs .field .value = this .value ;
71+ return this .value ;
72+ }
73+ },
6674 methods: {
6775 updateValue (e ) {
6876 this .content = e .target .value ;
@@ -74,4 +82,4 @@ export default {
7482
7583<style lang='scss' scoped>
7684
77- </style >
85+ </style >
You can’t perform that action at this time.
0 commit comments