mirror of
https://github.com/youzan/vant.git
synced 2026-01-27 02:00:43 +08:00
Merge branch '2.x' into dev
This commit is contained in:
@@ -113,7 +113,7 @@ export default createComponent({
|
||||
return (
|
||||
<div class={bem('index')}>
|
||||
{slots.index
|
||||
? slots.index()
|
||||
? slots.index({ index: state.active })
|
||||
: `${state.active + 1} / ${props.images.length}`}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -164,10 +164,10 @@ export default {
|
||||
|
||||
### Slots
|
||||
|
||||
| Name | Description |
|
||||
| ----- | -------------------------------------------- |
|
||||
| index | Custom index |
|
||||
| cover | Custom content that covers the image preview |
|
||||
| Name | Description | SlotProps |
|
||||
| --- | --- | --- |
|
||||
| index | Custom index | { index: index of current image } |
|
||||
| cover | Custom content that covers the image preview | - |
|
||||
|
||||
### onClose Parematers
|
||||
|
||||
|
||||
@@ -207,10 +207,10 @@ export default {
|
||||
|
||||
通过组件调用 `ImagePreview` 时,支持以下插槽:
|
||||
|
||||
| 名称 | 说明 |
|
||||
| ----- | ------------------------------ |
|
||||
| index | 自定义页码内容 |
|
||||
| cover | 自定义覆盖在图片预览上方的内容 |
|
||||
| 名称 | 说明 | 参数 |
|
||||
| ----- | ------------------------------ | ------------------------- |
|
||||
| index | 自定义页码内容 | { index: 当前图片的索引 } |
|
||||
| cover | 自定义覆盖在图片预览上方的内容 | - |
|
||||
|
||||
### onClose 回调参数
|
||||
|
||||
|
||||
Reference in New Issue
Block a user