fileselect.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <el-main>
  3. <el-row :gutter="15">
  4. <el-col :lg="18">
  5. <el-card shadow="never">
  6. <el-alert title="资源库选择器即将弃用,将不会维护更新,与1.7版本之后将移除此组件" type="error" style="margin-bottom:20px;"></el-alert>
  7. <sc-file-select v-model="file" :multiple="multiple" :hideUpload="hideUpload" :max="99" @submit="submit">
  8. <template #do>
  9. <el-button>自定义插槽</el-button>
  10. </template>
  11. </sc-file-select>
  12. </el-card>
  13. </el-col>
  14. <el-col :lg="6">
  15. <el-card shadow="never" header="参数和方法">
  16. <el-button type="primary" @click="multiple = !multiple">切换multiple</el-button>
  17. <el-button type="primary" @click="hideUpload = !hideUpload">切换hideUpload</el-button>
  18. </el-card>
  19. </el-col>
  20. </el-row>
  21. </el-main>
  22. </template>
  23. <script>
  24. import scFileSelect from '@/components/scFileSelect'
  25. export default {
  26. name: 'fileselect',
  27. components: {
  28. scFileSelect
  29. },
  30. data() {
  31. return {
  32. file: '',
  33. multiple: false,
  34. hideUpload: false,
  35. upload: '',
  36. upload2: ''
  37. }
  38. },
  39. mounted() {
  40. },
  41. methods: {
  42. submit(value){
  43. console.log(value)
  44. this.$message("返回值请查看F12控制台console.log()")
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped>
  50. </style>