acdr-ui/dist/dev/mp-weixin/sheep/components/s-uploader/s-uploader.js.map

1 line
29 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"s-uploader.js","sources":["../../../../../../src/sheep/components/s-uploader/s-uploader.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtdXBsb2FkZXIvcy11cGxvYWRlci52dWU"],"sourcesContent":["<!-- 文件上传,基于 upload-file 和 upload-image 实现 -->\r\n<template>\r\n <view class=\"uni-file-picker\">\r\n <view v-if=\"title\" class=\"uni-file-picker__header\">\r\n <text class=\"file-title\">{{ title }}</text>\r\n <text class=\"file-count\">{{ filesList.length }}/{{ limitLength }}</text>\r\n </view>\r\n <view v-if=\"subtitle\" class=\"file-subtitle\">\r\n <view>{{ subtitle }}</view>\r\n </view>\r\n <upload-image\r\n v-if=\"fileMediatype === 'image' && showType === 'grid'\"\r\n :readonly=\"readonly\"\r\n :image-styles=\"imageStyles\"\r\n :files-list=\"url\"\r\n :limit=\"limitLength\"\r\n :disablePreview=\"disablePreview\"\r\n :delIcon=\"delIcon\"\r\n @uploadFiles=\"uploadFiles\"\r\n @choose=\"choose\"\r\n @delFile=\"delFile\"\r\n >\r\n <slot>\r\n <view class=\"is-add\">\r\n <image :src=\"imgsrc\" class=\"add-icon\"></image>\r\n </view>\r\n </slot>\r\n </upload-image>\r\n <upload-file\r\n v-if=\"fileMediatype !== 'image' || showType !== 'grid'\"\r\n :readonly=\"readonly\"\r\n :list-styles=\"listStyles\"\r\n :files-list=\"filesList\"\r\n :showType=\"showType\"\r\n :delIcon=\"delIcon\"\r\n @uploadFiles=\"uploadFiles\"\r\n @choose=\"choose\"\r\n @delFile=\"delFile\"\r\n >\r\n <slot><button type=\"primary\" size=\"mini\">选择文件</button></slot>\r\n </upload-file>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport { chooseAndUploadFile, uploadCloudFiles } from './choose-and-upload-file.js'\r\nimport {\r\n get_file_ext,\r\n get_extname,\r\n get_files_and_is_max,\r\n get_file_info,\r\n get_file_data,\r\n} from './utils.js'\r\nimport uploadImage from './upload-image.vue'\r\nimport uploadFile from './upload-file.vue'\r\nimport sheep from '@/sheep'\r\nlet fileInput = null\r\n/**\r\n * FilePicker 文件选择上传\r\n * @description 文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间\r\n * @tutorial https://ext.dcloud.net.cn/plugin?id=4079\r\n * @property {Object|Array}\tvalue\t组件数据通常用来回显 ,类型由return-type属性决定\r\n * @property {String|Array}\turl\t url数据\r\n * @property {Boolean}\tdisabled = [true|false]\t组件禁用\r\n * \t@value true \t禁用\r\n * \t@value false \t取消禁用\r\n * @property {Boolean}\treadonly = [true|false]\t组件只读不可选择不显示进度不显示删除按钮\r\n * \t@value true \t只读\r\n * \t@value false \t取消只读\r\n * @property {Boolean}\tdisable-preview = [true|false]\t禁用图片预览仅 mode:grid 时生效\r\n * \t@value true \t禁用图片预览\r\n * \t@value false \t取消禁用图片预览\r\n * @property {Boolean}\tdel-icon = [true|false]\t是否显示删除按钮\r\n * \t@value true \t显示删除按钮\r\n * \t@value false \t不显示删除按钮\r\n * @property {Boolean}\tauto-upload = [true|false]\t是否自动上传值为true则只触发@select,可自行上传\r\n * \t@value true \t自动上传\r\n * \t@value false \t取消自动上传\r\n * @property {Number|String}\tlimit\t最大选择个数 h5 会自动忽略多选的部分\r\n * @property {String}\ttitle\t组件标题右侧显示上传计数\r\n * @property {String}\tmode = [list|grid]\t选择文件后的文件列表样式\r\n * \t@value list \t列表显示\r\n * \t@value grid \t宫格显示\r\n * @property {String}\tfile-mediatype = [image|video|all]\t选择文件类型\r\n * \t@value image\t只选择图片\r\n * \t@value video\t只选择视频\r\n * \t@value all\t\t选择所有文件\r\n * @property {Array}\tfile-extname\t选择文件后缀根据 file-mediatype 属性而不同\r\n * @property {Object}\tlist-style\tmode:list 时的样<E79A84>