simpleText.vue 745 B

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