(component): layer.photos 新增缩略图thumb选项

This commit is contained in:
0o张不歪o0
2022-07-18 12:01:24 +08:00
parent f82e57c06c
commit 488470b1e7
6 changed files with 72 additions and 7 deletions

View File

@@ -286,6 +286,7 @@ const openRight = function() {
<button @click="signleImg">图片查看</button>
<button @click="signleImg2">图片标题</button>
<button @click="groupImg">图片分组</button>
<button @click="groupImg2">带缩略图</button>
</template>
<script>
@@ -307,6 +308,22 @@ const groupImg = function() {
]
})
}
const groupImg2 = function() {
layer.photos({
imgList:[
{
src:'http://www.pearadmin.com/assets/images/un8.svg',
alt:'图片1',
thumb:'http://www.pearadmin.com/assets/images/un8.svg'
},
{
src:'http://www.pearadmin.com/assets/images/un32.svg',
alt:'图片2',
thumb:'http://www.pearadmin.com/assets/images/un32.svg'
}
]
})
}
</script>
:::

View File

@@ -24,7 +24,7 @@
| shadeClose | 遮盖层关闭 | boolean | `true` | `true` `false` |
| shadeOpacity | 遮盖层透明度 | string | `0.1` | `0.1` - `1` |
| isHtmlFragment | 解析 html 字符 | boolean | `false` | `true` `false` |
| imgList | 图片数据数组 | array[{src:图片链接,alt:图片名字可选'}] | - | - |
| imgList | 图片数据数组 | array[{src:图片链接,alt:图片名字可选',thumb:'缩略图可选'}] | - | - |
| startIndex | 图片初始浏览索引 | number | 0 | - |
| full | 最大化回调 | function | - | - |
| min | 最小化回调 | function | - | - |