Skip to content

Commit 86c319c

Browse files
committed
docs(imgUpload): 更新文档
1 parent 3b30673 commit 86c319c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/components/base/upload-imgs/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,33 @@ export default {
4040
</script>
4141
```
4242

43+
### 初始化说明
44+
45+
初始化时传入数组, 如果初始化为空则传入空数组 `[]`, 如果已经存在内容, 内容结构要求如下:
46+
47+
| 属性 | 类型 | 是否必填 | 说明 |
48+
| :-----: | :-----------: | :------: | :---------------------------: |
49+
| id | String/Nuber || 初始化数据的 id, 推荐有该数据 |
50+
| imgId | String/Number || 图像资源 id |
51+
| src | String || 图像相对地址 |
52+
| display | String || 图像完整地址, 用于展示 |
53+
54+
示例:
55+
56+
```js
57+
const initData = [{
58+
id: '12d3',
59+
display: 'http://img-home.7yue.pro/images/index/Lin_cms_%E5%B0%81%E9%9D%A2.png',
60+
src: '/images/index/Lin_cms_%E5%B0%81%E9%9D%A2.png',
61+
imgId: '238287',
62+
}, {
63+
id: '17qr',
64+
display: 'http://img-home.7yue.pro/images/index/Lin_UI_%E5%B0%81%E9%9D%A2.png',
65+
src: '/images/index/Lin_UI_%E5%B0%81%E9%9D%A2.png',
66+
imgId: '1232323',
67+
}];
68+
```
69+
4370
### 返回值说明
4471

4572
新上传的图像会有完整的图像信息

0 commit comments

Comments
 (0)