Browse Source

Merge branch 'v3-dev' of https://github.com/jdf2e/nutui into v3-dev

guoxiaoxiao8 5 years ago
parent
commit
0fbe4dfc23

File diff suppressed because it is too large
+ 26 - 15
src/assets/svg/qr.svg


+ 0 - 1
src/assets/svg/qrcode.svg

@@ -1 +0,0 @@
-<svg width="40" height="39" xmlns="http://www.w3.org/2000/svg"><g fill="#2E2D2D" fill-rule="evenodd"><path d="M34 39a6 6 0 0 0 6-6v-3.5a1.5 1.5 0 1 0-3 0V33a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-3.5a1.5 1.5 0 1 0-3 0V33a6 6 0 0 0 6 6h28M38.5 18a1.5 1.5 0 1 1 0 3h-5a1.5 1.5 0 1 1 0-3h5M26.5 18a1.5 1.5 0 1 1 0 3h-25a1.5 1.5 0 1 1 0-3h25M40 6a6 6 0 0 0-6-6H6a6 6 0 0 0-6 6v3.5a1.5 1.5 0 1 0 3 0V6a3 3 0 0 1 3-3h28a3 3 0 0 1 3 3v3.5a1.5 1.5 0 1 0 3 0V6"/></g></svg>

+ 38 - 34
src/packages/button/demo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="btn-demo">
     <h4>按钮状态</h4>
     <div class="btn-state">
       <nut-button block>默认状态</nut-button>
@@ -113,51 +113,55 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.btn-demo {
+  padding: 0 15px;
+}
 .bg {
-	margin: 0 10px;
+  margin: 0 10px;
 }
 
 .gap {
-	height: 10px;
+  height: 10px;
 }
 
 .white-bg {
-	padding: 10px;
-	background: #fff;
+  padding: 10px;
+  background: #fff;
 }
 
 .btn-state {
-	button {
-		margin-bottom: 10px;
-	}
+  button {
+    margin-bottom: 10px;
+    border-radius: 4px;
+  }
 }
 
 .btn-size {
-	display: flex;
-	align-items: flex-end;
-	justify-content: space-around;
-	margin-top: 24px;
-
-	&.two {
-		button {
-			width: 168px;
-		}
-	}
-
-	&.three {
-		button {
-			width: 109px;
-		}
-	}
-
-	&.four {
-		button {
-			width: 79px;
-		}
-
-		.middle {
-			padding: 0;
-		}
-	}
+  display: flex;
+  align-items: flex-end;
+  justify-content: space-around;
+  margin-top: 24px;
+
+  &.two {
+    button {
+      width: 168px;
+    }
+  }
+
+  &.three {
+    button {
+      width: 108px;
+    }
+  }
+
+  &.four {
+    button {
+      width: 79px;
+    }
+
+    .middle {
+      padding: 0;
+    }
+  }
 }
 </style>

+ 3 - 0
src/packages/searchbar/demo.vue

@@ -102,6 +102,9 @@ export default {
 </script>
 <style lang="scss" scoped>
 h4{
+  
+  padding: 11px 20px;
+  margin: 0;
   font-size: 15px;
   color: #323232;
 }

+ 3 - 2
src/packages/sidenavbaritem/sidenavbaritem.scss

@@ -1,8 +1,9 @@
 .nut-sidenavbaritem {
-	height: 48px;
-	line-height: 48px;
+    padding: 12px 0;
 
 	.item-title {
+        height: 24px;
+        line-height: 24px;
 		color: $text-black-2;
 		background-color: #fff;
 		text-decoration: none;

+ 9 - 7
src/packages/subsidenavbar/subsidenavbar.scss

@@ -7,8 +7,8 @@
 	.item-title {
 		display: flex;
 		width: 100%;
-		height: 48px;
-		position: relative;
+        position: relative;
+        padding: 12px 0;
 		overflow: hidden;
 		text-overflow: ellipsis;
 		white-space: nowrap;
@@ -26,20 +26,22 @@
 		.sidenavbar-title {
 			display: flex;
 			width: 80%;
-			height: 100%;
 			flex-flow: column;
 			color: $text-black-2;
 			text-decoration: none;
-			justify-content: center;
+            justify-content: center;
+            .sidenavbar-title-title{
+                height: 24px;
+                line-height: 24px;
+            }
 		}
 	}
 
 	.sidenavbar-icon {
-		position: absolute;
+        position: absolute;
 		top: 50%;
-		right: 20px;
+        right: 20px;
 		transform: translateY(-50%);
-
 		i {
 			transition: transform $animation-duration $ease-in-out;
 

+ 2 - 2
src/packages/subsidenavbar/subsidenavbar.vue

@@ -3,12 +3,12 @@
     <div class="item-title" @click.stop="handleClick">
       <span v-if="$slots.icon" class="subsidenavbar-icon"><slot name="icon"></slot></span>
       <a href="javascript:;" class="sidenavbar-title">
-        {{ title }}
+        <span class="sidenavbar-title-title">{{ title }}</span>
         <slot name="desc"></slot>
       </a>
       <span class="sidenavbar-icon">
           <span v-if="$slots.oper"><slot name="oper"></slot></span>
-          <nut-icon v-if="!$slots.oper" type="self" :url="require('../../assets/svg/arrow-to-right.svg')"></nut-icon>
+          <nut-icon v-if="!$slots.oper" type="self" :url="require('../../assets/svg/arrow-to-right.svg')" size="16px"></nut-icon>
       </span>
     </div>
     <div class="sub-sidenavbar-list" :class="!direction ? 'nutFadeIn' : 'nutFadeOut'" :style="{ height: !direction ? 'auto' : 0 }">

+ 4 - 4
src/packages/switch/demo.vue

@@ -8,11 +8,11 @@
         </nut-cell>
         <nut-cell>
             <div slot="title">开启禁用</div>
-            <span slot="desc"><nut-switch :disabled="true"></nut-switch></span>
+            <span slot="desc"><nut-switch :active="true" :disabled="true"></nut-switch></span>
         </nut-cell>
         <nut-cell>
             <div slot="title">关闭禁用</div>
-            <span slot="desc"><nut-switch @change="onChange" :active="true" :disabled="true"></nut-switch></span>
+            <span slot="desc"><nut-switch :disabled="true"></nut-switch></span>
         </nut-cell>
     </div>
 
@@ -24,11 +24,11 @@
         </nut-cell>
         <nut-cell>
             <div slot="title">开启禁用</div>
-            <span slot="desc"><nut-switch :disabled="true" size="small"></nut-switch></span>
+            <span slot="desc"><nut-switch :active="true" :disabled="true" size="small"></nut-switch></span>
         </nut-cell>
         <nut-cell>
             <div slot="title">关闭禁用</div>
-            <span slot="desc"><nut-switch @change="onChange" :active="true" :disabled="true" size="small"></nut-switch></span>
+            <span slot="desc"><nut-switch :disabled="true" size="small"></nut-switch></span>
         </nut-cell>
     </div>
 

+ 2 - 2
src/packages/switch/switch.scss

@@ -7,7 +7,6 @@
 	box-sizing: content-box;
 	border: 0;
 	transition: all $transition-duration $animation-timing-fun;
-
 	.nut-switch-btn {
 		position: absolute;
 		left: 0;
@@ -15,7 +14,8 @@
 		border: 0;
 		border-radius: 50%;
 		box-sizing: border-box;
-		transition: all $transition-duration $animation-timing-fun;
+        transition: all $transition-duration $animation-timing-fun;
+        box-shadow: 0px 1px 6px 0px rgba(0,0,0,.1);
 	}
 
 	&.nut-switch-active {

+ 1 - 1
src/packages/uploader/uploader.vue

@@ -88,7 +88,7 @@ export default {
         },
         limitError: {
             type: String,
-            default: "对不起,您的浏览器不支持本组件"
+            default: "对不起,文件大小超出了限制"
         },
         withCredentials: {
             type: Boolean,