- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
JFilePop
        xinwu-yang edited this page Mar 1, 2023 
        ·
        1 revision
      
    Modal弹窗中的文件上传组件。显示弹窗需要通过$refs调用组件的show()方法。
/**
 * @param id string 唯一标识,可不传
 * @param filePath string 文件路径,可不传
 * @param fileType string 文件类型,值为'img' | 'file',默认'file',可不传
*/
show(id, filePath, fileType)<template>
	<j-file-pop ref="filePop" :number="3" @ok="handleFileSuccess" />
</template>
<script>
	export default {
    methods: {
      handleFileSuccess(file) {}
    },
    
    mounted() {
      this.$nextTick(() => {
        this.$refs.filePop.show()
      })
    }
  }
</script>| 属性 | 说明 | 类型 | 必填 | 默认值 | 
|---|---|---|---|---|
| title | 弹窗标题 | string | ||
| width | 弹窗宽度 | number | 520 | |
| disabled | 是否禁用 | boolean | false | |
| number | 上传文件数量 | number | 0 | 
| 事件名称 | 说明 | 回调参数 | 
|---|---|---|
| ok | 点击确定后调用 | function(obj) |