-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(van): add watermark treeSelect uploader
- Loading branch information
1 parent
34a001e
commit 34d81a8
Showing
4 changed files
with
394 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"name": "VanTreeSelect", | ||
"props": { | ||
"v-model:main-active-index": { | ||
"value": "", | ||
"description": "左侧选中项的索引", | ||
"default": "0", | ||
"type": "左侧选中项的索引" | ||
}, | ||
"v-model:active-id": { | ||
"value": "", | ||
"description": "右侧选中项的 id,支持传入数组", | ||
"default": "0", | ||
"type": "右侧选中项的 id,支持传入数组" | ||
}, | ||
"items": { | ||
"value": "", | ||
"description": "分类显示所需的数据", | ||
"default": "[]", | ||
"type": "分类显示所需的数据" | ||
}, | ||
"height": { | ||
"value": "", | ||
"description": "高度,默认单位为`px`", | ||
"default": "300", | ||
"type": "高度,默认单位为px" | ||
}, | ||
"max": { | ||
"value": "", | ||
"description": "右侧项最大选中个数", | ||
"default": "Infinity", | ||
"type": "右侧项最大选中个数" | ||
}, | ||
"selected-icon": { | ||
"value": "", | ||
"description": "自定义右侧栏选中状态的图标", | ||
"default": "success", | ||
"type": "自定义右侧栏选中状态的图标" | ||
} | ||
}, | ||
"methods": [], | ||
"typeDetail": { | ||
"TreeSelectItem": [ | ||
{ | ||
"name": "text", | ||
"description": "导航名称", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "badge", | ||
"description": "导航名称右上角徽标", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "dot", | ||
"description": "是否在导航名称右上角显示小红点", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "className", | ||
"description": "导航节点额外类名", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "children", | ||
"description": "该导航下所有的可选项", | ||
"type": "TreeSelectItemChild" | ||
} | ||
], | ||
"TreeSelectItemChild": [ | ||
{ | ||
"name": "text", | ||
"description": "名称", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "id", | ||
"description": "id,作为匹配选中状态的标识符", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "disabled", | ||
"description": "禁用选项", | ||
"type": "boolean" | ||
} | ||
] | ||
}, | ||
"events": [ | ||
{ | ||
"name": "click-nav", | ||
"description": "点击左侧导航时触发", | ||
"params": "点击左侧导航时触发" | ||
}, | ||
{ | ||
"name": "click-item", | ||
"description": "点击右侧选择项时触发", | ||
"params": "点击右侧选择项时触发" | ||
} | ||
], | ||
"link": "https://vant-contrib.gitee.io/vant/#/zh-CN/tree-select" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
{ | ||
"name": "VanUploader", | ||
"props": { | ||
"v-model": { | ||
"value": "", | ||
"description": "已上传的文件列表", | ||
"default": "-", | ||
"type": "已上传的文件列表" | ||
}, | ||
"accept": { | ||
"value": [ | ||
"image", | ||
"*" | ||
], | ||
"description": "允许上传的文件类型,[详细说明](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B)", | ||
"default": "image | *", | ||
"type": "允许上传的文件类型,[详细说明](https: | | developer.mozilla.org | zh-CN | docs | Web | HTML | Element | Input | file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B)" | ||
}, | ||
"name": { | ||
"value": "", | ||
"description": "标识符,通常为一个唯一的字符串或数字,可以在回调函数的第二项参数中获取", | ||
"default": "-", | ||
"type": "标识符,通常为一个唯一的字符串或数字,可以在回调函数的第二项参数中获取" | ||
}, | ||
"preview-size": { | ||
"value": "", | ||
"description": "预览图和上传区域的尺寸,默认单位为 `px`", | ||
"default": "80px", | ||
"type": "预览图和上传区域的尺寸,默认单位为 px" | ||
}, | ||
"preview-image": { | ||
"value": "", | ||
"description": "是否在上传完成后展示预览图", | ||
"default": "true", | ||
"type": "是否在上传完成后展示预览图" | ||
}, | ||
"preview-full-image": { | ||
"value": "", | ||
"description": "是否在点击预览图后展示全屏图片预览", | ||
"default": "true", | ||
"type": "是否在点击预览图后展示全屏图片预览" | ||
}, | ||
"preview-options": { | ||
"value": "", | ||
"description": "全屏图片预览的配置项,可选值见 [ImagePreview](#/zh-CN/image-preview)", | ||
"default": "-", | ||
"type": "全屏图片预览的配置项,可选值见 [ImagePreview](# | zh-CN | image-preview)" | ||
}, | ||
"multiple": { | ||
"value": "", | ||
"description": "是否开启图片多选,部分安卓机型不支持", | ||
"default": "false", | ||
"type": "是否开启图片多选,部分安卓机型不支持" | ||
}, | ||
"disabled": { | ||
"value": "", | ||
"description": "是否禁用文件上传", | ||
"default": "false", | ||
"type": "是否禁用文件上传" | ||
}, | ||
"readonly": { | ||
"value": "", | ||
"description": "是否将上传区域设置为只读状态", | ||
"default": "false", | ||
"type": "是否将上传区域设置为只读状态" | ||
}, | ||
"deletable": { | ||
"value": "", | ||
"description": "是否展示删除按钮", | ||
"default": "true", | ||
"type": "是否展示删除按钮" | ||
}, | ||
"reupload `v4.4.0`": { | ||
"value": "", | ||
"description": "是否开启覆盖上传,开启后会关闭图片预览", | ||
"default": "false", | ||
"type": "是否开启覆盖上传,开启后会关闭图片预览" | ||
}, | ||
"show-upload": { | ||
"value": "", | ||
"description": "是否展示上传区域", | ||
"default": "true", | ||
"type": "是否展示上传区域" | ||
}, | ||
"lazy-load": { | ||
"value": "", | ||
"description": "是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用", | ||
"default": "false", | ||
"type": "是否开启图片懒加载,须配合 [Lazyload](# | zh-CN | lazyload) 组件使用" | ||
}, | ||
"capture": { | ||
"value": "", | ||
"description": "图片选取模式,可选值为 `camera` (直接调起摄像头)", | ||
"default": "-", | ||
"type": "图片选取模式,可选值为 camera (直接调起摄像头)" | ||
}, | ||
"after-read": { | ||
"value": "", | ||
"description": "文件读取完成后的回调函数", | ||
"default": "-", | ||
"type": "文件读取完成后的回调函数" | ||
}, | ||
"before-read": { | ||
"value": "", | ||
"description": "文件读取前的回调函数,返回 `false` 可终止文件读取, 支持返回 `Promise`", | ||
"default": "-", | ||
"type": "文件读取前的回调函数,返回 false 可终止文件读取, 支持返回 Promise" | ||
}, | ||
"before-delete": { | ||
"value": "", | ||
"description": "文件删除前的回调函数,返回 `false` 可终止文件读取, 支持返回 `Promise`", | ||
"default": "-", | ||
"type": "文件删除前的回调函数,返回 false 可终止文件读取, 支持返回 Promise" | ||
}, | ||
"max-size": { | ||
"value": "", | ||
"description": "文件大小限制,单位为 `byte`", | ||
"default": "Infinity", | ||
"type": "文件大小限制,单位为 byte" | ||
}, | ||
"max-count": { | ||
"value": "", | ||
"description": "文件上传数量限制", | ||
"default": "Infinity", | ||
"type": "文件上传数量限制" | ||
}, | ||
"result-type": { | ||
"value": "", | ||
"description": "文件读取结果类型,可选值为 `file` `text`", | ||
"default": "dataUrl", | ||
"type": "文件读取结果类型,可选值为 file text" | ||
}, | ||
"upload-text": { | ||
"value": "", | ||
"description": "上传区域文字提示", | ||
"default": "-", | ||
"type": "上传区域文字提示" | ||
}, | ||
"image-fit": { | ||
"value": "", | ||
"description": "预览图裁剪模式,可选值见 [Image](#/zh-CN/image) 组件", | ||
"default": "cover", | ||
"type": "预览图裁剪模式,可选值见 [Image](# | zh-CN | image) 组件" | ||
}, | ||
"upload-icon": { | ||
"value": "", | ||
"description": "上传区域图标名称或图片链接,等同于 Icon 组件的 [name 属性](#/zh-CN/icon#props)", | ||
"default": "photograph", | ||
"type": "上传区域图标名称或图片链接,等同于 Icon 组件的 [name 属性](# | zh-CN | icon#props)" | ||
} | ||
}, | ||
"methods": [], | ||
"typeDetail": { | ||
"ResultType": [ | ||
{ | ||
"name": "file", | ||
"description": "结果仅包含 File 对象", | ||
"type": "" | ||
}, | ||
{ | ||
"name": "text", | ||
"description": "结果包含 File 对象,以及文件的文本内容", | ||
"type": "" | ||
}, | ||
{ | ||
"name": "dataUrl", | ||
"description": "结果包含 File 对象,以及文件对应的 base64 编码", | ||
"type": "" | ||
} | ||
] | ||
}, | ||
"events": [ | ||
{ | ||
"name": "oversize", | ||
"description": "文件大小超过限制时触发", | ||
"params": "文件大小超过限制时触发" | ||
}, | ||
{ | ||
"name": "click-upload", | ||
"description": "点击上传区域时触发", | ||
"params": "点击上传区域时触发" | ||
}, | ||
{ | ||
"name": "click-preview", | ||
"description": "点击预览图时触发", | ||
"params": "点击预览图时触发" | ||
}, | ||
{ | ||
"name": "click-reupload", | ||
"description": "点击覆盖上传时触发", | ||
"params": "点击覆盖上传时触发" | ||
}, | ||
{ | ||
"name": "close-preview", | ||
"description": "关闭全屏图片预览时触发", | ||
"params": "关闭全屏图片预览时触发" | ||
}, | ||
{ | ||
"name": "delete", | ||
"description": "删除文件预览时触发", | ||
"params": "删除文件预览时触发" | ||
} | ||
], | ||
"link": "https://vant-contrib.gitee.io/vant/#/zh-CN/uploader" | ||
} |
Oops, something went wrong.