1
lzhe
2024-06-03 a786409d7f6769f43c107159dd84faf4a2927a9a
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
<template>
    <sc-table-select v-model="value" :apiObj="apiObj" :table-width="600" :multiple="item.options.multiple" :props="item.options.props" style="width: 100%;">
        <el-table-column  v-for="(_item, _index) in item.options.column" :key="_index" :prop="_item.prop" :label="_item.label" :width="_item.width"></el-table-column>
    </sc-table-select>
</template>
 
<script>
    export default {
        name: 'uploadRender',
        props: {
            modelValue: [String, Number, Boolean, Date, Object, Array],
            item: { type: Object, default: () => {} }
        },
        data() {
            return {
                value: this.modelValue,
                apiObj: this.getApiObj()
            }
        },
        watch:{
            value(val){
                this.$emit("update:modelValue", val)
            }
        },
        mounted() {
 
        },
        methods: {
            getApiObj(){
                return eval(`this.`+this.item.options.apiObj)
            }
        }
    }
</script>
 
<style>
</style>