浏览代码

Merge branch 'next' of https://github.com/jdf2e/nutui into next

richard1015 4 年之前
父节点
当前提交
15428043ce
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/packages/swiper/demo.vue
  2. 1 1
      src/packages/swiper/doc.md
  3. 1 1
      src/packages/swiper/index.vue

+ 1 - 1
src/packages/swiper/demo.vue

@@ -149,7 +149,7 @@ export default createDemo({
       page4: 0,
       current: 1
     });
-    const change = index => {
+    const change = (index: number) => {
       state.current = index + 1;
     };
     return {

+ 1 - 1
src/packages/swiper/doc.md

@@ -114,7 +114,7 @@ app.use(Swiper);
 
 | 参数                   | 说明                                                        | 类型           | 默认值      |
 | ---------------------- | ----------------------------------------------------------- | -------------- | ----------- |
-| width                   | 轮播卡片的宽度                                            | Number、String        | 0       |
+| width                   | 轮播卡片的宽度                                            | Number、String        | window.innerWidth       |
 | height                | 轮播卡片的高度                                                    | String、Number | 0        |
 | direction               | 轮播方向                                            | String | 'horizontal'         |
 | pagination-visible          | 分页指示器是否展示                                              | Boolean         | false           |

+ 1 - 1
src/packages/swiper/index.vue

@@ -49,7 +49,7 @@ export default create({
   props: {
     width: {
       type: [Number, String],
-      default: 0
+      default: window.innerWidth
     },
     height: {
       type: [Number, String],