DataRerun.vue 1.28 KB
<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>