Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<template>
<ui-label :filled="filled" :label-show="true">
<template slot="label"><slot></slot></template>
<textarea class="form-control ui-comment-field" v-model="message"></textarea>
</ui-label>
</template>
<script>
import uiLabel from './ui-label.vue';
export default {
components: {
uiLabel
},
watch: {
message (val) {
this.filled = val ? true : false
}
},
data: () => ({
message: '',
filled: false
})
}
</script>
@faforty

This comment has been minimized.

Copy link
Owner Author

commented Jan 20, 2017

<template>
  <ui-label :filled="filled" :label-show="true">
    <template slot="label"><slot></slot></template>
      <textarea class="form-control ui-comment-field" v-model="message"></textarea>
  </ui-label>
</template>
<script>
import uiLabel from './ui-label.vue';
export default {
    components: {
        uiLabel
    },
    watch: {
        message (val) {
            this.filled = val ? true : false
            this.$emit('input', val)
        }
    },
    data: () => ({
        message: '',
        filled: false
    })
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.