gaoshp
2024-10-09 9ccaa7a607481405ee22519aa49c786a46b95e22
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
55
<template>
    <el-main>
        <el-row :gutter="15">
            <el-col :lg="18">
                <el-card shadow="never">
                    <el-alert title="资源库选择器即将弃用,将不会维护更新,与1.7版本之后将移除此组件" type="error" style="margin-bottom:20px;"></el-alert>
                    <sc-file-select v-model="file" :multiple="multiple" :hideUpload="hideUpload" :max="99" @submit="submit">
                        <template #do>
                            <el-button>自定义插槽</el-button>
                        </template>
                    </sc-file-select>
                </el-card>
            </el-col>
            <el-col :lg="6">
                <el-card shadow="never" header="参数和方法">
                    <el-button type="primary" @click="multiple = !multiple">切换multiple</el-button>
                    <el-button type="primary" @click="hideUpload = !hideUpload">切换hideUpload</el-button>
                </el-card>
            </el-col>
        </el-row>
    </el-main>
</template>
 
<script>
    import scFileSelect from '@/components/scFileSelect'
 
    export default {
        name: 'fileselect',
        components: {
            scFileSelect
        },
        data() {
            return {
                file: '',
                multiple: false,
                hideUpload: false,
                upload: '',
                upload2: ''
            }
        },
        mounted() {
 
        },
        methods: {
            submit(value){
                console.log(value)
                this.$message("返回值请查看F12控制台console.log()")
            }
        }
    }
</script>
 
<style scoped>
 
</style>