59 lines
948 B
Vue
59 lines
948 B
Vue
<template>
|
|
<div>
|
|
<h2 class="title">忽略元素</h2>
|
|
<el-input v-model="value" :rows="1" type="textarea" placeholder="Please input" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { defineComponent } from 'vue';
|
|
import { ElInput } from 'element-plus';
|
|
|
|
export default defineComponent({
|
|
name: 'PromptInput',
|
|
components: {
|
|
ElInput
|
|
},
|
|
props: {
|
|
modelValue: {
|
|
type: String,
|
|
default: undefined
|
|
}
|
|
},
|
|
emits: ['update:modelValue'],
|
|
data() {
|
|
return {
|
|
value: this.modelValue
|
|
};
|
|
},
|
|
watch: {
|
|
modelValue(val) {
|
|
if (val !== this.value) {
|
|
this.value = val;
|
|
}
|
|
},
|
|
value(val) {
|
|
this.$emit('update:modelValue', val);
|
|
}
|
|
},
|
|
mounted() {}
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.field {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
|
|
.title {
|
|
font-size: 14px;
|
|
margin-bottom: 0;
|
|
width: 30%;
|
|
}
|
|
.value {
|
|
flex: 1;
|
|
}
|
|
}
|
|
</style>
|