Skip to content

Commit

Permalink
fix(swiper): 修复 swiper-item 宽高错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yang1206 committed Nov 25, 2023
1 parent 209be5e commit 0840982
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/components/exhibition/swiper.md
Expand Up @@ -445,8 +445,8 @@

| 参数 | 说明 | 类型 | 默认值 |
| ---------------------- | ----------------------------------------------------------- | -------------- | ----------- |
| width | 轮播卡片的宽度 | number \| string | window.innerWidth |
| height | 轮播卡片的高度 | number \| string | `0` |
| width | 轮播卡片的宽度 | number \| string | - |
| height | 轮播卡片的高度 | number \| string | - |
| direction | 轮播方向,可选值`horizontal`,`vertical` | string | `'horizontal'` |
| pagination-visible | 分页指示器是否展示 | boolean | `false` |
| pagination-color | 分页指示器选中的颜色 | string | `'#fff'` |
Expand Down
4 changes: 2 additions & 2 deletions packages/nutui/components/swiper/swiper.ts
Expand Up @@ -7,11 +7,11 @@ export const swiperProps = {
/**
* @description 轮播卡片的宽度
*/
width: makeNumericProp(uni.getSystemInfoSync().windowWidth),
width: makeNumericProp(''),
/**
* @description 轮播卡片的高度
*/
height: makeNumericProp(0),
height: makeNumericProp(''),
/**
* @description 轮播方向,可选值 `horizontal`, `vertical`
*/
Expand Down

1 comment on commit 0840982

@vercel
Copy link

@vercel vercel bot commented on 0840982 Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.