Browse Source

fix: 优化

Drjnigfubo 3 years ago
parent
commit
31db8b0b4c
1 changed files with 32 additions and 0 deletions
  1. 32 0
      src/packages/__VUE/badge/__test__/__snapshots__/badge.spec.ts.snap

+ 32 - 0
src/packages/__VUE/badge/__test__/__snapshots__/badge.spec.ts.snap

@@ -0,0 +1,32 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should change dot position when using offset prop: -2px 1`] = `""`;
+
+exports[`should change dot position when using offset prop: 4px 1`] = `""`;
+
+exports[`should render content slot correctly 1`] = `
+"<view class=\\"nut-badge\\">
+  <view class=\\"slot-icons\\"></view>Custom Content<view class=\\"nut-badge__content sup\\" style=\\"top: 0px; right: 0px; z-index: 9; display: none;\\"></view>
+</view>"
+`;
+
+exports[`should render nothing when content is empty string 1`] = `
+"<view class=\\"nut-badge\\">
+  <view class=\\"slot-icons\\"></view>
+  <view class=\\"nut-badge__content sup\\" style=\\"top: 0px; right: 0px; z-index: 9; display: none;\\"></view>
+</view>"
+`;
+
+exports[`should render nothing when content is undefined 1`] = `
+"<view class=\\"nut-badge\\">
+  <view class=\\"slot-icons\\"></view>
+  <view class=\\"nut-badge__content sup\\" style=\\"top: 0px; right: 0px; z-index: 9; display: none;\\"></view>
+</view>"
+`;
+
+exports[`should render nothing when content is zero 1`] = `
+"<view class=\\"nut-badge\\">
+  <view class=\\"slot-icons\\"></view>
+  <view class=\\"nut-badge__content sup\\" style=\\"top: 0px; right: 0px; z-index: 9; display: none;\\">0</view>
+</view>"
+`;