DataRerun.vue
1.28 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
<template>
<a-select v-model:value="value" mode="multiple" style="width: 200px">
<a-select-option value="jack">全选</a-select-option>
<a-select-option value="jack">Jack</a-select-option>
<a-select-option value="lucy">Lucy</a-select-option>
<a-select-option value="disabled">Disabled</a-select-option>
<a-select-option value="Yiminghe">yiminghe</a-select-option>
</a-select>
</template>
<script>
import {reactive, ref} from 'vue'
import dataRerunApi from '@/views/DataRerun/DataRerunApi'
export default {
setup: function() {
// scalar
const value = ref()
// sequence
// mapping
const accountMap = reactive({})
// function
const getAccountList = function() {
dataRerunApi.getAccountList().then(
(r) => {
for (const item of r)
{
accountMap[item.id] = item.name
}
}
)
}
const initialize = function() {
getAccountList()
}
initialize()
return {
// scalar
value,
// sequence
// mapping
// function
}
}
}
</script>
<style scoped>
</style>