Browse Source

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

songchenglin3 5 years ago
parent
commit
d0c56dd598
3 changed files with 21 additions and 16 deletions
  1. 7 7
      src/packages/luckdraw/doc.md
  2. 2 2
      src/packages/swiper/doc.md
  3. 12 7
      src/packages/tab/tab.vue

+ 7 - 7
src/packages/luckdraw/doc.md

@@ -36,7 +36,7 @@ export default {
         pointerStyle: {
           width: '80px',
           height: '80px',
-          backgroundImage: 'url("https://img11.360buyimg.com/imagetools/jfs/t1/106989/15/11126/137350/5e265414E8ee514bc/3456bd0d3a0454da.png")',
+          backgroundImage: 'url("https://img11.360buyimg.com/imagetools/jfs/t1/89512/11/15244/137408/5e6f15edEf57fa3ff/cb57747119b3bf89.png")',
           backgroundSize: 'contain',
           backgroundRepeat: 'no-repeat',
         },
@@ -45,32 +45,32 @@ export default {
           {
             id: 'xiaomi',
             prizeName: '小米手机',
-            prizeImg: 'https://m.360buyimg.com/mobilecms/s843x843_jfs/t1/96788/40/337/73706/5dabd0e2E1f166028/7120ca2b421cb0a0.jpg!q70.dpg.webp',
+            prizeImg: 'https://img14.360buyimg.com/imagetools/jfs/t1/104165/34/15186/96522/5e6f1435E46bc0cb0/d4e878a15bfd9362.png',
           },
           {
             id: 'blue',
             prizeName: '蓝牙耳机',
-            prizeImg: 'https://m.360buyimg.com/mobilecms/s843x843_jfs/t1/65070/13/4325/183551/5d26e23fE09ab2010/a94eaff8242e6c63.jpg!q70.dpg.webp',
+            prizeImg: 'https://img13.360buyimg.com/imagetools/jfs/t1/91864/11/15108/139003/5e6f146dE1c7b511d/1ddc5aa6e502060a.jpg',
           },
           {
             id: 'apple',
             prizeName: 'apple watch',
-            prizeImg: 'https://m.360buyimg.com/mobilecms/s843x843_jfs/t1/105083/3/4010/126031/5de4aa51E1c7fefc6/0288f4cf3016e061.jpg!q70.dpg.webp',
+            prizeImg: 'https://img11.360buyimg.com/imagetools/jfs/t1/105385/19/15140/111093/5e6f1506E48bd0dfb/829a98a8cdb4c27f.png',
           },
           {
             id: 'fruit',
             prizeName: '迪士尼苹果',
-            prizeImg: 'https://m.360buyimg.com/mobilecms/s750x750_jfs/t1/47486/35/13399/356858/5da3cde2E9b3ec40f/3b3a56d54d5db565.jpg!q80.dpg.webp',
+            prizeImg: 'https://img11.360buyimg.com/imagetools/jfs/t1/108308/11/8890/237603/5e6f157eE489cccf1/26e0437cfd93b9c8.png',
           },
           {
             id: 'fish',
             prizeName: '海鲜套餐',
-            prizeImg: 'https://m.360buyimg.com/mobilecms/s843x843_jfs/t1/109529/24/1330/283533/5dfc836fE33d8ce6b/372adb638802710a.jpg!q70.dpg.webp',
+            prizeImg: 'https://img14.360buyimg.com/imagetools/jfs/t1/90507/38/15165/448364/5e6f15b4E5df0c718/4bd4c3d375eec312.png',
           },
           {
             id: 'thanks',
             prizeName: '谢谢参与',
-            prizeImg: 'https://img11.360buyimg.com/imagetools/jfs/t1/104502/28/10892/5123/5e265414Ec167392c/2831c6155895f33d.png',
+            prizeImg: 'https://img11.360buyimg.com/imagetools/jfs/t1/96116/38/15085/5181/5e6f15d1E48e31d30/71353b61dff705d4.png',
           }
         ],
         turnsNumber: 5, // 转动圈数

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

@@ -14,7 +14,7 @@
     ref="demo1"
 >
     <div  v-for="(item,index) in dataItem" :key="index"  class="nut-swiper-slide">
-        <span>page{{item.name}}</span>
+        <span>page{{item.name} }</span>
     </div>
 </nut-swiper>
 ```
@@ -30,7 +30,7 @@
     ref="demo2"
 >
     <div  v-for="(item,index) in dataItem" :key="index"  class="nut-swiper-slide">
-        <span>page{{item.name}}</span>
+        <span>page{{item.name} }</span>
     </div>
 
 </nut-swiper>

+ 12 - 7
src/packages/tab/tab.vue

@@ -123,16 +123,13 @@ export default {
         };
     },
     watch:{
+        defIndex(){
+            this.updeteTab();
+        },
        initData:{
            handler(){
-            setTimeout(()=>{
-                let slot = [...this.$slots.default];
-                this.tabTitleList = [];
-                this.activeIndex = this.defIndex;
-                this.initTab(slot);  
-            },100);  
+            this.updeteTab();
            },
-           immediate:true,
            deep:true
        }
     },
@@ -154,6 +151,14 @@ export default {
         })     
     },
     methods: {
+        updeteTab:function(){
+            setTimeout(()=>{
+                let slot = [...this.$slots.default];
+                this.tabTitleList = [];
+                this.activeIndex = this.defIndex;
+                this.initTab(slot);  
+            },100);  
+        },
         closeItem:function(value){
             this.$emit('tab-remove',value); 
             setTimeout(()=>{