element-ui/examples/components/theme-configurator/editor/simpleText.vue

41 lines
745 B
Vue
Raw Permalink Normal View History

2021-06-07 11:56:04 +08:00
<template>
<section class="config" :key="displayName">
<div class="config-label">
<el-tooltip :content="displayName" placement="top">
<span>{{displayKeyName}}</span>
</el-tooltip>
</div>
<div class="config-content">
<theme-input
:val="value"
size="medium"
@change="onChange"
></theme-input>
</div>
</section>
</template>
<script>
import Input from './input';
import Mixin from './mixin';
export default {
components: {
themeInput: Input
},
data() {
return {
value: ''
};
},
mixins: [Mixin],
watch: {
'mergedValue': {
immediate: true,
handler(value) {
this.value = this.mergedValue;
}
}
}
};
</script>