1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| <template>
| <el-form-item :label="label" :prop="prop">
| <el-input
| clearable
| :model-value="value"
| :placeholder="placeholder"
| @input="handleInput"
| :style="'width:' + width + ';'"
| />
| </el-form-item>
| </template>
|
| <script>
| export default {
| props: {
| width:{
| type: String,
| default: '150px'
| },
| label: {
| type: String,
| default: '查询项'
| },
| placeholder: {
| type: String,
| default: '输入搜索内容'
| },
| // 返回结果
| value: String,
| prop: String
| },
| emits: ['update:value'],
| data() {
| return {};
| },
| methods: {
| handleInput(value) {
| this.$emit('update:value', value);
| }
| }
| };
| </script>
|
|