Browse Source

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

Drjnigfubo 3 years ago
parent
commit
c70f222864

+ 1 - 1
package.json

@@ -116,7 +116,7 @@
     "transliteration": "^2.2.0",
     "ts-jest": "^26.5.5",
     "typescript": "^4.6.4",
-    "vite": "2.9.0",
+    "vite": "^3.0.0",
     "vite-plugin-dts": "^1.0.5",
     "vite-plugin-md": "^0.11.8",
     "vue": "^3.2.24",

+ 3 - 5
src/packages/__VUE/imagepreview/index.taro.vue

@@ -14,15 +14,13 @@
         :pagination-visible="paginationVisible"
         :pagination-color="paginationColor"
       >
-        <!-- <nut-swiper-item v-for="(item, index) in videos" :key="index">
-          <nut-video :source="item.source" :options="item.options"></nut-video>
-        </nut-swiper-item> -->
         <nut-swiper-item v-for="(item, index) in images" :key="index">
-          <image mode="aspectFit" :src="item.src" class="nut-imagepreview-img" />
+          <!-- <image mode="aspectFit" :src="item.src" class="nut-imagepreview-img" /> -->
+          <img :src="item.src" mode="aspectFit" class="nut-imagepreview-img" />
         </nut-swiper-item>
       </nut-swiper>
     </view>
-    <!-- <view class="nut-imagepreview-index"> {{ active }} / {{ images.length + videos.length }} </view> -->
+
     <view class="nut-imagepreview-index" v-if="showIndex"> {{ active }} / {{ images.length }} </view>
     <view class="nut-imagepreview-close-icon" @click="handleCloseIcon" :style="styles" v-if="closeable"
       ><nut-icon :name="closeIcon" v-bind="$attrs" color="#ffffff"></nut-icon

+ 7 - 0
src/packages/__VUE/trendarrow/__tests__/__snapshots__/trendarrow.spec.ts.snap

@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render triangle size when set iconsize 1`] = `
+"<view class=\\"nut-trendarrow\\"><span class=\\"nut-trendarrow-icon-before nut-trendarrow-rate\\" style=\\"color: rgb(100, 181, 120);\\">10.00%</span><i class=\\"nutui-iconfont nut-icon nut-icon-triangle-down\\" style=\\"color: rgb(100, 181, 120); font-size: 14px; width: 14px; height: 14px;\\" src=\\"\\"></i>
+  <!--v-if-->
+</view>"
+`;

+ 2 - 2
src/packages/__VUE/trendarrow/__tests__/trendarrow.spec.ts

@@ -78,8 +78,8 @@ test('should render left icon when arrowLeft', async () => {
       arrowLeft: true
     }
   });
-  expect(wrapper.findAll('.nut-trendarrow-icon-before').length).toBe(1);
-  expect(wrapper.findAll('.nut-trendarrow-icon-after').length).toBe(0);
+  expect(wrapper.findAll('.nut-trendarrow-icon-before').length).toBe(0);
+  expect(wrapper.findAll('.nut-trendarrow-icon-after').length).toBe(1);
 });
 test('should render sync text color when syncTextColor is true', async () => {
   const wrapper = mount(Trendarrow, {