Browse Source

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

Drjnigfubo 3 years ago
parent
commit
8fc38416a2

+ 1 - 1
src/packages/__VUE/addresslist/index.taro.vue

@@ -122,7 +122,7 @@ export default create({
     });
     //磨平参数差异
     const trowelData = () => {
-      if (Object.keys(props.dataMapOptions).length > 0 && props.data.length > 0) {
+      if (Object.keys(props.dataMapOptions).length > 0) {
         dataArray.value = props.data.map((item, index) => {
           return floatData(dataInfo, item, props.dataMapOptions);
         });

+ 1 - 1
src/packages/__VUE/addresslist/index.vue

@@ -123,7 +123,7 @@ export default create({
     //磨平参数差异
     const trowelData = () => {
       console.log('props.data', props.data);
-      if (Object.keys(props.dataMapOptions).length > 0 && props.data.length > 0) {
+      if (Object.keys(props.dataMapOptions).length > 0) {
         dataArray.value = props.data.map((item, index) => {
           return floatData(dataInfo, item, props.dataMapOptions);
         });

+ 7 - 0
src/packages/__VUE/barrage/index.scss

@@ -46,3 +46,10 @@
     }
   }
 }
+.nut-theme-dark {
+  .nut-barrage {
+    .dmitem {
+      color: $dark-color-gray;
+    }
+  }
+}

+ 21 - 0
src/packages/__VUE/collapseitem/index.scss

@@ -1,3 +1,24 @@
+.nut-theme-dark {
+  .nut-collapse-item {
+    .collapse-item {
+      background: $dark-background;
+      color: $dark-color;
+      box-shadow: none;
+    }
+    .collapse-wrapper {
+      .collapse-content,
+      .collapse-extraRender {
+        background: $dark-background;
+        color: $dark-color;
+      }
+    }
+    .collapse-extraWrapper {
+      .collapse-extraRender {
+        background: $dark-background;
+      }
+    }
+  }
+}
 .nut-collapse-item {
   position: relative;
   .collapse-item {

+ 5 - 1
src/packages/__VUE/countup/demo.vue

@@ -139,7 +139,11 @@ export default createDemo({
 }
 .show-demo {
   background: #ffffff;
-  padding: 0 20px;
+}
+.nut-theme-dark {
+  .show-demo {
+    background: $dark-background;
+  }
 }
 h2 {
   padding: 0 20px;

+ 24 - 3
src/packages/__VUE/countup/index.scss

@@ -1,7 +1,28 @@
+.nut-theme-dark {
+  .nut-countup {
+    background: $dark-background;
+    color: $dark-color;
+    box-shadow: none;
+  }
+  .nut-collapse-item {
+    .collapse-wrapper {
+      .collapse-content,
+      .collapse-extraRender {
+        background: $dark-background;
+        color: $dark-color;
+      }
+    }
+    .collapse-extraWrapper {
+      .collapse-extraRender {
+        background: $dark-background;
+      }
+    }
+  }
+}
 .nut-countup {
-  display: inline-block;
-  width: 100%;
-  padding: 5px;
+  display: block;
+  // width: 100%;
+  padding: 5px 20px;
   color: #000;
   font-weight: bold;
   font-family: PingFangSC-Regular;

+ 1 - 1
src/packages/__VUE/layout/demo.vue

@@ -160,7 +160,7 @@ export default createDemo({
 
 <style lang="scss" scoped>
 .box-item {
-  background: #fff;
+  background: $dark-background2;
   margin-bottom: 20px;
   padding: 20px 0;
 }

+ 9 - 1
src/packages/__VUE/signature/index.vue

@@ -26,7 +26,15 @@ export default create({
     },
     strokeStyle: {
       type: String,
-      default: '#000'
+      default: () => {
+        let bodyDom: any = document.getElementsByTagName('body');
+        let clsName = bodyDom[0]['className'];
+        if (clsName.indexOf('nut-theme-dark') == -1) {
+          return '#000';
+        } else {
+          return '#fff';
+        }
+      }
     },
     type: {
       type: String,