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
| <template>
| <el-select
| :model-value="modelValue"
| @update:model-value="handleChange"
| placeholder="污染背景"
| size="small"
| class="w-120"
| >
| <el-option
| v-for="(s, i) in pollutionList"
| :key="i"
| :label="s.label"
| :value="s.value"
| />
| </el-select>
| </template>
|
| <script>
| import { pollutionList } from '@/constant/pollution-degree';
| export default {
| props: {
| modelValue: String
| },
| emits: ['update:modelValue', 'initOver'],
| data() {
| return {
| pollutionList: pollutionList()
| };
| },
| methods: {
| handleChange(value) {
| this.$emit('update:modelValue', value);
| }
| },
| mounted() {
| this.$emit('initOver');
| // this.handleChange(this.pollutionList[0].value);
| }
| };
| </script>
|
|