simpleText.vue 627 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <section class="config" :key="displayName">
  3. <div class="config-label">
  4. {{displayName}}
  5. </div>
  6. <div class="config-content">
  7. <theme-input
  8. :val="value"
  9. @change="onChange"
  10. ></theme-input>
  11. </div>
  12. </section>
  13. </template>
  14. <script>
  15. import Input from './input';
  16. import Mixin from './mixin';
  17. export default {
  18. components: {
  19. themeInput: Input
  20. },
  21. data() {
  22. return {
  23. value: ''
  24. };
  25. },
  26. mixins: [Mixin],
  27. watch: {
  28. 'mergedValue': {
  29. immediate: true,
  30. handler(value) {
  31. this.value = this.mergedValue;
  32. }
  33. }
  34. }
  35. };
  36. </script>